You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@locus.apache.org on 2000/12/15 20:51:55 UTC

cvs commit: xml-xalan/test/tests/conf/copy/err copyerr03.xsl copyerr01.xsl copyerr02.xml copyerr02.xsl copyerr03.xml copyerr01.xml

dmarston    00/12/15 11:51:55

  Added:       test/tests/conf/copy/err copyerr03.xsl copyerr01.xsl
                        copyerr02.xml copyerr02.xsl copyerr03.xml
                        copyerr01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/copy/err/copyerr03.xsl
  
  Index: copyerr03.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: COPYerr03 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.5 -->
    <!-- Purpose: Put xsl:copy at top level, which is illegal. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: (StylesheetHandler) xsl:copy not allowed inside a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:copy not allowed inside a stylesheet! -->
  
  <xsl:copy>
    <xsl:apply-templates select="*|text()"/>
  </xsl:copy>
  
  <xsl:template match="/">
    <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/err/copyerr01.xsl
  
  Index: copyerr01.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
  <xsl:output indent="yes"/>
  
    <!-- FileName: COPYerr01 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Purpose: Test for xsl:copy-of without select. -->                
    <!-- Creator: David Marston -->
    <!-- ExpectedException: xsl:copy-of requires a select attribute -->
  
  <xsl:template match="/">
    <root>
      <xsl:apply-templates/>
    </root>
  </xsl:template>
  
  <xsl:template match="*">
    <xsl:copy-of />
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/err/copyerr02.xml
  
  Index: copyerr02.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/err/copyerr02.xsl
  
  Index: copyerr02.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: COPYerr02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Purpose: Put xsl:copy-of at top level, which is illegal. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: (StylesheetHandler) xsl:copy-of not allowed inside a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:copy-of not allowed inside a stylesheet! -->
  
  <xsl:copy-of select="OL"/>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/err/copyerr03.xml
  
  Index: copyerr03.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/err/copyerr01.xml
  
  Index: copyerr01.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <root xmlns:ped="http://ped.test.com">
  </root>