... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)


Java 1.5 / Xalan XSLT Bug

Xalan XSLTC 2.6.0 (and by extension, Java 1.5 XSLT transformation) has a bug where it complains about a syntax error for a rule such as <xsl:template match="and"/>.  The issue is that and is a reserved word.  Only Xalan appears to exhibit this bug.  All of the other transformers that I tried worked (including IE, FF, Saxon, and Xalan 2.7.0).  The XSLT specification is silent on the matter, but the grammar does not appear to prohibit the case.

The workaround is to use a rule of the form <xsl:template match="*[local-name()='and']"/>.  Ugly, but it works.

Blog Archive