dmarston 2002/07/09 14:43:28 Modified: test/tests/conf/copy copy10.xsl copy11.xml copy11.xsl copy10.xml Added: test/tests/conf/copy copy60.xsl copy55.xml copy55.xsl copy56.xml copy56.xsl copy57.xml copy57.xsl copy58.xml copy58.xsl copy59.xml copy59.xsl copy60.xml Log: New cases for new bugs. Also account for Erratum E27 of the XSLT Recommendation. Revision Changes Path 1.2 +8 -12 xml-xalan/test/tests/conf/copy/copy10.xsl Index: copy10.xsl =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/copy/copy10.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- copy10.xsl 15 Dec 2000 19:50:36 -0000 1.1 +++ copy10.xsl 9 Jul 2002 21:43:27 -0000 1.2 @@ -6,19 +6,15 @@ <!-- DocVersion: 19991116 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: Paul Dick --> - <!-- Purpose: Verify copy-of with a result tree fragment. Copy to element and attribute. --> + <!-- Purpose: Use copy-of to put a tree fragment under an element. --> + +<xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> - <root> - <Out> - <xsl:attribute name="attr1"> - <xsl:copy-of select="docs//d"/> - </xsl:attribute> - </Out><xsl:text>
</xsl:text> - <xsl:copy-of select="docs//d"/> - </root> + <out> + <xsl:copy-of select="docs//d"/> + <xsl:text> </xsl:text> + </out> </xsl:template> -</xsl:stylesheet> - - +</xsl:stylesheet> \ No newline at end of file 1.2 +12 -16 xml-xalan/test/tests/conf/copy/copy11.xml Index: copy11.xml =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/copy/copy11.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- copy11.xml 15 Dec 2000 19:50:36 -0000 1.1 +++ copy11.xml 9 Jul 2002 21:43:27 -0000 1.2 @@ -1,19 +1,15 @@ <?xml version="1.0"?> <docs> -<doc1> - <a level="1">A1,</a> - <b level="1">B2,</b> - <c level="1">C3,</c> -</doc1> -<doc2> - <a level="2">2-A1,</a> - <b level="2">2-B2,</b> - <c level="2">2-C3,</c> - <doc3> - <a xmlns:ped="www.ped.com" level="3"> - <b level="4">4-B2</b> - <c level="4">4-C3</c> - </a> - </doc3> -</doc2> + <d level="1"><!-- doc1 --></d> + <doc2> + <a level="2"> + <b level="3">3-B2</b> + <c level="3">3-C3</c> + <d level="3">Hello + <e level="4">Success</e> + <!-- Me, too --> + </d> + </a> + <d level="2">More</d> + </doc2> </docs> 1.2 +7 -9 xml-xalan/test/tests/conf/copy/copy11.xsl Index: copy11.xsl =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/copy/copy11.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- copy11.xsl 15 Dec 2000 19:50:36 -0000 1.1 +++ copy11.xsl 9 Jul 2002 21:43:27 -0000 1.2 @@ -6,17 +6,15 @@ <!-- DocVersion: 19991116 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: Paul Dick --> - <!-- Purpose: Verify copy-of with a nodeset. --> + <!-- Purpose: Use copy-of to put a non-tree node-set under an element. --> + +<xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> - <root> - <Out> - <xsl:attribute name="attr1"> - <xsl:copy-of select="docs//a"/> - </xsl:attribute> - </Out><xsl:text>
</xsl:text> - <xsl:copy-of select="docs//a"/> - </root> + <out> + <xsl:copy-of select="docs//d"/> + <xsl:text> </xsl:text> + </out> </xsl:template> </xsl:stylesheet> 1.2 +11 -17 xml-xalan/test/tests/conf/copy/copy10.xml Index: copy10.xml =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/copy/copy10.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- copy10.xml 15 Dec 2000 19:50:36 -0000 1.1 +++ copy10.xml 9 Jul 2002 21:43:27 -0000 1.2 @@ -1,19 +1,13 @@ <?xml version="1.0"?> <docs> -<doc1> - <a level="1">A1</a> - <b level="1">B2</b> - <c level="1">C3</c> -</doc1> -<doc2> - <a level="2">2-A1</a> - <b level="2">2-B2</b> - <c level="2">2-C3</c> - <doc3> - <a level="3">3-A1</a> - <b level="3">3-B2</b> - <c level="3">3-C3</c> - <d level="3"> Hello </d> - </doc3> -</doc2> -</docs> \ No newline at end of file + <doc2> + <a level="2"> + <b level="3">3-B2</b> + <c level="3">3-C3</c> + <d level="3">Hello + <e level="4">Success</e> + <!-- Me, too --> + </d> + </a> + </doc2> +</docs> \ No newline at end of file 1.1 xml-xalan/test/tests/conf/copy/copy60.xsl Index: copy60.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: copy60 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: David Bertoni --> <!-- Purpose: Use copy-of to put a node-set and RTF in a PI, where some members are text nodes. --> <!-- Invalid nodes (non-text) and their content should be ignored. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:variable name="rTreeFrag"> <xsl:copy-of select="/"/> </xsl:variable> <xsl:template match="doc"> <out> <xsl:processing-instruction name="pi1"> <xsl:copy-of select="node()"/> </xsl:processing-instruction> <xsl:processing-instruction name="pi2"> <xsl:copy-of select="$rTreeFrag"/> </xsl:processing-instruction> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy55.xml Index: copy55.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://example.org/defn/" xmlns:tns="http://hello.org/base" xmlns:ns1="http://hello.org/plug" xmlns:ns2="http://hello.org/types"> <types> <!-- Below: default + tns changed, ns1 unaffected, ns2 same, xsi new --> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://hello.org/types" xmlns:ns2="http://hello.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://hello.org/types"> <complexType name="Hobbies"> <sequence> <element name="name" type="tns:Name"/> <element name="detail" type="string"/> <element name="places" type="ns2:collection"/> <element name="hobby" type="ns2:vector"/> </sequence> </complexType> </schema> </types> </definitions> 1.1 xml-xalan/test/tests/conf/copy/copy55.xsl Index: copy55.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: COPY55--> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 7.5 --> <!-- Creator: Tom Amiro --> <!-- Purpose: Test copy-of identity transformation on XML with namespace nodes that redefines the default and one prefixed namespace on inner element. --> <!-- The data also has a namespace node that is re-declared exactly the same on the inner element. This redundant declaration does not have to be copied, so it isn't. --> <xsl:output method="xml" indent="yes" encoding="UTF-8"/> <xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy56.xml Index: copy56.xml =================================================================== <?xml version="1.0"?> <docs> <d level="1"><!-- doc1 --></d> <doc2> <a level="2"> <b level="3">3-B2</b> <c level="3">3-C3</c> <d level="3">Hello <e level="4">Success</e> <!-- Me, too --> </d> </a> <d level="2">More</d> </doc2> </docs> 1.1 xml-xalan/test/tests/conf/copy/copy56.xsl Index: copy56.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: copy56 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: Paul Dick --> <!-- Purpose: Use copy-of to attempt to put a node-set in an attribute. --> <!-- Invalid nodes (non-text) and their content should be ignored. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> <out> <xsl:attribute name="attr1"> <xsl:copy-of select="docs//d"/> </xsl:attribute> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy57.xml Index: copy57.xml =================================================================== <?xml version="1.0"?> <docs> <d level="1">D1</d> <doc2> <a level="2"> <b level="3">3-B2</b> <c level="3">3-C3</c> <d level="3">D3</d> </a> <d level="2">D2</d> </doc2> </docs> 1.1 xml-xalan/test/tests/conf/copy/copy57.xsl Index: copy57.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: copy57 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: David Marston --> <!-- Purpose: Use copy-of to put a node-set in an attribute, where all members are text nodes. --> <!-- Invalid nodes (non-text) and their content should be ignored. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> <out> <xsl:attribute name="attr1"> <xsl:copy-of select="docs//d/text()"/> </xsl:attribute> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy58.xml Index: copy58.xml =================================================================== <?xml version="1.0"?> <docs> <a level="1">T1<b level="2">BBBB</b>T2</a> </docs> 1.1 xml-xalan/test/tests/conf/copy/copy58.xsl Index: copy58.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: copy58 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: David Marston --> <!-- Purpose: Use copy-of to put a node-set in an attribute, where some members are text nodes. --> <!-- Invalid nodes (non-text) and their content should be ignored. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> <out> <xsl:attribute name="attr1"> <xsl:copy-of select="docs/a/node()"/> </xsl:attribute> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy59.xml Index: copy59.xml =================================================================== <?xml version="1.0"?> <doc>foo<a place="above">top-level-a</a><doc><a place="below">sub-level-a</a></doc></doc> 1.1 xml-xalan/test/tests/conf/copy/copy59.xsl Index: copy59.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: copy59 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. --> <!-- Creator: David Bertoni --> <!-- Purpose: Use copy-of to put a node-set and RTF in a comment, where some members are text nodes. --> <!-- Invalid nodes (non-text) and their content should be ignored. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:variable name="rTreeFrag"> <xsl:copy-of select="/"/> </xsl:variable> <xsl:template match="doc"> <out> <xsl:comment> <xsl:copy-of select="node()"/> </xsl:comment> <xsl:comment> <xsl:text> </xsl:text><!-- to separate delimiters --> <xsl:copy-of select="$rTreeFrag"/> </xsl:comment> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/copy/copy60.xml Index: copy60.xml =================================================================== <?xml version="1.0"?> <doc>foo<a place="above">top-level-a</a><doc><a place="below">sub-level-a</a></doc></doc>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]