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

Re: Concatenating a nodeset (set of attributes)

Subject: Re: Concatenating a nodeset (set of attributes)
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Sun, 9 Oct 2005 13:25:42 +0200
struct format number
Hi Geert,

On 10/8/05, Geert Josten <Geert.Josten@xxxxxxxxxxx> wrote:
> > The depth of the STRUC elements is arbitrary.
> If you know there is a resonable limit to the recusion depth you could do
the following:

Well, I would guess that no Table Of Contents will have 10 levels.

> <xsl:sort select="number(concat(@pos, '.', STRUCT/@pos, STRUCT/STRUCT/@pos,
> STRUCT/STRUCT/STRUCT/@pos, ...)" data-type="number" />

Very smart with making the value a real number (as opposed to an
integer). This will make the sorting work even on TOC fragments of
different depths. The only problem in this is the case of pos="14" as
opposed to pos="2". I have never used format-number before, but I
guess that this would be what it would be good for:

But this sure is unwieldy, and now we have two conditions: that the
depths is less than a certain number and that there are no more than
99 child nodes to a given structure element.

> Otherwise I would suggest a multistep process or refering to extensions..

Well, extensions I can certainly make myself, but I haven't been able
to find a multistep process to doing this. I am very curious on how to
do this.

Ragulf Pickaxe :-)

Current Thread


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.
First Name
Last Name
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.