Project

Profile

Help

2.0 behavior under 1.0 mode?

Added by Anonymous almost 19 years ago

Legacy ID: #3225080 Legacy Poster: Jan Van den Bussche (vdbuss)

Dear XSLT enthusiasts, Using saxon 8.4, when I apply the following stylesheet: ========== <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="liltree"> <d> <e/> </d> </xsl:variable> <xsl:template match="a"> <xsl:copy-of select="$liltree//e"/> </xsl:template> </xsl:transform> ========== to an arbitrary XML document, I get the result <e/> I use a clear 2.0 feature (use a result-tree fragment in an XPath expression) but I set the version to 1.0, so it should run in 1.0 mode and give an error, right? Best regards, Jan


Replies (1)

RE: 2.0 behavior under 1.0 mode? - Added by Anonymous almost 19 years ago

Legacy ID: #3225163 Legacy Poster: Michael Kay (mhkay)

No, a 2.0 processor recognizes version="1.0" and runs in backwards compatible mode, which means that certain well-defined constructs behave differently for compatibilty reasons, but a 2.0 processor isn't expected to enforce all the restrictions of 1.0 when version="1.0" is specified.

    (1-1/1)

    Please register to reply