Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2339

XSLTC: name()-function doesnt work properly with test-statement before

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7.1
    • XPath-function, XSLTC
    • None
    • JDK 1.4
    • PatchAvailable

    Description

      XML:
      <?xml version="1.0" encoding="UTF-8"?>
      <test>
      <sub>
      <value>test</value>
      </sub>
      <test>

      XSL:
      <xsl:template match="test">
      <xsl:call-template name="subtemplate">
      <xsl:with-param name="nodeSet" select="sub"/>
      </xsl:call-template>
      </xsl:template>

      <xsl:template name="subtemplate">
      <xsl:param name="nodeSet"/>
      <xsl:if test="$nodeSet">
      Name=<xsl:value-of select="name($nodeSet)"/>
      </xsl:if>
      </xsl:template>

      The name()-function in the "subtemplate" doesnt work properly. Without the former test-statement, the function writes the correct name of the node ("sub"). The Bug only appears with XSLTC activated.

      Attachments

        1. 2339.xsl
          0.6 kB
          Daniel Reuter
        2. j2339.patch
          0.6 kB
          Kevin Cormier

        Activity

          People

            kcormier Kevin Cormier
            reuda Daniel Reuter
            Henry Zongaro Henry Zongaro
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: