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...@apache.org on 2001/01/11 22:50:20 UTC

cvs commit: xml-xalan/test/tests/conf/copy htmllat1.dtd copy18.xsl copy19.xml copy19.xsl copy20.xml copy20.xsl copy21.xml copy21.xsl copy22.xml copy22.xsl copy23.xml copy23.xsl ent21.xml ent22.xml copy18.xml

dmarston    01/01/11 13:50:19

  Added:       test/tests/conf/copy htmllat1.dtd copy18.xsl copy19.xml
                        copy19.xsl copy20.xml copy20.xsl copy21.xml
                        copy21.xsl copy22.xml copy22.xsl copy23.xml
                        copy23.xsl ent21.xml ent22.xml copy18.xml
  Log:
  New tests for string handling, including characters >x7F.
  Thanks to Gertjan van Son for the new union test case.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/copy/htmllat1.dtd
  
  Index: htmllat1.dtd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- Portions (C) International Organization for Standardization 1986
       Permission to copy in any form is granted for use with
       conforming SGML systems and applications as defined in
       ISO 8879, provided this notice is included in all copies.
  -->
  <!-- Character entity set. Typical invocation:
       <!ENTITY % HTMLlat1 PUBLIC
         "-//W3C//ENTITIES Latin 1//EN//HTML">
       %HTMLlat1;
  -->
  
  <!ENTITY nbsp   "&#160;" >
  <!ENTITY iexcl  "&#161;" >
  <!ENTITY cent   "&#162;" >
  <!ENTITY pound  "&#163;" >
  <!ENTITY curren "&#164;" >
  <!ENTITY yen    "&#165;" >
  <!ENTITY brvbar "&#166;" >
  <!ENTITY sect   "&#167;" >
  <!ENTITY uml    "&#168;" >
  <!ENTITY copy   "&#169;" >
  <!ENTITY ordf   "&#170;" >
  <!ENTITY laquo  "&#171;" >
  <!ENTITY not    "&#172;" >
  <!ENTITY shy    "&#173;" >
  <!ENTITY reg    "&#174;" >
  <!ENTITY macr   "&#175;" >
  <!ENTITY deg    "&#176;" >
  <!ENTITY plusmn "&#177;" >
  <!ENTITY sup2   "&#178;" >
  <!ENTITY sup3   "&#179;" >
  <!ENTITY acute  "&#180;" >
  <!ENTITY micro  "&#181;" >
  <!ENTITY para   "&#182;" >
  <!ENTITY middot "&#183;" >
  <!ENTITY cedil  "&#184;" >
  <!ENTITY sup1   "&#185;" >
  <!ENTITY ordm   "&#186;" >
  <!ENTITY raquo  "&#187;" >
  <!ENTITY frac14 "&#188;" >
  <!ENTITY frac12 "&#189;" >
  <!ENTITY frac34 "&#190;" >
  <!ENTITY iquest "&#191;" >
  <!ENTITY Agrave "&#192;" >
  <!ENTITY Aacute "&#193;" >
  <!ENTITY Acirc  "&#194;" >
  <!ENTITY Atilde "&#195;" >
  <!ENTITY Auml   "&#196;" >
  <!ENTITY Aring  "&#197;" >
  <!ENTITY AElig  "&#198;" >
  <!ENTITY Ccedil "&#199;" >
  <!ENTITY Egrave "&#200;" >
  <!ENTITY Eacute "&#201;" >
  <!ENTITY Ecirc  "&#202;" >
  <!ENTITY Euml   "&#203;" >
  <!ENTITY Igrave "&#204;" >
  <!ENTITY Iacute "&#205;" >
  <!ENTITY Icirc  "&#206;" >
  <!ENTITY Iuml   "&#207;" >
  <!ENTITY ETH    "&#208;" >
  <!ENTITY Ntilde "&#209;" >
  <!ENTITY Ograve "&#210;" >
  <!ENTITY Oacute "&#211;" >
  <!ENTITY Ocirc  "&#212;" >
  <!ENTITY Otilde "&#213;" >
  <!ENTITY Ouml   "&#214;" >
  <!ENTITY times  "&#215;" >
  <!ENTITY Oslash "&#216;" >
  <!ENTITY Ugrave "&#217;" >
  <!ENTITY Uacute "&#218;" >
  <!ENTITY Ucirc  "&#219;" >
  <!ENTITY Uuml   "&#220;" >
  <!ENTITY Yacute "&#221;" >
  <!ENTITY THORN  "&#222;" >
  <!ENTITY szlig  "&#223;" >
  <!ENTITY agrave "&#224;" >
  <!ENTITY aacute "&#225;" >
  <!ENTITY acirc  "&#226;" >
  <!ENTITY atilde "&#227;" >
  <!ENTITY auml   "&#228;" >
  <!ENTITY aring  "&#229;" >
  <!ENTITY aelig  "&#230;" >
  <!ENTITY ccedil "&#231;" >
  <!ENTITY egrave "&#232;" >
  <!ENTITY eacute "&#233;" >
  <!ENTITY ecirc  "&#234;" >
  <!ENTITY euml   "&#235;" >
  <!ENTITY igrave "&#236;" >
  <!ENTITY iacute "&#237;" >
  <!ENTITY icirc  "&#238;" >
  <!ENTITY iuml   "&#239;" >
  <!ENTITY eth    "&#240;" >
  <!ENTITY ntilde "&#241;" >
  <!ENTITY ograve "&#242;" >
  <!ENTITY oacute "&#243;" >
  <!ENTITY ocirc  "&#244;" >
  <!ENTITY otilde "&#245;" >
  <!ENTITY ouml   "&#246;" >
  <!ENTITY divide "&#247;" >
  <!ENTITY oslash "&#248;" >
  <!ENTITY ugrave "&#249;" >
  <!ENTITY uacute "&#250;" >
  <!ENTITY ucirc  "&#251;" >
  <!ENTITY uuml   "&#252;" >
  <!ENTITY yacute "&#253;" >
  <!ENTITY thorn  "&#254;" >
  <!ENTITY yuml   "&#255;" >
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy18.xsl
  
  Index: copy18.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  <!-- FileName: copy18 -->
  <!-- Document: http://www.w3.org/TR/xslt -->
  <!-- DocVersion: 1999116 -->
  <!-- Section: 11.3 -->
  <!-- Creator: Gertjan van Son -->
  <!-- Purpose: Test for copy-of with union of attribute nodes. -->
  
  <xsl:template match="TEST">
     <xsl:element name="out">
        <xsl:apply-templates/>
     </xsl:element>
  </xsl:template>
  
  <xsl:template match="ELEMENT">
     <xsl:element name="item">
        <xsl:copy-of select="@x|@z"/>
     </xsl:element>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy19.xml
  
  Index: copy19.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc></doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy19.xsl
  
  Index: copy19.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
  <!DOCTYPE HTMLlat1 SYSTEM "HTMLlat1.dtd">
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: copy19 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test copy-of a string constant containing character entity -->
  
  <xsl:output method="xml" encoding="ISO-8859-1"/>
  <!-- With this output encoding, should get one byte of xE8 for the &egrave -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="'abcd&egrave;fgh'"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy20.xml
  
  Index: copy20.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc></doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy20.xsl
  
  Index: copy20.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
  <!DOCTYPE HTMLlat1 SYSTEM "HTMLlat1.dtd">
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: copy20 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test copy-of a string constant containing character entity -->
  
  <xsl:output method="xml" encoding="UTF-8"/>
  <!-- With this output encoding, should get two bytes (xC3,xA6) for the &aelig -->
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="'abcd&aelig;fgh'"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy21.xml
  
  Index: copy21.xml
  ===================================================================
  <?xml version="1.0" standalone="no" ?>
  <!DOCTYPE test [ 
    <!ENTITY extEnt SYSTEM "ent21.xml">
    ]>
  
  <test>&extEnt;</test>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy21.xsl
  
  Index: copy21.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: copy21 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Creator: David Marston -->
    <!-- Section: 7.5 -->
    <!-- Purpose: Ensure that external entity reference works in copy. -->
  
  <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/copy22.xml
  
  Index: copy22.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <!DOCTYPE test [ 
    <!ENTITY extEnt SYSTEM "ent22.xml">
    ]>
  
  <test>abcd&extEnt;fgh</test>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy22.xsl
  
  Index: copy22.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: copy22 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Creator: David Marston -->
    <!-- Section: 7.5 -->
    <!-- Purpose: Ensure that external entity reference with high-byte character works in copy. -->
  
  <xsl:output method="xml" encoding="ISO-8859-1"/>
  <!-- With this output encoding, should get one byte of xBE for the &frac34 -->
  
  <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/copy23.xml
  
  Index: copy23.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <simple>abcde</simple>
    <coded>ab<![CDATA[<P>&nbsp;</P>]]>de</coded>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy23.xsl
  
  Index: copy23.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: copy23 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.3 -->
    <!-- Purpose: Test for copy-of text nodes including CDATA. -->
    <!-- Creator: David Marston -->
  
  <xsl:output method="xml" encoding="UTF-8"/>
  
  <xsl:template match="/">
    <out>
      <xsl:copy-of select="doc"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/copy/ent21.xml
  
  Index: ent21.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?>
  <extEnt attr="x"><sub2>z</sub2></extEnt>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/ent22.xml
  
  	<<Binary file>>
  
  
  1.1                  xml-xalan/test/tests/conf/copy/copy18.xml
  
  Index: copy18.xml
  ===================================================================
  <?xml version="1.0"?>
  <TEST RELEASE="R6.0">
    <ELEMENT x="100000"/>
    <ELEMENT x="2" y="3" z="4"/>
    <ELEMENT x="33333"/>
  </TEST>