dmarston    00/12/15 11:50:46

  Added:       test/tests/conf/copy copy17.xsl copy01.xsl copy02.xml
                        copy02.xsl copy03.xml copy03.xsl copy04.xml
                        copy04.xsl copy05.xml copy05.xsl copy06.xml
                        copy06.xsl copy07.xml copy07.xsl copy08.xml
                        copy08.xsl copy09.xml copy09.xsl copy10.xml
                        copy10.xsl copy11.xml copy11.xsl copy12.xml
                        copy12.xsl copy13.xml copy13.xsl copy14.xml
                        copy14.xsl copy15.xml copy15.xsl copy16.xml
                        copy16.xsl copy17.xml copy01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/copy/copy17.xsl
  
  Index: copy17.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY17 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Purpose: Test for identity transformation exactly as in spec. -->
  
  <xsl:template match="/">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy01.xsl
  
  Index: copy01.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY01 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for simple identity transformation with template match 
-->                
  
  <xsl:template match="/">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="*|@*|comment()|processing-instruction()|text()">
    <xsl:copy>
      <xsl:apply-templates 
select="*|@*|comment()|processing-instruction()|text()"/>
    </xsl:copy>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy02.xml
  
  Index: copy02.xml
  ===================================================================
  <?xml version="1.0"?> 
  <OL>
    <LI>item1</LI>
    <LI>item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>subitem1</LI>
      <LI>subitem2</LI>
      <OL>
        <LI>subitem3</LI>
      </OL>
    </OL>
  </OL>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy02.xsl
  
  Index: copy02.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for simple tree copy, in main template via copy-of 
naming the document element -->                
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="OL"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy03.xml
  
  Index: copy03.xml
  ===================================================================
  <?xml version="1.0"?> 
  <OL>
    <LI>item1</LI>
    <LI>item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>subitem1</LI>
      <LI>subitem2</LI>
      <OL>
        <LI>subitem3</LI>
      </OL>
    </OL>
  </OL>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy03.xsl
  
  Index: copy03.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY03 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Use identity transformation to put document tree into result 
tree fragment,
     then use xsl:copy-of to move to result -->                
  
  <xsl:template match="/">
    <xsl:variable name="var1">
      <xsl:apply-templates/>
    </xsl:variable>
    <out>
      <xsl:copy-of select="$var1"/>
    </out>
  </xsl:template>
  
  <xsl:template match="*|@*|comment()|processing-instruction()|text()">
    <xsl:copy>
      <xsl:apply-templates 
select="*|@*|comment()|processing-instruction()|text()"/>
    </xsl:copy>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy04.xml
  
  Index: copy04.xml
  ===================================================================
  <?xml version="1.0"?> 
  <fonts>
  <b>
  <font face="Arial">item3</font>
  </b>
  <i>
  <font face="Default Serif" size="18">item4</font>
  </i>
  </fonts>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy04.xsl
  
  Index: copy04.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY04 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Purpose: Test for copy-of whole tree via wildcard pattern -->
    <!-- Creator: Paul Dick -->
    <!-- This test also checks handling of attributes by copy-of. -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy05.xml
  
  Index: copy05.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <foo>a</foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy05.xsl
  
  Index: copy05.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY05 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test copy-of a string constant -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="'test'"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy06.xml
  
  Index: copy06.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <foo>a</foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy06.xsl
  
  Index: copy06.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY06 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for copy-of a number -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="32"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy07.xml
  
  Index: copy07.xml
  ===================================================================
  <?xml version="1.0"?>
  <data>
  <histogram misc="0" name="load-times" type="int"/>
  <INPUT type="text" OnDBLClick="retreive( )" 
testapos="JSFunction('val1','val2')"/> 
  </data>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy07.xsl
  
  Index: copy07.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for copying attributes from source to result tree -->    
            
  
  <xsl:template match="data">
    <out>
      <xsl:for-each select="*">
        <xsl:copy>
          <xsl:apply-templates select="@*|node()|text()"></xsl:apply-templates>
        </xsl:copy>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  <xsl:template match="@*">
    <xsl:attribute name="{name(.)}">
      <xsl:value-of select="."/>
    </xsl:attribute>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy08.xml
  
  Index: copy08.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc></doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy08.xsl
  
  Index: copy08.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 Using values of variables and parameters with 
xsl:copy-of. -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test of passing HTML to a named template. -->
  
  <xsl:template match="/">
    <out>
      <xsl:call-template name="format">
        <xsl:with-param name="nodetext">Please <b>BOLD THIS</b> 
