Monday, November 9, 2009

XSLT, where have you been all my blankin' life!

I spent a couple hours to play around with a few style sheets, after inhaling all the XSL/XSLT and XPath related data I could get my mits on.

I wrote one for converting DocBook XML into a portable subset of Bulletin Board Code, and one for HTML-aware blogs. The textproc/docbook-xsl port offers html/xhtml outputs, but it is better suited to generating stand alone web pages; mine targets it for posting to my Live Journal ;-).


For quite a while, I've generally skipped dealing with eXtensible Stylesheet Language (XSL) and her friends, but now I'm happy as a clam! XPath expressions provide a relatively simple form of addressing XML elements and attributes, kind of like basic regular expressions and CSS selectors rolled into a hierarchal package. XSLT processing has it's ups and downs but for generating output for creatures like web browsers, where formatting is different from matter, is quite trivial.

Most non-trivial HOWTO's, guides, and reviews that I post, are actually taken from files kept in my ~/Documents/ folder. I'll likely be adjusting them to DocBook and integrating them into their own private git repositories, mauhauha!

No comments:

Post a Comment