dmarston 2002/07/31 15:22:56
Added: test/tests/conf/conflictres conflictres30.xsl
conflictres25.xsl conflictres26.xml
conflictres26.xsl conflictres27.xml
conflictres27.xsl conflictres28.xml
conflictres28.xsl conflictres29.xml
conflictres29.xsl conflictres30.xml
conflictres25.xml
Log:
Santiago wanted more coverage of assigned vs. defaulted priorities
Revision Changes Path
1.1 xml-xalan/test/tests/conf/conflictres/conflictres30.xsl
Index: conflictres30.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres30 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test conflict of two ways to wildcard attributes. -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
<xsl:apply-templates select="@*"/>
</xsl:template>
<xsl:template match="@*">
<xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
</xsl:template>
<xsl:template match="attribute::node()">
<xsl:value-of select="name(.)"/><xsl:text>-node(),</xsl:text>
</xsl:template>
<xsl:template match="@x2">
<xsl:text>Found x2 attribute</xsl:text>
</xsl:template>
<!-- last template wins -->
<xsl:template match="@*">
<xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres25.xsl
Index: conflictres25.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres25 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: Santiago Pericas-Geertsen -->
<!-- Purpose: Test explicit priorities vs. default for attributes. -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
<xsl:apply-templates select="@*"/>
</xsl:template>
<!-- Should not match -->
<xsl:template match="@x1">
<xsl:text>Found x1 attribute,</xsl:text>
</xsl:template>
<!-- Same priority as pattern above, but later position -->
<xsl:template match="@*" priority="0">
<xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
</xsl:template>
<!-- Same priority as pattern above, but later position -->
<xsl:template match="@x2">
<xsl:text>Found x2 attribute</xsl:text>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres26.xml
Index: conflictres26.xml
===================================================================
<?xml version="1.0"?>
<doc><a x1="big" x2="bigger"/></doc>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres26.xsl
Index: conflictres26.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres26 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: Santiago Pericas-Geertsen -->
<!-- Purpose: Test explicit priorities vs. default for attributes. -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
<xsl:apply-templates select="@*"/>
</xsl:template>
<xsl:template match="@*" priority="0.1">
<xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
</xsl:template>
<!-- Should not match as default priority is 0 -->
<xsl:template match="@x1">
<xsl:text>Found x1 attribute,</xsl:text>
</xsl:template>
<!-- Should not match as default priority is 0 -->
<xsl:template match="@x2">
<xsl:text>Found x2 attribute</xsl:text>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres27.xml
Index: conflictres27.xml
===================================================================
<?xml version="1.0"?>
<doc><a/><b/></doc>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres27.xsl
Index: conflictres27.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres27 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: Santiago Pericas-Geertsen -->
<!-- Purpose: Test explicit priorities for "*". -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="/">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
</xsl:template>
<xsl:template match="*" priority="0.1">
<xsl:text>Matched * on </xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>; </xsl:text>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres28.xml
Index: conflictres28.xml
===================================================================
<?xml version="1.0"?>
<doc><a/><b/></doc>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres28.xsl
Index: conflictres28.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres28 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: Santiago Pericas-Geertsen -->
<!-- Purpose: Test explicit priority for "node()", higher than default of
-0.5 -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="/">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
</xsl:template>
<xsl:template match="node()" priority="0.1">
<xsl:text>Matched node() on </xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>; </xsl:text>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres29.xml
Index: conflictres29.xml
===================================================================
<?xml version="1.0"?>
<doc><a x1="big" x2="bigger"/></doc>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres29.xsl
Index: conflictres29.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: conflictres29 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test conflict of two ways to wildcard attributes. Also assign
conflicting priority on a template. -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="a">
<xsl:text>a: </xsl:text>
<xsl:apply-templates select="@*"/>
</xsl:template>
<xsl:template match="@*">
<xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
</xsl:template>
<xsl:template match="attribute::node()">
<xsl:value-of select="name(.)"/><xsl:text>-node(),</xsl:text>
</xsl:template>
<!-- below is same priority as previous 2 -->
<xsl:template match="@x2" priority="-0.5">
<xsl:text>Found x2 attribute</xsl:text>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres30.xml
Index: conflictres30.xml
===================================================================
<?xml version="1.0"?>
<doc><a x1="big" x2="bigger"/></doc>
1.1 xml-xalan/test/tests/conf/conflictres/conflictres25.xml
Index: conflictres25.xml
===================================================================
<?xml version="1.0"?>
<doc><a x1="big" x2="bigger"/></doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]