sboag       01/06/22 22:29:44

  Added:       test/tests/conf/position position80.xml position80.xsl
  Log:
  Regression test for bug reported by Norm Walsh (Bugzilla Bug 2275 Xalan 
doesn't fire the right templates).
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/position/position80.xml
  
  Index: position80.xml
  ===================================================================
  <article class="whitepaper" status="Note">
  <articleinfo>
  <title>XXX</title>
  </articleinfo>
  
  <section id="intro"><title>Introduction</title>
  
  <para>...</para>
  
  </section>
  
  <section><title>YYY</title>
  
  <para>...</para>
  
  <section revisionflag="added"><title>ZZZ</title>
  
  <para>This is the section titled "ZZZ".</para>
  
  </section>
  </section>
  
  </article>
  
  
  
  1.1                  xml-xalan/test/tests/conf/position/position80.xsl
  
  Index: position80.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                  version="1.0">
  
    <!-- FileName: position80 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.2 -->
    <!-- Purpose: Ensure last() is working with unionpaths of ancestors. -->
    <!-- Author: Scott Boag -->
  
  <xsl:template match="/">
    <out>
        <xsl:for-each select="//section/title">
  
          <xsl:for-each select="(ancestor::section
                                                        |ancestor::simplesect
                                                        |ancestor::sect1
                                                        |ancestor::sect2
                                                        |ancestor::sect3
                                                        |ancestor::sect4
                                                        
|ancestor::sect5)[last()]">
                <name><xsl:value-of select="name(.)"/></name>
          </xsl:for-each>
        </xsl:for-each>
    </out>
  </xsl:template>
  
  
  </xsl:stylesheet>
  
  
  

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

Reply via email to