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 2002/08/02 23:32:09 UTC

cvs commit: xml-xalan/test/tests/conf/conflictres conflictres33.xsl conflictres31.xsl conflictres32.xml conflictres32.xsl conflictres33.xml conflictres31.xml

dmarston    2002/08/02 14:32:09

  Added:       test/tests/conf/conflictres conflictres33.xsl
                        conflictres31.xsl conflictres32.xml
                        conflictres32.xsl conflictres33.xml
                        conflictres31.xml
  Log:
  More new cases about template priorities
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres33.xsl
  
  Index: conflictres33.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: conflictres33 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 5.5 -->
    <!-- Creator: Tom Amiro -->
    <!-- Purpose: Test system allocated priorities for "node()[]" -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="/doc">
    <out>
      <xsl:apply-templates select="a"/>
    </out>
  </xsl:template>
  
  <!-- system allocated priority  0.5 -->
  <xsl:template match="node()[@x1]" >
    <xsl:text>Correct - Matched "node()[@x1]" </xsl:text>
  </xsl:template>
  
  <!-- system allocated priority 0 -->
  <xsl:template match="a">
    <xsl:text>Matched "a" </xsl:text>
  </xsl:template>
  
  <!-- system allocated priority -.5 -->
  <xsl:template match="node()" >
    <xsl:text>Matched "node()" </xsl:text>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres31.xsl
  
  Index: conflictres31.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: conflictres31-->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 5.5 -->
    <!-- Creator: Tom Amiro -->
    <!-- Purpose: Test system allocated priorities for "*[]". -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="/">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <!-- should match because priority is 0.5 -->
  <xsl:template match="*[@x1]">
    <xsl:text>Correct - Matched "*[@x1]"</xsl:text>
  </xsl:template>
  
  <!-- priority 0 -->
  <xsl:template match="a">
    <xsl:text>a: </xsl:text>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres32.xml
  
  Index: conflictres32.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc><a x1="big" /></doc>
  
  
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres32.xsl
  
  Index: conflictres32.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: conflictres32 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 5.5 -->
    <!-- Creator: Tom Amiro -->
    <!-- Purpose: Test system allocated priorities for "@*[]". -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="/">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="a">
    <xsl:text>a: </xsl:text>
    <xsl:apply-templates select="@*" />
  </xsl:template>
  
  <!-- should match because priority is 0.5 -->
  <xsl:template match="@*[name()='x1']">
    <xsl:text>Correct - Matched "@*[name()='x1']"</xsl:text>
  </xsl:template>
  
  <!-- should not match because priority is 0 -->
  <xsl:template match="@x1">
    <xsl:text>Matched "@x1"</xsl:text>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres33.xml
  
  Index: conflictres33.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc><a x1="big" /></doc>
  
  
  1.1                  xml-xalan/test/tests/conf/conflictres/conflictres31.xml
  
  Index: conflictres31.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc><a x1="big" x2="bigger"/></doc>
  
  

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