[ 
http://issues.apache.org/jira/browse/XALANC-610?page=comments#action_12367224 ] 

David Bertoni commented on XALANC-610:
--------------------------------------

I'm not sure from your description what you think the bug is.  According to the 
XSLT recommendation, a result tree fragment cannot be converted to a node set:

http://www.w3.org/TR/xslt#section-Result-Tree-Fragments:

"An operation is permitted on a result tree fragment only if that operation 
would be permitted on a string (the operation on the string may involve first 
converting the string to a number or boolean). In particular, it is not 
permitted to use the /, //, and [] operators on result tree fragments."

Since the count() function only accepts a node set argument, you cannot pass a 
result tree fragment to the count() function.

> Test with an argument that is a variable containing a temporary tree of LREs
> ----------------------------------------------------------------------------
>
>          Key: XALANC-610
>          URL: http://issues.apache.org/jira/browse/XALANC-610
>      Project: XalanC
>         Type: Bug
>     Versions: CurrentCVS
>  Environment: all
>     Reporter: Dmitry Hayes
>      Fix For: CurrentCVS

>
> <xsl:variable name="var">
>       <a>some text</a>
> </xsl:variable>
> <xsl:template match="/">
>   <out>
>     <xsl:value-of select="count($var)"/>
>   </out>
> </xsl:template>
> Instead of the "count" every function can be ( except of "string") . The 
> processor gives an output:
> XSLT Error: The expression does not evaluate to a node-set.Source tree node: 
> #do
> cument. (file:..... , pointing to the line with "xsl:value-of 
> select="count($var)"/>" )

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to