dmarston    00/12/15 14:56:10

  Added:       test/tests/conf/output/err outputerr14.xsl outputerr01.xsl
                        outputerr02.xml outputerr02.xsl outputerr03.xml
                        outputerr03.xsl outputerr04.xml outputerr04.xsl
                        outputerr05.xml outputerr05.xsl outputerr06.xml
                        outputerr06.xsl outputerr07.xml outputerr07.xsl
                        outputerr08.xml outputerr08.xsl outputerr09.xml
                        outputerr09.xsl outputerr10.xml outputerr10.xsl
                        outputerr11.xml outputerr11.xsl outputerr12.xml
                        outputerr12.xsl outputerr13.xml outputerr13.xsl
                        outputerr14.xml outputerr01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr14.xsl
  
  Index: outputerr14.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr14 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 16.3 Text Output Method -->
    <!-- Purpose: Attempt text output of characters above 127 when encoding 
doesn't support them. -->
    <!-- "If the result tree contains a character that cannot be represented in 
the encoding
         that the XSLT processor is using for output, the XSLT processor should 
signal an error." -->
    <!-- ExpectedException: Attempt to output character not represented in 
specified encoding. -->
  
  <xsl:output method="text" encoding="US-ASCII"/>
  
  <xsl:template match="doc">
    <xsl:apply-templates select="dat"/><xsl:text>
  </xsl:text>
  </xsl:template>
  
  <xsl:template match="dat">
    <xsl:text>&#264;</xsl:text><xsl:value-of select="."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr01.xsl
  
  Index: outputerr01.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
    <xsl:output method="html"/>
  
    <!-- FileName: outperr01 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.6.1 Generating Text with xsl:value -->
    <!-- Purpose: Test error reporting for missing required select attribute. 
-->
    <!-- ExpectedException: xsl:value-of requires a select attribute. -->
  
  <xsl:template match="/">
        <xsl:value-of/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr02.xml
  
  Index: outputerr02.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr02.xsl
  
  Index: outputerr02.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  <xsl:output method="html" 
              doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
  
    <!-- FileName: OUTPerr02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.3 Creating Processing Instructions -->
    <!-- Purpose: Try to create processing instruction without a name. -->
    <!-- ExpectedException: xsl:processing-instruction must have a name 
attribute. -->
  
  <xsl:template match="/">
   <HTML>
     <xsl:processing-instruction>href="book.css" 
type="text/css"</xsl:processing-instruction>
   </HTML>
  </xsl:template>
   
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr03.xml
  
  Index: outputerr03.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr03.xsl
  
  Index: outputerr03.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  <xsl:output method="html" 
              doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
  
    <!-- FileName: OUTPerr03 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.3 Creating Processing Instructions -->
    <!-- Purpose: Try to create processing instruction with "xml" as name. -->
    <!-- ExpectedException: processing-instruction name can not be 'xml' -->
  
  <xsl:template match="/">
   <HTML>
     <xsl:processing-instruction name="xml">href="book.css" 
type="text/css"</xsl:processing-instruction>
   </HTML>
  </xsl:template>
   
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr04.xml
  
  Index: outputerr04.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr04.xsl
  
  Index: outputerr04.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  <xsl:output method="html" 
              doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
  
    <!-- FileName: OUTPerr04 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.3 Creating Processing Instructions -->
    <!-- Purpose: Try to create processing instruction with an improper name. 
-->
    <!-- ExpectedException: java.lang.RuntimeException: processing-instruction 
name must be a valid NCName -->
  
  <xsl:template match="/">
   <HTML>
     <xsl:processing-instruction name="+">href="book.css" 
type="text/css"</xsl:processing-instruction>
   </HTML>
  </xsl:template>
   
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr05.xml
  
  Index: outputerr05.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr05.xsl
  
  Index: outputerr05.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr05 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.3 Creating Processing Instructions -->
    <!-- Purpose: Put processing-instruction at top level, which is illegal. -->
    <!-- ExpectedException: xsl:processing-instruction not allowed inside a 
stylesheet -->
    <!-- ExpectedException: (StylesheetHandler) xsl:processing-instruction not 
allowed inside a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:processing-instruction not allowed inside a stylesheet! 
-->
    
  <xsl:processing-instruction name="my-pi">href="book.css" 
