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

Re: XSL Counters list order?

Subject: Re: XSL Counters list order?
From: James Clark <jjc@xxxxxxxxxx>
Date: Mon, 04 Jan 1999 09:26:04 +0700
xsl counter
Tyler Baker wrote:
> 
> In the latest XSL spec:
> 
> "Counter values are inserted using xsl:counter and xsl:counters
> elements. The name of the counter is specified with the name attribute.
> xsl:counter first constructs a list of length one containing the value
> of the named counter from the nearest ancestor in the result tree that
> has a counter with the specified name; xsl:counters first constructs a
> list containing, for each ancestor in the result tree that has a counter
> with the specified name, the value of named counter from that ancestor.
> xsl:counter and xsl:counters then convert the list of numbers into a
> string using the attributes specified in Section 2.7.10.3: Number to
> String Conversion Attributes; when used with xsl:counter and
> xsl:counters the value of each of these attributes is interpreted as an
> attribute value template."
> 
> Now what to do about xsl:counter is pretty clear.  Just format the
> number of the first ancestor in the result tree.  However, the order
> that the list of ancestors for xsl:counters is not clear to me.  Should
> the order be from first ancestor found to last ancestor found or the
> other way around.  My assumption is that the list should be first
> ancestor found, second ancestor found, etc.

The order in the list is document order (ie a parent would precede its
child).  It has to be this way for xsl:counters to be useful (you want
to be able to get numbering like 2.3.7 with nested div elements).

James


 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.