[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How do I do this?


Subject: Re: [xsl] How do I do this?
From: David N Bertoni/Cambridge/IBM <david_n_bertoni@xxxxxxxxxx>
Date: Wed, 21 Aug 2002 16:17:48 -0700




> By the way, why does adding format="{{1}}" produce the number enclosed in
> single curly braces unless the number is 0, while format="{1}" seems to
be no
> different than format="1"? format="[1]" works as expected, so what rule
in the
> spec am I overlooking?

The format attribute is an AVT, so you need {{1}} to get {1}.

> And why is <xsl:number/> treated differently
> than <xsl:number value="position()"/> (at least with Saxon)?
> I thought value="position()" was the default.
> The spec says "If no value attribute is specified, xsl:number determines
a
> sequence number based on the position of the curent node in the source
> document", which I think is rather ambiguous since a current node has no
> position except with respect to the current node list. XSLT 2.0 currently
says
> "...based on the position of the context node within its containing
document"
> which is no more helpful.

You're right, it does seem vague, or least it's mixing terminology.  I've
always interpreted this as the position in the document (as in document
order).  Does that make sense?  Perhaps a more explicit and long-winded
description would be better?

Dave


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



Current Thread
Keywords