David Baron's weblog: August 2004

Friends & Colleagues

Monday 2004-08-30

Weblog feed (22:48 -0700)

Reading the XSLT used for the newsfeed on the new mozilla.org webpage inspired me to finish a project I started quite a while ago—making an RSS feed for this weblog. After reading the one example XSLT file, I did the rest using only the XSLT spec and the XPath spec. So I now have an RSS feed produced by an XSLT transformation sheet (I don't like the use of the word “stylesheet” for XSLT). And it's apparently even valid.

Writing it wasn't nearly as bad as I expected, although I am somewhat disappointed by the inability of XSLT to re-transform trees (i.e., use an already transformed tree, in the form of a result tree fragment bound to a variable, as the source tree for an additional transformation). I worked around the problem using a named template and xsl:call-template. At least I think it's something XSLT can't do—at least I couldn't see how in the spec.