type="text/css"</xsl:processing-instruction>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
   
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr06.xml
  
  Index: outputerr06.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr06.xsl
  
  Index: outputerr06.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
    <xsl:output method="html"/>
  
    <!-- FileName: OUTPerr06 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.2 Creating Text -->
    <!-- Purpose: Test for bad child in xsl:text -->
    <!-- ExpectedException: Can not add xsl:value-of to xsl:text -->
    <!-- ExpectedException: ElemTemplateElement error: Can not add xsl:value-of 
to xsl:text -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
ElemTemplateElement error: Can not add xsl:value-of to xsl:text -->
  
  <xsl:template match="/">
    <HTML>
      <BODY>
        <xsl:text disable-output-escaping="yes"><xsl:value-of select="2 + 
2"/></xsl:text>
      </BODY>
    </HTML>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr07.xml
  
  Index: outputerr07.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr07.xsl
  
  Index: outputerr07.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.1.3 Creating Attributes -->
    <!-- Purpose: Put attribute at top level, which is illegal. -->
    <!-- ExpectedException: (StylesheetHandler) xsl:attribute not allowed 
inside a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:attribute not allowed inside a stylesheet! -->
  
  <xsl:attribute name="badattr">foo</xsl:attribute>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr08.xml
  
  Index: outputerr08.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr08.xsl
  
  Index: outputerr08.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.4 Creating Comments -->
    <!-- Purpose: Put comment at top level, which is illegal. -->
    <!-- ExpectedException: (StylesheetHandler) xsl:comment not allowed inside 
a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:comment not allowed inside a stylesheet! -->
  
  <xsl:comment>boo</xsl:comment>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr09.xml
  
  Index: outputerr09.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr09.xsl
  
  Index: outputerr09.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr09 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.1.2 Creating Elements -->
    <!-- Purpose: Put element at top level, which is illegal. -->
    <!-- ExpectedException: (StylesheetHandler) xsl:element not allowed inside 
a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:element not allowed inside a stylesheet! -->
  
  <xsl:element name="elk">foo</xsl:element>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr10.xml
  
  Index: outputerr10.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr10.xsl
  
  Index: outputerr10.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr10 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.2 Creating Text -->
    <!-- Purpose: Put xsl:text at top level, which is illegal. -->
    <!-- ExpectedException: (StylesheetHandler) xsl:text not allowed inside a 
stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:text not allowed inside a stylesheet! -->
  
  <xsl:text>boo</xsl:text>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr11.xml
  
  Index: outputerr11.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr11.xsl
  
  Index: outputerr11.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: OUTPerr11 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.6.1 Generating Text -->
    <!-- Purpose: Put value-of at top level, which is illegal. -->
    <!-- ExpectedException: (StylesheetHandler) xsl:value-of not allowed inside 
a stylesheet! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: 
(StylesheetHandler) xsl:value-of not allowed inside a stylesheet! -->
  
  <xsl:value-of select="concat('f','o','o')"/>
  
  <xsl:template match="/">
   <out>This should fail</out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr12.xml
  
  Index: outputerr12.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr12.xsl
  
  Index: outputerr12.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: outperr12 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 16 -->
    <!-- Purpose: Test placement of xsl:output inside atemplate, which is 
illegal. -->
    <!-- ExpectedException: Must put xsl:output outside any template. -->
  
  <xsl:template match="/">
    <xsl:output method="html"/>
    <HTML>
    </HTML>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr13.xml
  
  Index: outputerr13.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <tag>Hello</tag>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr13.xsl
  
  Index: outputerr13.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: outperr13 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.3 Creating Processing Instructions. -->
    <!-- Purpose: Processing instruction content can't create nodes other then 
         text nodes. -->
    <!-- ExpectedException: Can not add xsl:element to 
xsl:processing-instruction -->
  
  <xsl:template match="doc/tag">
   <out>
     <xsl:processing-instruction name="mytag">
          <xsl:element name="trythis">
                <xsl:value-of select="."/>
          </xsl:element>
     </xsl:processing-instruction>
   </out>
  </xsl:template>
   
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr14.xml
  
  Index: outputerr14.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <dat>two</dat>
    <dat>222</dat>
    <dat>&#xa9;2000</dat>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/output/err/outputerr01.xml
  
  Index: outputerr01.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
  </doc>
  
  

Reply via email to