You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/01/04 22:29:45 UTC

cvs commit: xml-xalan/test/tests/api/trax/sax/impincl SimpleImport.xsl SimpleInclude.xsl

curcuru     01/01/04 13:29:45

  Added:       test/tests/api/trax/sax SAXImpIncl.xml SAXImpIncl.xsl
                        SAXTest.xml SAXTest.xsl
               test/tests/api/trax/sax/impincl SimpleImport.xsl
                        SimpleInclude.xsl
  Log:
  Stylesheet tests for SAXSourceAPITest/SAXResultAPITest
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/api/trax/sax/SAXImpIncl.xml
  
  Index: SAXImpIncl.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <doc>
    <list>
      <item>Above Should be include-list then import-list</item>
      <item match-by="import">Should be matched-by-import</item>
      <item match-by="include">Should be matched-by-include</item>
      <item match-by="main">Should be matched-by-import-also</item>
      <list>
        <item>Should be matched-by-main</item>
        <item>Should be matched-by-main</item>
      </list>
    </list>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/api/trax/sax/SAXImpIncl.xsl
  
  Index: SAXImpIncl.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <!-- FileName: SAXImpIncl.xsl -->
    <!-- Author: shane_curcuru@lotus.com -->
    <!-- Purpose: Basic import and include tests for SAXSource/SAXResult APIs. -->
  
  <xsl:import href="impincl/SimpleImport.xsl"/>
  <xsl:include href="impincl/SimpleInclude.xsl"/>
  
  <xsl:template match="doc">
   <out>
    <xsl:apply-templates/>
   </out>
  </xsl:template>
  
  <xsl:template match="list" priority="-1">
   <main-list>
    <xsl:apply-templates/>
   </main-list>
  </xsl:template>
  
  <xsl:template match="item[not(@match-by)]">
    <matched-by-main>
      <xsl:value-of select="." />
    </matched-by-main>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/api/trax/sax/SAXTest.xml
  
  Index: SAXTest.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <list>
    <item>Xalan-J 1.x</item>
    <item>Xalan-J 2.x</item>
    <item>Xalan-C 1.x</item>
    <list>
      <item>Xalan documentation</item>
      <item>Xalan tests</item>
    </list>
  </list>
  
  
  1.1                  xml-xalan/test/tests/api/trax/sax/SAXTest.xsl
  
  Index: SAXTest.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
  <!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
    <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:template>
       
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/api/trax/sax/impincl/SimpleImport.xsl
  
  Index: SimpleImport.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <!-- FileName: SimpleImport.xsl -->
    <!-- Author: shane_curcuru@lotus.com -->
    <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
  
  <xsl:template match="list">
    <import-list>
      <xsl:apply-templates/>
    </import-list>
  </xsl:template>
  
  <xsl:template match="item[@match-by='import']">
    <matched-by-import>
      <xsl:value-of select="." />
    </matched-by-import>
  </xsl:template>
  
  <xsl:template match="item">
    <matched-by-import-also>
      <xsl:value-of select="." />
    </matched-by-import-also>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/api/trax/sax/impincl/SimpleInclude.xsl
  
  Index: SimpleInclude.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <!-- FileName: SimpleInclude.xsl -->
    <!-- Author: shane_curcuru@lotus.com -->
    <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
  
  <xsl:template match="list">
    <include-list>
      <xsl:apply-imports/>
    </include-list>
  </xsl:template>
  
  <xsl:template match="item[@match-by='include']">
    <matched-by-include>
      <xsl:value-of select="." />
    </matched-by-include>
  </xsl:template>
  
  </xsl:stylesheet>