xsl-list
[Top] [All Lists]

Re: Concatenating a nodeset (set of attributes)

2005-10-11 00:23:09
Even better...

:-D

Anton Triest wrote:

Just a thought - couldn't you just use multiple sort keys? Like

<xsl:template match="TOC">
 <xsl:apply-templates select="STRUCT">
   <xsl:sort select="@pos" data-type="number"/>
   <xsl:sort select="STRUCT/@pos" data-type="number"/>
   <xsl:sort select="STRUCT/STRUCT/@pos" data-type="number"/>
   <xsl:sort select="STRUCT/STRUCT/STRUCT/@pos" data-type="number"/>
   ...
 </xsl:apply-templates>
</xsl:template>

HTH!
Anton


Geert Josten 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:

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

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

HTH,
Geert



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--
Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--