copying craziness

One of the things that makes these stylesheets so hard to deal with is the craziness. E.g., the following is a copy-and-pasted excerpt from Stylesheets/odds/odd2odd.xsl. --------- begin --------- <xsl:template match="*" mode="odd2odd-change"> <xsl:copy> <xsl:apply-templates mode="odd2odd-change" select="*|@*|processing-instruction()|text()"/> </xsl:copy> </xsl:template> <xsl:template match="rng:*" mode="odd2odd-change"> <xsl:element xmlns="http://relaxng.org/ns/structure/1.0" name="{local-name()}"> <xsl:apply-templates mode="odd2odd-change" select="*|@*|processing-instruction()|text()"/> </xsl:element> </xsl:template> --------- end --------- There is *no* explanation as to why there are 2 templates next to each other which do *the same thing* and where one matches a subset of constructs the other matches. The second template has no effect on the output XML tree. Using Saxon, at least, it does effect the serialization. With the 2nd template in there I got <text xmlns="http://relaxng.org/ns/structure/1.0"/> without it I got <rng:text/> Does anyone know of a reason to leave that 2nd template in? Personally, I prefer the prefixed version of the output, anyway.
participants (1)
-
Syd Bauman