[
https://issues.apache.org/jira/browse/XALANJ-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462280
]
Kevin Cormier commented on XALANJ-2339:
---------------------------------------
I've attached a patch which fixes the problem. I changed the
BasisLibrary.referenceToNodeSet method so that it resets the iterator after
cloning. I think this was likely the intention.
In debugging this issue, I noticed that in ParameterRef.java, there is a
comment on line 103, "// The method cloneIterator() also does resetting." This
is not true, so I wonder if that code may be causing problems as well. It is
not executed when compiling the example for this issue.
> XSLTC: name()-function doesnt work properly with test-statement before
> ----------------------------------------------------------------------
>
> Key: XALANJ-2339
> URL: https://issues.apache.org/jira/browse/XALANJ-2339
> Project: XalanJ2
> Issue Type: Bug
> Components: XPath-function, XSLTC
> Affects Versions: 2.7
> Environment: JDK 1.4
> Reporter: Daniel Reuter
> Attachments: 2339.xsl, j2339.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]