[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How do I do this?

Subject: Re: How do I do this?
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 21 Aug 2002 14:40:54 -0600 (MDT)
Re:  How do I do this?
Wendell Piez wrote:
> Soumen,
> 
> It would be easier if instead of a "for-each" instruction, you simply had 
> an <xsl:apply-templates/> there and then a template specifically for the 
> <param/> elements, as in:
> 
> <xsl:template match="param">
>    <xsl:text>{</xsl:text>
>    <xsl:number/>
>    <xsl:text>}</xsl:text>
> </xsl:template>

Oh yeah, xsl:number :) But I think he wants numbering to start at zero.

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?

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.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.