RE: [xsl] XSL:Number, value attribute

Subject: RE: [xsl] XSL:Number, value attribute
From: "Chris Bowditch" <bowditch_chris@xxxxxxxxxxx>
Date: Fri, 27 Jun 2003 09:01:17 +0000
Hi Michael,

thanks for this swift response. Your answer explains a lot. The two "modes" of using xsl:number were not made clear in the books and websites I have consulted on this issue. They lead to believe value allows the default of position() to be overridden.

I was hoping to use xsl:number to process xml like;

<list seed="3" format="1.a">
<item>item 1</item>
<item>item 2
<list seed="2">
<item>sub item 1</item>
<item>sub item 2</item>
</list>
</item>
<item>item 3</item>
</list>

to get;

3. item 1
4. item 2
 4.b. sub item 1
 4.c. sub item 2
5. item 3

currently I use xsl:number for this without seed

Thanks once again for your answer

Chris

From: "Michael Kay" <mhk@xxxxxxxxx>

Using the "value" attribute of xsl:number gives you access to the number
formatting functionality of xsl:number without the node-counting
functionality. For example

<xsl:number value="7" format="i"/>

gives you "vii", regardless of where the context node is in the source
tree. This means that value can't be used with multi-level numbering (at
least in XSLT 1.0 - in 2.0 the value attribute can be a sequence of
numbers).


<snip/>


_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger



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



Current Thread