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

Re: Numbering new nodes using consecutive integers

Subject: Re: Numbering new nodes using consecutive integers
From: Michael Ludwig <milu71@xxxxxx>
Date: Sat, 28 Mar 2009 10:50:53 +0100
Re:  Numbering new nodes using consecutive integers
Wendell Piez schrieb am 27.03.2009 um 15:59:24 (-0400):
> >
> > Yes, but how would you *ever* generate numbers relative to
> > the result ?!
> 
> In one pass? By doing it the way David tried and Ken (may
> have) succeeded: reflecting the grouping/ordering logic
> directly in XPath (or XSLT functions and/or, ouch, template
> calls).
> 
> In other words, not by counting anything in the result, but
> rather by expressing algorithmically the number that will be
> correct for the thing when it is made for you, in the usual
> in-XSLT-everything-happens-at-once way of thinking.

Thanks, Wendell - your words make a lot of sense. "Expressing
algorithmically the number that will be correct" - and this can
be as simple as position(), once you get the context right,
which I didn't, thus misleading everyone ... :-)

David's second try is a nice demonstration of how easy this
actually is once you step back and frame the problem correctly.

Michael Ludwig

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-2011 All Rights Reserved.