dmarston 02/02/01 13:18:24
Added: test/tests/conf/boolean boolean89.xsl boolean84.xsl
boolean85.xml boolean85.xsl boolean86.xml
boolean86.xsl boolean87.xml boolean87.xsl
boolean88.xml boolean88.xsl boolean89.xml
boolean84.xml
Log:
New cases where an equality relation forces a type conversion
Revision Changes Path
1.1 xml-xalan/test/tests/conf/boolean/boolean89.xsl
Index: boolean89.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean89 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 11.1 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test = and !=, comparing RTF to string. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:variable name="numericRTF">
<xsl:value-of select="/doc/num"/>
</xsl:variable>
<xsl:template match="doc">
<out>
<en><xsl:value-of select="$numericRTF=17"/></en>
<nn><xsl:value-of select="$numericRTF!=17"/></nn>
<ne><xsl:value-of select="17=$numericRTF"/></ne>
<nn><xsl:value-of select="17!=$numericRTF"/></nn>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean84.xsl
Index: boolean84.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean84 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test =, !=, and not, comparing node-set to number. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:variable name="x" select="avj/good/*"/>
<e><xsl:value-of select="$x=34"/></e>
<ne><xsl:value-of select="not($x=34)"/></ne>
<n><xsl:value-of select="$x!=34"/></n>
<nn><xsl:value-of select="not($x!=34)"/></nn><xsl:text>
</xsl:text><!-- Now reverse the order of the comparands -->
<e><xsl:value-of select="34=$x"/></e>
<ne><xsl:value-of select="not(34=$x)"/></ne>
<n><xsl:value-of select="34!=$x"/></n>
<nn><xsl:value-of select="not(34!=$x)"/></nn>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean85.xml
Index: boolean85.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<avj>
<bool>
<b>true</b>
<c></c>
<d>false?</d>
<e>1</e>
<f>0</f>
</bool>
</avj>
</doc>
1.1 xml-xalan/test/tests/conf/boolean/boolean85.xsl
Index: boolean85.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean85 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test =, !=, and not, comparing node-set to boolean. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:variable name="x" select="avj/bool/*"/>
<e><xsl:value-of select="$x=true()"/></e>
<ne><xsl:value-of select="not($x=true())"/></ne>
<n><xsl:value-of select="$x!=true()"/></n>
<nn><xsl:value-of select="not($x!=true())"/></nn><xsl:text>
</xsl:text><!-- Now reverse the order of the comparands -->
<e><xsl:value-of select="true()=$x"/></e>
<ne><xsl:value-of select="not(true()=$x)"/></ne>
<n><xsl:value-of select="true()!=$x"/></n>
<nn><xsl:value-of select="not(true()!=$x)"/></nn>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean86.xml
Index: boolean86.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<avj>
<bool>
<b>true</b>
<c></c>
<d>false?</d>
<e>1</e>
<f>0</f>
</bool>
</avj>
</doc>
1.1 xml-xalan/test/tests/conf/boolean/boolean86.xsl
Index: boolean86.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean86 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test =, !=, and not, comparing empty node-set to boolean. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:variable name="x" select="avj/none"/><!-- empty -->
<e><xsl:value-of select="$x=true()"/></e>
<ne><xsl:value-of select="not($x=true())"/></ne>
<n><xsl:value-of select="$x!=true()"/></n>
<nn><xsl:value-of select="not($x!=true())"/></nn><xsl:text>
</xsl:text><!-- Now reverse the order of the comparands -->
<e><xsl:value-of select="true()=$x"/></e>
<ne><xsl:value-of select="not(true()=$x)"/></ne>
<n><xsl:value-of select="true()!=$x"/></n>
<nn><xsl:value-of select="not(true()!=$x)"/></nn>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean87.xml
Index: boolean87.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<avj>
<bool>
<b>true</b>
<c></c>
<d>false?</d>
<e>1</e>
<f>0</f>
</bool>
</avj>
</doc>
1.1 xml-xalan/test/tests/conf/boolean/boolean87.xsl
Index: boolean87.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean87 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 11.1 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test = and !=, comparing RTF to boolean. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:variable name="normalRTF">
<xsl:value-of select="/doc/avj"/>
</xsl:variable>
<xsl:variable name="emptyRTF"></xsl:variable>
<xsl:template match="doc">
<out>
<nt><xsl:value-of select="$normalRTF=true()"/></nt>
<nnt><xsl:value-of select="$normalRTF!=true()"/></nnt>
<tn><xsl:value-of select="true()=$normalRTF"/></tn>
<tnn><xsl:value-of select="true()!=$normalRTF"/></tnn><xsl:text>
</xsl:text>
<et><xsl:value-of select="$emptyRTF=true()"/></et>
<ent><xsl:value-of select="$emptyRTF!=true()"/></ent>
<te><xsl:value-of select="true()=$emptyRTF"/></te>
<tne><xsl:value-of select="true()!=$emptyRTF"/></tne>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean88.xml
Index: boolean88.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<str>found</str>
</doc>
1.1 xml-xalan/test/tests/conf/boolean/boolean88.xsl
Index: boolean88.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: boolean88 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 11.1 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test = and !=, comparing RTF to string. -->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:variable name="stringRTF">
<xsl:value-of select="/doc/str"/>
</xsl:variable>
<xsl:template match="doc">
<out>
<es><xsl:value-of select="$stringRTF='found'"/></es>
<ns><xsl:value-of select="$stringRTF!='found'"/></ns>
<se><xsl:value-of select="'found'=$stringRTF"/></se>
<sn><xsl:value-of select="'found'!=$stringRTF"/></sn>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/boolean/boolean89.xml
Index: boolean89.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<num>17</num>
</doc>
1.1 xml-xalan/test/tests/conf/boolean/boolean84.xml
Index: boolean84.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<avj>
<good>
<b>12</b>
<c>34</c>
<d>56</d>
<e>78</e>
</good>
</avj>
</doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]