You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Ilene Seelemann (JIRA)" <xa...@xml.apache.org> on 2006/02/07 19:43:58 UTC

[jira] Commented: (XALANJ-2204) Function Count on variable modifies number of nodes in variable.

    [ http://issues.apache.org/jira/browse/XALANJ-2204?page=comments#action_12365461 ] 

Ilene Seelemann commented on XALANJ-2204:
-----------------------------------------

I've reviewed this patch and it looks good.  Note that this regression was introduced by the patch for XalanJ-1810.  There seems to be some brittleness in the code around the resetting of iterator's when cloning.

> Function Count on variable modifies number of nodes in variable.
> ----------------------------------------------------------------
>
>          Key: XALANJ-2204
>          URL: http://issues.apache.org/jira/browse/XALANJ-2204
>      Project: XalanJ2
>         Type: Bug
>   Components: transformation
>     Versions: 2.7
>     Reporter: Filippo Munafò
>     Assignee: Joanne Tong
>     Priority: Blocker
>  Attachments: patch_jira_2204.txt
>
> Transforming this XML:
> <A>
> 	<B>1</B>
> 	<B>2</B>
> </A>
> with the following XSL:
> 	<xsl:variable name="XML" select="/A"/>
> 	
> 	<xsl:template match="/">
> 		First:	
> 		<xsl:value-of select="count($XML[B=1])"/>
> 		Second:	
> 		<xsl:value-of select="count($XML[B=1])"/>
> 		Third:
> 		<xsl:value-of select="count($XML[B=1])"/>
> 	</xsl:template>
> the output is:
> 		First:	
> 		1
> 		Second:	
> 		2
> 		Third:
> 		3
> instead of:
> 		First:	
> 		1
> 		Second:	
> 		1
> 		Third:
> 		1
> Using XALAN 2.6 everithing works as it should be.
> Using:
>      xalan.jar org.apache.xalan.xslt.Process -in %1 -xsl %2 -out %3 
> instead of:
>      transformer.transform(xml, xsl)
> the result is the right one!
> Filippo

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org