telophase: (Mello - bite my ass)
telophase ([personal profile] telophase) wrote2008-11-10 05:33 pm
Entry tags:

(no subject)

XSLT can just bite Mello's fabulous ass.

Spent the afternoon banging my head on my desk trying to get a blog RSS feed to appear without having the HTML elements stripped out.

Got much farther along than I had before, which is Good, but I have now found more New and Interesting Problems, which is Bad. i.e., sure, I can have the contents of a blog post show up on a page with the HTML tags intact, however if I want that to happen, I have to have THE ENTIRE POST DUPLICATED WITHOUT THE HTML TAGS ON TOP OF IT.

It reeeeally doesn't help that my knowledge of XML/XSL/XSLT is in the "typing in magic words I found on teh intarwebs and seeing what happens" phase. I have almost no understanding of this whatsoever. The only bright spot seems to be that the XML reference books from 2002 and 2004 that the library has, the most recent ones in the collection, seem to still be valid.
chomiji: Shigure from Fruits Basket, holding a pencil between his nose and upper lip; caption CAUTION - Thinking in Progress (shigure-thinking)

[personal profile] chomiji 2008-11-10 11:37 pm (UTC)(link)


Did you find this already? Scroll down to the second post. Is that any help at all?


[identity profile] telophase.livejournal.com 2008-11-10 11:46 pm (UTC)(link)
Er, the post that explains how to strip HTML tags out? I want them to stay in!

See, every ASP approach I've got to posting the content of RSS feeds automagically strips the tags out of text blocks like blog posts. And I need them in there, to link resources mentioned (this is the What's New? blog for the library), to italicize book titles, etc. So I'm now looking at parsing the XML in the RSS feed via XSL templates*, and I've had mild success with that - they use a CDATA wrapper to surround any text block that needs to keep the HTML tags intact.

The problem is extracting it from that wrapper while keeping the HTML tags intact. The only way I can find that does it, extracts the entire item (blog post) in the RSS feed, which includes the title, the URL, the comments feed URL, etc. Which might not be bad except that it doesn't give me any way I can manipulate those separately, *and* it duplicates the whole post. Note, if you see this comment before tomorrow when I get in and start messign with it again, the current results (http://lib.tcu.edu/www/rss-test4.asp).





* I suspect I'm using the terminology wrong, because I've had all of four hours' exposure to this.
chomiji: Cartoon of chomiji in the style of the Powerpuff Girls (tohru - blush)

[personal profile] chomiji 2008-11-10 11:57 pm (UTC)(link)


... oopsie.



So much for online research as a momentary distraction from too many last-minute site updates.



I'll see if I can find anything else ... . We have a contractor here who can do XSLT stuff but asking such a person for help is a no-no ... however, I once did some graphics tweaks for his wife, so maybe he can recommend some help sites or something. But - uh oh. It's Veterans Day tomorrow, so I won't be in and neither will he . ... .


[identity profile] telophase.livejournal.com 2008-11-10 11:59 pm (UTC)(link)
You gummint employees and your holidays!
chomiji: Hakkai from Saiyuki, smiling forcefully, with the caption I'm so happy I could just puke! (Hakkai - so happy (not!))

[personal profile] chomiji 2008-11-11 12:07 am (UTC)(link)


Well, you may compare my extra day off tomorrow with the fact that I'm still at my desk now, 90 minutes after my official day ends ... and it sure as heck ain't the first time in the past several months! (Not to mention to two hours I did remotely over the weekend.)



I'll e-mail Raj anyway ... he might pick it up and be able to send me some links.



[identity profile] telophase.livejournal.com 2008-11-11 12:09 am (UTC)(link)
So far in my current job, the only time I *had* to work overtime (for values of "overtime" that mean "unpaid as I am an exempt employee") was pretty much my own choice - I redid the entire website in 24 hours work over a weekend. NEVER AGAIN.

:D Thanks!
chomiji: Cartoon of chomiji in the style of the Powerpuff Girls (Kuro - it sucks)

[personal profile] chomiji 2008-11-11 12:18 am (UTC)(link)


No one makes me do this, but things end up getting ugly if certain tasks aren't done and ready to go by the time my counterpart gets in to post them early in the morning ... there's no slack in this job. Too much stuff is time-sensitive. So if I have to spend a long time explaining something to someone (today, it was explaining built-in editor changes that will be caused by our upcoming CMS upgrade), the same stuff still remains to be formatted and staged. Yeah, I could leave the poor suckers alone to figure out the editor biz themselves, but that just shifts the pain down the line.



And yes, I'm also "overtime exempt." Lovely bit of terminology, that ... .


[identity profile] telophase.livejournal.com 2008-11-11 12:26 am (UTC)(link)
Yup. :) It's been made clear to me, though, that if something requires that I stay over, then I stay over. There's just no real website emergencies that are handled at my level. XD If the server goes down ... not my server! It's not even in my building! If it gets hacked, well ... still, not my job to patch the security holes or to restore from backup, and the most I'd really be required to do is throw together a quick "Here's what happened, here's some links you might need until the site's back up" page.

[identity profile] jarodrussell.livejournal.com 2008-11-11 12:44 am (UTC)(link)
W3Schools (http://w3schools.com/) has a great XSLT/XPath reference.
oyceter: teruterubouzu default icon (Default)

[personal profile] oyceter 2008-11-11 04:53 am (UTC)(link)
Heh, let me know if you manage to figure it out... I keep trying to do HTML transforms on my XML, and the XSL takes anything HTML-like and prints it out directly (so if I type in ampersand+lt+semicolon+blah it shows as <)! Grrrrr.