xsl-list
[Top] [All Lists]

RE: position

2004-02-14 15:49:50
This is interesting ...

The value is zero because at the point in time, according to XSLT 1.0 
Section 7.7 the <note> element isn't being processed and there are no 
preceding notes, so there is nothing to count.

But section 7.7.1 states that integers being processed are 
greater than zero.

So, I'm guessing it is incumbent on the stylesheet writer 
never to be in 
the position of getting a zero value when using <xsl:number>.  But it 
doesn't say that explicitly in the Recommendation.

Can anyone on the committee comment on this?  Are users of 
<xsl:number> 
required to use it only in situations where a positive number 
is being returned?

Erratum E23 fixes this contradiction in the spec, specifying that an
empty list is returned in this situation, not a list of length one
containing the number zero.

http://www.w3.org/1999/11/REC-xslt-19991116-errata/

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>