This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

using xsl:document with 1.0 stylesheets


To answer my own question, the following XSL
script

 <xsl:stylesheet version="1.1"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes"/>
 <xsl:template match="/">
 <xsl:message>Version <xsl:value-of select="system-property('xsl:version')"/> vendor <xsl:value-of select="system-property('xsl:vendor')"/>
 </xsl:message>
 <xsl:choose>
 <xsl:when test="system-property('xsl:version') >= 1.1">
 <xsl:document href="test">Test <xsl:value-of select="system-property('xsl:vendor')"/></xsl:document>
 </xsl:when>
 <xsl:otherwise>!! XSLT 1.1 required</xsl:otherwise>
 </xsl:choose>
 </xsl:template>
 </xsl:stylesheet>

produces the following results:

JD:
Version 1.1 vendor Johannes Döbler

Saxon 6.2:
Version 1 vendor SAXON 6.2 from Michael Kay
!! XSLT 1.1 required

Saxon 6:
Version 1 vendor SAXON 6.0.2 from Michael Kay of ICL
!! XSLT 1.1 required

XT:
file:/home/rahtz/Source/jd/test.xsl:9: expected action not xsl:document

Xalan:
file:///home/rahtz/Source/jd/test.xsl; Line 5; Column 15; Version 1 vendor Apache Software Foundation
!! XSLT 1.1 required

Oracle:

1 XML document will be transformed using XSLT stylesheet specified in test.xsl with 5 threads
Parsing file test.xsl
Parsing file demo.xml
Transforming XML document specified in demo.xml
Message: Version 1 vendor Oracle Corporation.

!! XSLT 1.1 required

Sablotron:
Error [code:194] [URI:file:/home/rahtz/Source/jd/test.xsl] [line:9] 
  non-XSL instruction


which confirm to me that using "version='1.1'" and testing for it is
mostly safe. XT I had already given up on, but I am surprised at
Sablotron.

sebastian


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]