DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5996>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5996

template match worked with xalan2.2D9, fails to match with release

           Summary: template match worked with xalan2.2D9, fails to match
                    with release
           Product: XalanJ2
           Version: 2.2.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The following snippet of XSL worked in xalan2.2D9 but the select
fails to generate a match in xalan2.2 release.  The reason last() was
used was to guarantee that the match would happen only once.
i.e. we are toggling something on in the display if 1 or more
instances exist:


<xsl:template name="renderNonCriteriaButtons">
  <!-- the following select worked in xalan2.2D9 but fails
       in xalan2.2 release.  Changing [last()] below to [1]
       fixed the problem for us.  -->
  <xsl:apply-templates select="$transPath[@name='addUser'][last()]"/>
  <xsl:text>&#160;</xsl:text>
</xsl:template>

<xsl:template match="transaction[@name='addUser']">
  <a href="/km/tool/useradmin/addUser">
    <img src="/km/graphics/transAddAccount.gif"
         width="36" height="18" border="0"
         alt="Click here to add accounts"/>
  </a>
</xsl:template>

Reply via email to