dmarston    01/07/27 11:08:45

  Added:       test/tests/conf/position position91.xsl position91.xml
  Log:
  Another // test, using the attribute axis.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/position/position91.xsl
  
  Index: position91.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  
    <!-- FileName: position91 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.3 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Apply a predicate to a node-set full of attribute nodes.
       If there were no parentheses, we would be asking for the 7th attribute
       named "title" on each element, but there can only be one attribute of a
       particular name on each, so we'd get the empty set. -->
  
  <xsl:output method="xml" encoding="utf-8"/>
  
  <xsl:template match="chapter">
    <out>
      <xsl:text>
  </xsl:text>
      <xsl:for-each select="(section//@title)[7]">
        <noted>
          <xsl:value-of select="name(..)"/><xsl:text> </xsl:text>
          <xsl:value-of select="."/>
        </noted>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  
  1.1                  xml-xalan/test/tests/conf/position/position91.xml
  
  Index: position91.xml
  ===================================================================
  <?xml version="1.0"?> 
  <chapter title="A">
    <section title="A1">
      <subsection title="A1a">hello</subsection>
      <subsection title="A1b">ahoy</subsection>
    </section>
    <section title="A2">
      <subsection title="A2a">goodbye</subsection>
      <subsection title="A2b">sayonara</subsection>
      <subsection title="A2c">adios</subsection>
    </section>
    <section title="A3">
      <subsection title="A3a">aloha</subsection>
      <subsection title="A3b">
        <footnote>A3b-1</footnote>
        <footnote>A3b-2</footnote>
      </subsection>
      <subsection title="A3c">shalom</subsection>
    </section>
  </chapter>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to