dmarston 00/12/17 13:40:19
Added: test/tests/conf/predicate predicate38.xsl predicate01.xsl
predicate02.xml predicate02.xsl predicate03.xml
predicate03.xsl predicate04.xml predicate04.xsl
predicate05.xml predicate05.xsl predicate06.xml
predicate06.xsl predicate07.xml predicate07.xsl
predicate08.xml predicate08.xsl predicate09.xml
predicate09.xsl predicate10.xml predicate10.xsl
predicate11.xml predicate11.xsl predicate12.xml
predicate12.xsl predicate13.xml predicate13.xsl
predicate14.xml predicate14.xsl predicate15.xml
predicate15.xsl predicate16.xml predicate16.xsl
predicate17.xml predicate17.xsl predicate18.xml
predicate18.xsl predicate19.xml predicate19.xsl
predicate20.xml predicate20.xsl predicate21.xml
predicate21.xsl predicate22.xml predicate22.xsl
predicate23.xml predicate23.xsl predicate24.xml
predicate24.xsl predicate25.xml predicate25.xsl
predicate26.xml predicate26.xsl predicate27.xml
predicate27.xsl predicate28.xml predicate28.xsl
predicate29.xml predicate29.xsl predicate30.xml
predicate30.xsl predicate31.xml predicate31.xsl
predicate32.xml predicate32.xsl predicate33.xml
predicate33.xsl predicate34.xml predicate34.xsl
predicate35.xml predicate35.xsl predicate36.xml
predicate36.xsl predicate37.xml predicate37.xsl
predicate38.xml predicate01.xml
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/predicate/predicate38.xsl
Index: predicate38.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: predicate38 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Purpose: Stress test of nested and multiple predicates. The production
rules
allow such nesting. -->
<!-- Author: Paul Dick -->
<xsl:template match="doc">
<xsl:apply-templates select="foo[(bar[2])='this']"/>
<xsl:apply-templates select="foo[(bar[2][(baz[2])='goodbye'])]"/>
</xsl:template>
<xsl:template match="foo[(bar[2])='this']">
1 <xsl:for-each select="*">
<xsl:value-of select="@attr"/>,
</xsl:for-each>
</xsl:template>
<xsl:template match="foo[(bar[(baz[2])='goodbye'])]">
3 <xsl:for-each select="*">
<xsl:value-of select="@attr"/>,
</xsl:for-each>
</xsl:template>
<xsl:template match="foo[(bar[2][(baz[2])='goodbye'])]">
2 <xsl:for-each select="*">
<xsl:value-of select="@attr"/>,
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate01.xsl
Index: predicate01.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE01 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion to boolean. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[true()=4]"/>
<!-- Always true; positive numbers convert to true. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate02.xml
Index: predicate02.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate02.xsl
Index: predicate02.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE02 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion to boolean. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[true()='stringwithchars']"/>
<!-- Always true; nonzero-length strings convert to true. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate03.xml
Index: predicate03.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate03.xsl
Index: predicate03.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE03 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to boolean. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[true()=following-sibling::*]"/>
<!-- Should match 1,2,3 because those nodes have non-empty
following-sibling axis. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate04.xml
Index: predicate04.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate04.xsl
Index: predicate04.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE04 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion to number. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[3.0='3.0']"/>
<!-- Always true; strings convert to the numbers they look like. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate05.xml
Index: predicate05.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate05.xsl
Index: predicate05.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE05 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[3=following-sibling::*]"/>
<!-- True only when the node containing 3 is one of the following
siblings. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate06.xml
Index: predicate06.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2
<achild>target</achild>
</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate06.xsl
Index: predicate06.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE06 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to string. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a['target'=descendant::*]"/>
<!-- True only when the node has a descendant containing "target". -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate07.xml
Index: predicate07.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate07.xsl
Index: predicate07.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE07 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion to number for an inequality test.
-->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[0 < true()]">
<!-- Always true; true converts to 1. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate08.xml
Index: predicate08.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate08.xsl
Index: predicate08.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE08 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion to number for an inequality test.
-->
<xsl:template match="doc">
<out>
<xsl:for-each select="a['3.5' < 4]">
<!-- Always true; strings convert to the numbers they look like. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate09.xml
Index: predicate09.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate09.xsl
Index: predicate09.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE09 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[3 < following-sibling::*]">
<xsl:value-of select="."/>
<!-- True only when a node containing a number greater than 3 is one of
the following siblings. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate10.xml
Index: predicate10.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate10.xsl
Index: predicate10.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE10 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of association of inequality symbols. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[1 < 2 < 3]">
<xsl:value-of select="."/>
<!-- Always true; (1 < 2 ) converts to true; true converts to 1; and
(1 < 3) is true. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate11.xml
Index: predicate11.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2
<achild>target</achild>
</a>
<a>3</a>
<a>target</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate11.xsl
Index: predicate11.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE11 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of comparison of 2 node-sets. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[following-sibling::*=descendant::*]"/>
<!-- True only when the node has both a descendant and a following
sibling containing "target". -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate12.xml
Index: predicate12.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy">1</a>
<a>2
<achild>target</achild>
</a>
<a>3</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate12.xsl
Index: predicate12.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE12 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean or. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[('target'=descendant::*) or @squish]">
<xsl:value-of select="."/>
<!-- True only when the node has either a squish attribute or a
descendant containing "target". -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate13.xml
Index: predicate13.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy">1</a>
<a>2
<achild>target</achild>
</a>
<a>3</a>
<a>target</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate13.xsl
Index: predicate13.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE13 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean not compounded with or. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[not(('target'=descendant::*) or @squish)]"/>
<!-- True only when the node has neither a squish attribute nor a
descendant containing "target". -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate14.xml
Index: predicate14.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy" squash="butternut">1</a>
<a squish="heavy" squeesh="virus">2</a>
<a squash="butternut" squeesh="virus">3</a>
<a squish="heavy">4</a>
<a squeesh="virus">5</a>
<a squash="butternut">6</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate14.xsl
Index: predicate14.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE14 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean and, or with parens retaining usual
precedence. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="[EMAIL PROTECTED] or (@squish and @squash)]">
<xsl:value-of select="."/>
<!-- Should match 1, 2, 3, 5. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate15.xml
Index: predicate15.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy" squash="butternut">1</a>
<a squish="heavy" squeesh="virus">2</a>
<a squash="butternut" squeesh="virus">3</a>
<a squish="heavy">4</a>
<a squeesh="virus">5</a>
<a squash="butternut">6</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate15.xsl
Index: predicate15.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE15 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean and, or with parens overriding precedence. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[(@squeesh or @squish) and @squash]">
<xsl:value-of select="."/>
<!-- Should match 1, 3. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate16.xml
Index: predicate16.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy" squash="butternut">1</a>
<a squish="heavy" squeesh="virus">2</a>
<a squash="butternut" squeesh="virus">3</a>
<a squish="heavy">4</a>
<a squeesh="virus">5</a>
<a squash="butternut">6</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate16.xsl
Index: predicate16.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE16 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean and, or without parens. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="[EMAIL PROTECTED] or @squish and @squash]">
<xsl:value-of select="."/>
<!-- Should match 1, 2, 3, 5. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate17.xml
Index: predicate17.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a squish="heavy">1</a>
<a>2
<achild size="large">child2</achild>
</a>
<a>3</a>
<a attrib="present">4
<achild>child4</achild>
</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate17.xsl
Index: predicate17.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE17 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of boolean not with @* to test for lack of attributes.
-->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[not(@*)]">
<xsl:value-of select="."/>
</xsl:for-each>
<!-- Should output 2, child2, 3. -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate18.xml
Index: predicate18.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>
<asub>
<asubsub/>
</asub>
</a>
<b>
<bsub>
<foo>
<child/>
</foo>
</bsub>
</b>
<c>f-inside</c>
<d>
<dsub>
<dsubsub>
<foundnode/>
</dsubsub>
</dsub>
</d>
<e>f-inside
<esub>
f-inside
</esub>
<esubsib>
f-inside
</esubsib>
f-inside
</e>
<f>
<fsub/>
</f>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate18.xsl
Index: predicate18.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE18 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.2 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of starts-with on node name. -->
<xsl:template match="doc">
<out>
<!-- Should match foo, foundnode, f, fsub. -->
<xsl:for-each select="*[starts-with(name(.),'f')]">
<xsl:value-of select="name(.)"/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate19.xml
Index: predicate19.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>
<asub>
<asubsub/>
</asub>
</a>
<b>
<bsub>x</bsub>
</b>
<c>inside</c>
<d>
<dsub>
<q>
<foundnode/>
</q>
</dsub>
</d>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate19.xsl
Index: predicate19.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE19 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.2 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of string-length on node name. -->
<xsl:template match="doc">
<out>
<!-- Should match a, b, c, d, q. -->
<xsl:for-each select="descendant::*[string-length(name(.))=1]">
<xsl:value-of select="name(.)"/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate20.xml
Index: predicate20.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2
<achild>target</achild>
</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate20.xsl
Index: predicate20.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE20 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to string, ensure = is
symmetric. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="a[descendant::*='target']"/>
<!-- True only when the node has a descendant containing "target". -->
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate21.xml
Index: predicate21.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2<achild>target</achild></a>
<a>3</a>
<a>4<achild>missed</achild></a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate21.xsl
Index: predicate21.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE21 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to string on !=
predicate. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a['target'!=descendant::*]">
<!-- True only when the node has descendants, but none containing
"target". -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate22.xml
Index: predicate22.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2<achild>target</achild></a>
<a>3</a>
<a>4<achild>missed</achild></a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate22.xsl
Index: predicate22.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE22 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to string, and that !=
is symmetric. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[descendant::*!='target']">
<!-- True only when the node has descendants, but none containing
"target". -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate23.xml
Index: predicate23.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate23.xsl
Index: predicate23.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE23 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to boolean, ensure =
is symmetric. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[following-sibling::*=true()]">
<!-- Should match 1,2,3 because those nodes have non-empty
following-sibling axis. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate24.xml
Index: predicate24.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate24.xsl
Index: predicate24.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE24 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to boolean with !=,
boolean first. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[false()!=following-sibling::*]">
<!-- Should match 1,2,3 because those nodes have non-empty
following-sibling axis. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate25.xml
Index: predicate25.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate25.xsl
Index: predicate25.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE25 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to boolean with !=,
boolean last. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[following-sibling::*!=false()]">
<!-- Should match 1,2,3 because those nodes have non-empty
following-sibling axis. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate26.xml
Index: predicate26.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate26.xsl
Index: predicate26.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE26 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Creator: David Marston -->
<!-- Section: 3.4 -->
<!-- Purpose: Test of implied conversion of node-set to number, ensure = is
symmetric. -->
<xsl:template match="doc">
<out>
<xsl:for-each select="a[following-sibling::*=3]">
<!-- True only when the node containing 3 is one of the following
siblings. -->
<xsl:value-of select="."/>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate27.xml
Index: predicate27.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate27.xsl
Index: predicate27.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE27 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with a !=
relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[4 != following-sibling::*]">
<xsl:value-of select="."/>
<!-- True only when there is a following sibling that does not contain
a 4. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate28.xml
Index: predicate28.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate28.xsl
Index: predicate28.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE28 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with a !=
relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[following-sibling::* != 4]">
<xsl:value-of select="."/>
<!-- True only when there is a following sibling that does not contain
a 4. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate29.xml
Index: predicate29.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate29.xsl
Index: predicate29.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE29 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[following-sibling::* < 3]">
<xsl:value-of select="."/>
<!-- True only when one of the following siblings contains a number less
than 3. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate30.xml
Index: predicate30.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate30.xsl
Index: predicate30.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE30 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[3 >= following-sibling::*]">
<xsl:value-of select="."/>
<!-- True only when one of the following siblings contains a number
less/equal than 3. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate31.xml
Index: predicate31.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
<a>2</a>
<a>2</a>
<a>1</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate31.xsl
Index: predicate31.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE31 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[following-sibling::* >= 3]">
<xsl:value-of select="."/>
<!-- True only when a node containing a number greater/equal than 3 is
one of the following siblings. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate32.xml
Index: predicate32.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate32.xsl
Index: predicate32.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE32 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[3 > following-sibling::*]">
<xsl:value-of select="."/>
<!-- True only when a node containing a number less/equal than 3 is one
of the following siblings. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate33.xml
Index: predicate33.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate33.xsl
Index: predicate33.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE33 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[following-sibling::* > 3]">
<xsl:value-of select="."/>
<!-- True only when a node containing a number greater than 3 is one of
the following siblings. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate34.xml
Index: predicate34.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate34.xsl
Index: predicate34.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE34 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[3 <= following-sibling::*]">
<xsl:value-of select="."/>
<!-- True only when one of the following siblings contains a number
greater than 3. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate35.xml
Index: predicate35.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate35.xsl
Index: predicate35.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE35 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of implied conversion of node-set to number with an
inequality relation. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[following-sibling::* <= 3]">
<xsl:value-of select="."/>
<!-- True only when a node containing a number less/equal than 3 is one
of the following siblings. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate36.xml
Index: predicate36.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate36.xsl
Index: predicate36.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE36 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of association of inequality symbols. -->
<xsl:template match="doc">
<out>
<xsl:for-each select = "a[1 < 3 < 2]">
<xsl:value-of select="."/>
<!-- Always true; (1 < 3 ) converts to true; true converts to 1; and
(1 < 2) is true. -->
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate37.xml
Index: predicate37.xml
===================================================================
<?xml version="1.0"?>
<a>
<b>This is a B</b>
<c></c>
</a>
1.1 xml-xalan/test/tests/conf/predicate/predicate37.xsl
Index: predicate37.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- FileName: PREDICATE37 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.4 -->
<!-- Purpose: Show that we can limit match to non-empty elements. -->
<xsl:template match="/a" >
<!-- If the node 'a' has a child 'b' that has a value in it,
then show it. Otherwise don't show it. -->
<xsl:if test='b[not(.="")]' >( <xsl:value-of select="b" /> )</xsl:if>
<!-- If the node 'a' has a child 'c' that has a value in it,
then show it. Otherwise don't show it. -->
<xsl:if test='c[not(.="")]' >( <xsl:value-of select="c" /> )</xsl:if>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate38.xml
Index: predicate38.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>
<bar attr="1">this</bar>
<bar attr="2">2</bar>
<bar attr="3">3</bar>
</foo>
<foo>
<bar attr="4">this</bar>
<bar attr="5">this</bar>
<bar1 attr="6">that</bar1>
</foo>
<foo>
<bar attr="7">
<baz attr="a">hello</baz>
<baz attr="b">goodbye</baz>
</bar>
<bar2 attr="8">this</bar2>
<bar2 attr="9">that</bar2>
</foo>
<foo>
<bar attr="10">this</bar>
<bar attr="11">
<baz attr="a">hello</baz>
<baz attr="b">goodbye</baz>
</bar>
<bar attr="12">other</bar>
</foo>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate01.xml
Index: predicate01.xml
===================================================================
<?xml version="1.0"?>
<doc>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a>
</doc>