Update of /cvsroot/mvp-xml/EXSLT/v2/test/ExsltTest/tests/EXSLT/Sets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14178/v2/test/ExsltTest/tests/EXSLT/Sets Added Files: difference.xslt distinct.xslt has-same-node.xslt intersection.xslt leading.xslt source.xml trailing.xslt Log Message: --- NEW FILE: intersection.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:intersection(set/*, set/foo[@bar])"/> </test1> <test2> <xsl:copy-of select="set:intersection(set/*, set/*)"/> </test2> <test3> <xsl:copy-of select="set:intersection(/no/such/nodes, set/foo[@bar])"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: trailing.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:trailing(set/*, set/foo[.=3])"/> </test1> <test2> <xsl:copy-of select="set:trailing(set/*, set)"/> </test2> <test3> <xsl:copy-of select="set:trailing(set/*, /no/such/nodes)"/> </test3> <test4> <xsl:copy-of select="set:trailing(/no/such/nodes, set/*)"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: distinct.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:distinct(orders/order/product)"/> </test1> <test2> <xsl:copy-of select="set:distinct(set/*)"/> </test2> <test3> <xsl:copy-of select="set:distinct(/no/such/nodes)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="leading.xslt"?> <data> <set> <foo bar="baz">1</foo> <foo>2</foo> <foo bar="baz">3</foo> <foo>4</foo> <foo bar="baz">5</foo> </set> <orders> <order date="2003-12-12"> <product>Dress Shirt</product> <size>M</size> <color>Blue</color> <quantity>10</quantity> </order> <order date="2003-12-20"> <product>Dress Shirt</product> <size>XL</size> <color>White</color> <quantity>5</quantity> </order> <order date="2003-12-25"> <product>Geeky TShirt</product> <size>XL</size> <color>Black</color> <quantity>30</quantity> </order> </orders> </data> --- NEW FILE: has-same-node.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:has-same-node(set/*, set/foo)"/> </test1> <test2> <xsl:copy-of select="set:has-same-node(set/foo[not(@bar)], set/foo[@bar])"/> </test2> <test3> <xsl:copy-of select="set:has-same-node(set/*, /no/such/nodes)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: difference.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:difference(set/*, set/foo[@bar])"/> </test1> <test2> <xsl:copy-of select="set:difference(set/*, set/*)"/> </test2> <test3> <xsl:copy-of select="set:difference(/no/such/nodes, set/foo[@bar])"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: leading.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:leading(set/*, set/foo[.=3])"/> </test1> <test2> <xsl:copy-of select="set:leading(set/*, set)"/> </test2> <test3> <xsl:copy-of select="set:leading(set/*, /no/such/nodes)"/> </test3> <test4> <xsl:copy-of select="set:leading(/no/such/nodes, set/*)"/> </test4> </out> </xsl:template> </xsl:stylesheet> |