now.</xsl:with-param>
      </xsl:call-template>
    </out>               
  </xsl:template>
  
  <xsl:template name="format">
    <xsl:param name="nodetext">bla bla bla</xsl:param>
    <xsl:copy-of select="$nodetext"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy09.xml
  
  Index: copy09.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <root xmlns:ped="http://ped.test.com";>
     <Out xmlns:ns0="http://www.ns0.com"; ns0:Attr0="Hello" Attr1="Whatsup" 
ped:Attr2="Goodbye"/>
     <Out2 xmlns:bdd="http://bdd.test.com";>
        <Out3 xmlns:jad="http://jad.test.com"/>
     </Out2>
  </root>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy09.xsl
  
  Index: copy09.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY09 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for xsl:copy-of with nodeset. Shows handling of 
namespaces. -->                
  
  <xsl:output indent="yes"/>
  
  <xsl:template match="/">
    <root>
      <xsl:apply-templates/>
    </root>
  </xsl:template>
  
  <xsl:template match="*">
    <xsl:copy-of select="*|@*"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy10.xml
  
  Index: copy10.xml
  ===================================================================
  <?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> 
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy10.xsl
  
  Index: copy10.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: copy10 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- 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. -->
  
  <xsl:template match="/">
    <root>
     <Out>
        <xsl:attribute name="attr1">
          <xsl:copy-of select="docs//d"/>
        </xsl:attribute>  
     </Out><xsl:text>&#010;</xsl:text>
     <xsl:copy-of select="docs//d"/>
    </root>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy11.xml
  
  Index: copy11.xml
  ===================================================================
  <?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>
  </docs>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy11.xsl
  
  Index: copy11.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: copy11 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. 
-->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Verify copy-of with a nodeset. -->
  
  <xsl:template match="/">
    <root>
      <Out>
         <xsl:attribute name="attr1">
           <xsl:copy-of select="docs//a"/>
         </xsl:attribute>  
      </Out><xsl:text>&#010;</xsl:text>
      <xsl:copy-of select="docs//a"/>
    </root>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy12.xml
  
  Index: copy12.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <foo>a</foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy12.xsl
  
  Index: copy12.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: copy12 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 1999116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for copy-of with boolean constant -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="true()"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy13.xml
  
  Index: copy13.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <b>
      <!-- set a font this time -->
      <font face="Arial">item3</font>
    </b>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy13.xsl
  
  Index: copy13.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY13 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for copy-of with '*' wildcard pattern -->
    <!-- This test also checks handling of comments by copy-of. -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy14.xml
  
  Index: copy14.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <b>
      <?a-pi some data?>
      <font face="Arial">item3</font>
    </b>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy14.xsl
  
  Index: copy14.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY14 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for copy-of with '*' wildcard pattern -->
    <!-- This test also checks handling of processing instructions by copy-of. 
-->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy15.xml
  
  Index: copy15.xml
  ===================================================================
  <?xml version="1.0"?> 
  <OL>
    <LI>item1</LI>
    <LI>item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>yes1</LI>
      <LI>me2</LI>
      <OL>
        <LI>subsubitem</LI>
      </OL>
    </OL>
  </OL>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy15.xsl
  
  Index: copy15.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY15 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for-each inside xsl:copy -->                
  
  <xsl:template match="/">
    <out>
      <xsl:copy>
        <xsl:for-each select="OL/OL/LI">
          <xsl:value-of select="."/>
        </xsl:for-each>
      </xsl:copy>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy16.xml
  
  Index: copy16.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE t04 [
    <!ELEMENT main (a*)>
    <!ELEMENT a (#PCDATA)>
    <!ATTLIST a id ID #REQUIRED>
    <!ELEMENT b (#PCDATA)>
  ]>
  <main>
    <a id="w">W</a>
    <a id="x">X</a>
    <a id="y">Y</a>
    <a id="z">Z</a>
    <b>y</b>
    <b>w</b>
    <b>x</b>
  </main>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy16.xsl
  
  Index: copy16.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: COPY16 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Use id(node-set) to try to create a set of nodes in random 
order.
        Either id() or xsl:copy is arranging them in document order. -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy>
        <xsl:apply-templates select="id(main/b)"/>
      </xsl:copy>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy17.xml
  
  Index: copy17.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <OL>
    <LI>item1</LI>
    <LI attrib="2">item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>subitem1</LI>
      <LI attrib="2">subitem2</LI>
      <!-- Now go deeper -->
      <OL>
        <LI>subitem3</LI>
      </OL>
    </OL>
    <?a-pi some data?>
  </OL>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy01.xml
  
  Index: copy01.xml
  ===================================================================
  <?xml version="1.0"?> 
  <OL>
    <LI>item1</LI>
    <LI>item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>subitem1</LI>
      <LI>subitem2</LI>
      <OL>
        <LI>subitem3</LI>
      </OL>
    </OL>
  </OL>
  
  
  

Reply via email to