xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmars...@apache.org
Subject cvs commit: xml-xalan/test/tests/conf/impincl impincl29.xsl impincl28.xsl impincl29.xml impincl28.xml
Date Wed, 20 Nov 2002 23:03:55 GMT
dmarston    2002/11/20 15:03:55

  Added:       test/tests/conf/impincl impincl29.xsl impincl28.xsl
                        impincl29.xml impincl28.xml
  Log:
  Better coverage of apply-imports
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/impincl/impincl29.xsl
  
  Index: impincl29.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: impincl29 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 5.6 Overriding Template Rules -->
    <!-- Creator: David Marston -->
    <!-- Purpose: See what happens to apply-imports when there is a param stack in place
on the
      upper apply-templates, but no xsl:param to receive p1 until we get to the import. -->
  
  <xsl:import href="fragments/impwparam.xsl"/>
  
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="*">
        <xsl:with-param name="p1" select="'top'"/>
      </xsl:apply-templates>
    </out>
  </xsl:template>
  
  <xsl:template match="tag">
    <div>
      <xsl:apply-imports/>
    </div>
  </xsl:template>
  
  <!-- No template for "bag" here, so it will use the one in the imported file. -->
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/impincl/impincl28.xsl
  
  Index: impincl28.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: impincl28 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 5.6 Overriding Template Rules -->
    <!-- Creator: David Marston -->
    <!-- Purpose: See what happens to apply-imports when there is a param stack in place.
-->
  
  <xsl:import href="fragments/impwparam.xsl"/>
  
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="*">
        <xsl:with-param name="p1" select="'top'"/>
      </xsl:apply-templates>
    </out>
  </xsl:template>
  
  <xsl:template match="tag">
    <xsl:param name="p1" select="'fallback'"/>
    <main-t><xsl:value-of select="$p1"/></main-t>
    <div>
      <xsl:apply-imports/>
    </div>
  </xsl:template>
  
  <!-- No template for "bag" here, so it will use the one in the imported file. -->
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/impincl/impincl29.xml
  
  Index: impincl29.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <tag>Example of apply-imports</tag>
    <bag>Example of apply-templates</bag>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/impincl/impincl28.xml
  
  Index: impincl28.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <tag>Example of apply-imports</tag>
    <bag>Example of apply-templates</bag>
  </doc>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message