You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/08/02 04:12:42 UTC

cvs commit: xml-xalan/test/tests/bugzilla Bugzilla2945.out Bugzilla2945.xml Bugzilla2945.xsl

sboag       01/08/01 19:12:42

  Added:       test/tests/bugzilla Bugzilla2945.out Bugzilla2945.xml
                        Bugzilla2945.xsl
  Log:
  Test for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2945
  
  I guess I have to create a Testlet for these?
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/bugzilla/Bugzilla2945.out
  
  Index: Bugzilla2945.out
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
     
     Item of main, , 
     Item of aux, , , myNode, 
  
  
  
  1.1                  xml-xalan/test/tests/bugzilla/Bugzilla2945.xml
  
  Index: Bugzilla2945.xml
  ===================================================================
  <myDoc>
     <myNode id="tools">
          <myItem>Item of tools</myItem>
     </myNode>
     <myNode id="main">
          <myItem>Item of main</myItem>
     </myNode>
     <myNode id="aux">
          <myItem>Item of aux</myItem>
     </myNode>
  </myDoc>
  
  
  
  1.1                  xml-xalan/test/tests/bugzilla/Bugzilla2945.xsl
  
  Index: Bugzilla2945.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0" 
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
       xmlns:fo="http://www.w3.org/1999/XSL/Format">
  
  
  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="myNode">
    <xsl:apply-templates select="myItem"/>
  </xsl:template>
  
  <xsl:template match="myItem">
    <xsl:variable name="nodeSet" select="ancestor::myNode[@id='main'] |ancestor::myNode[@id='aux']"/>
    <xsl:if test="$nodeSet">
      <xsl:value-of select="normalize-space($nodeSet)"/>
  	<xsl:for-each select="preceding::* | dummy">
  		<xsl:text>, </xsl:text><xsl:value-of select="name(preceding-sibling::* | dummy)"/>
  	</xsl:for-each>
    </xsl:if>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  

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