dmarston 00/12/15 18:13:59
Added: test/tests/conf/ver ver04.xsl ver01.xsl ver02.xml ver02.xsl
ver03.xml ver03.xsl ver04.xml ver01.xml
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/ver/ver04.xsl
Index: ver04.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: Ver04 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.1 XSLT Namespace -->
<!-- Creator: David Marston -->
<!-- Purpose: Test for explicit specification of version attribute in
stylesheet declaration above. -->
<!-- Explicitly match text nodes so the output is just 39 -->
<xsl:template match="text()">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc/version">
<out>
<xsl:value-of select="./@theattrib"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/ver/ver01.xsl
Index: ver01.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="8.5">
<!-- FileName: Ver01 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.5 Forwards-Compatible Processing -->
<!-- Creator: David Marston -->
<!-- Purpose: Test the basics of the XSLT version declaration. Should not
raise an error. -->
<xsl:template match="/">
<out>
Choosing, based on value of version property.
<xsl:choose>
<xsl:when test="system-property('xsl:version') >= 8.5">
We are allowed to use the 8.5 feature.
<xsl:exciting-new-8.5-feature/>
</xsl:when>
<xsl:otherwise>
We are not allowed to use the 8.5 feature.
<xsl:message>This stylesheet requires XSLT 8.5 or
higher</xsl:message>
</xsl:otherwise>
</xsl:choose>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/ver/ver02.xml
Index: ver02.xml
===================================================================
<?xml version="1.0"?>
<doc>
<version theattrib="39"/>
</doc>
1.1 xml-xalan/test/tests/conf/ver/ver02.xsl
Index: ver02.xsl
===================================================================
<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: Ver02 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.2 Stylesheet element -->
<!-- Creator: David Marston -->
<!-- Purpose: Prove that transform is a synonym for stylesheet. -->
<!-- Explicitly match text nodes so the output is just 39 -->
<xsl:template match="text()">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc/version">
<out>
<xsl:value-of select="./@theattrib"/>
</out>
</xsl:template>
</xsl:transform>
1.1 xml-xalan/test/tests/conf/ver/ver03.xml
Index: ver03.xml
===================================================================
<?xml version="1.0"?>
<doc>
<version theattrib="39"/>
</doc>
1.1 xml-xalan/test/tests/conf/ver/ver03.xsl
Index: ver03.xsl
===================================================================
<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" id="style1">
<!-- FileName: Ver03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.2 Stylesheet element -->
<!-- Creator: David Marston -->
<!-- Purpose: Prove that transform takes the "id" attribute. -->
<!-- Explicitly match text nodes so the output is just 39 -->
<xsl:template match="text()">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc/version">
<out>
<xsl:value-of select="./@theattrib"/>
</out>
</xsl:template>
</xsl:transform>
1.1 xml-xalan/test/tests/conf/ver/ver04.xml
Index: ver04.xml
===================================================================
<?xml version="1.0"?>
<doc>
<version theattrib="39"/>
</doc>
1.1 xml-xalan/test/tests/conf/ver/ver01.xml
Index: ver01.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>