Re: [xsl] Re: sum() over attributes is 0

Subject: Re: [xsl] Re: sum() over attributes is 0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 22 Aug 2007 21:27:17 +0100
><xsl:comment>
>   <xsl:text>count: </xsl:text>
>   <xsl:value-of select="count(//lc:container[lc:item]/@select)"/>
></xsl:comment>
>
><!--count: 0-->
>
>but both count(lc:container[lc:item]/@select) and 
>count(.//lc:container[lc:item]/@select) work.
>
I agree with Ken that looks like a bug.

In XSLT1, count(//foo) should always be at greater than or equal to
count(foo) 

So it can't happen that the first of these is zero and the second is not.

As it happens, in XSLT2 count(//foo) may be not be greater than
count(foo), but in that case it will generate an error rather than
return a number such as zero.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread