dmarston 01/06/19 08:50:25
Added: test/tests/conf/predicate predicate47.xsl predicate39.xsl
predicate40.xml predicate40.xsl predicate41.xml
predicate41.xsl predicate42.xml predicate42.xsl
predicate43.xml predicate43.xsl predicate44.xml
predicate44.xsl predicate45.xml predicate45.xsl
predicate46.xml predicate46.xsl predicate47.xml
predicate39.xml
Log:
Test cases written at NIST
Revision Changes Path
1.1 xml-xalan/test/tests/conf/predicate/predicate47.xsl
Index: predicate47.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate47 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath009 in NIST suite -->
<!-- Purpose: Test a predicate that only has a math function call. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "element1[floor(2)]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate39.xsl
Index: predicate39.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate39 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath001 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "child" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select="child1[child::child2]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate40.xml
Index: predicate40.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Text from first element
<child1>Text from child1 of first element</child1>
<child2>Text from child2 of first element</child2>
</element1>
<element2>Text from second element
<child1>Text from child1 of second element</child1>
<child2>Text from child2 of second element (correct execution)</child2>
</element2>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate40.xsl
Index: predicate40.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate40 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath002 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "ancestor" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "//child2[ancestor::element2]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate41.xml
Index: predicate41.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Text from first element
<child1>Text from child1 of first element</child1>
<child2>Text from child2 of first element</child2>
</element1>
<element2>Text from second element
<child1>Text from child1 of second element</child1>
<child2>Text from child2 of second element (correct execution)</child2>
</element2>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate41.xsl
Index: predicate41.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate41 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath003 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "ancestor-or-self" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "//child2[ancestor-or-self::element2]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate42.xml
Index: predicate42.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Text from first element
<child1>Text from child1 of first element</child1>
<child2>Text from child2 of first element</child2>
</element1>
<element2>Text from second element
<child1>Text from child1 of second element</child1>
<child2 attr1="yes">Text from child2 of second element (correct
execution)</child2>
</element2>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate42.xsl
Index: predicate42.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate42 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath004 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "attribute" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "//child2[attribute::attr1]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate43.xml
Index: predicate43.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Text from first element (correct execution)<child1>
</child1><child2></child2></element1>
<element1>Text from second element
<child1>Text from child1 of second element</child1>
</element1>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate43.xsl
Index: predicate43.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate43 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath005 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "descendant-or-self" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "element1[descendant-or-self::child2]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate44.xml
Index: predicate44.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>
<child1>Test executed successfully</child1>
<child2>child2</child2>
</element1>
<element2>
<child1>Wrong node selected!!</child1>
</element2>
<element3>
<child1>Wrong node selected!!</child1>
</element3>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate44.xsl
Index: predicate44.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate44 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath006 in NIST suite -->
<!-- Purpose: Test a predicate that uses the "parent" axis. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "//child1[parent::element1]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate45.xml
Index: predicate45.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Wrong node selected!!</element1>
<element1>Test executed successfully</element1>
<element1>Wrong node selected!!</element1>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate45.xsl
Index: predicate45.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate45 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath007 in NIST suite -->
<!-- Purpose: Test a predicate that uses elaborate complex expressions -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "element1[(((((2*10)-4)+9) div 5) mod 3 )]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate46.xml
Index: predicate46.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Wrong node selected!!</element1>
<element1>Test executed successfully</element1>
<element1>Wrong node selected!!</element1>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate46.xsl
Index: predicate46.xsl
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: predicate46 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.4 -->
<!-- Creator: Carmelo Montanez --><!-- LocationPath008 in NIST suite -->
<!-- Purpose: Test a predicate that uses math functions. -->
<xsl:template match="doc">
<out>
<xsl:value-of select = "element1[(((((2*10)-4)+9) div 5) mod floor(3))]"/>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/predicate/predicate47.xml
Index: predicate47.xml
===================================================================
<?xml version="1.0"?>
<doc>
<element1>Wrong node selected!!</element1>
<element1>Test executed successfully</element1>
<element1>Wrong node selected!!</element1>
</doc>
1.1 xml-xalan/test/tests/conf/predicate/predicate39.xml
Index: predicate39.xml
===================================================================
<?xml version="1.0"?>
<doc>
<child1>Text from child1<child2></child2></child1>
</doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]