"Michael" == Michael Kay <mhk(_at_)mhk(_dot_)me(_dot_)uk> writes:
Michael> XSLT 2.0 allows the [xsl:]version attribute on any
Michael> element. XSLT 1.0 allows it only on the xsl:stylesheet
Michael> element or a literal result element.
Which is therefore not backwards compatible, and so breaks the
fallback future-proofing (as in the example)
>> That does not work.
>>
>> % cat fallback.xsl <?xml version="1.0" encoding="utf-8"?>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>>
>> <xsl:output method="xml" indent="yes"/>
>>
>> <xsl:template match="/" version="3.0"> <result>
>> <xsl:perform-magic select="magic-dust"> <xsl:fallback>Sorry, we
>> don't do magic</xsl:fallback> </xsl:perform-magic> </result>
>> </xsl:template>
>>
>> </xsl:stylesheet>
>>
>> % saxon dummy.xml fallback.xsl Error at xsl:template on line 7
>> of file:/opus/home/mike/xml/test/fallback.xsl: Attribute
>> version is not allowed on this element Error at
>> xsl:perform-magic on line 9 of
>> file:/opus/home/mike/xml/test/fallback.xsl: Unknown XSLT
>> element: perform-magic Transformation failed: Failed to compile
>> stylesheet. 2 errors detected.
--
Colin Paul Adams
Preston Lancashire
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list