You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org> on 2006/02/21 16:08:59 UTC

[jira] Created: (XALANC-610) Test with an argument that is a variable containing a temporary tree of LREs

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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Closed: (XALANC-610) Test with an argument that is a variable containing a temporary tree of LREs

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-610?page=all ]
     
Dmitry Hayes closed XALANC-610:
-------------------------------

    Resolution: Invalid

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Re: [jira] Commented: (XALANC-610) Test with an argument that is a variable containing a temporary tree of LREs

Posted by Lonnie VanZandt <lo...@ngc.com>.
Perhaps the reporter thought they had access to an XSLT 2.0 processor where 
variables can contain node sets...

On Tuesday 21 February 2006 09:54 am, David Bertoni (JIRA) wrote:
>     [
> http://issues.apache.org/jira/browse/XALANC-610?page=comments#action_123672
>24 ]
>
> 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)"/>" )


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


[jira] Commented: (XALANC-610) Test with an argument that is a variable containing a temporary tree of LREs

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org