Re: [xsl] Text Table with sorting

Subject: Re: [xsl] Text Table with sorting
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 26 Sep 2003 09:06:42 +0100
David!

> Can you use a node-set extension function? if so you would probably
> be best to sort the things first then assemble as in the following,
> which I'll write using document('') hack in case you can't use an
> extension function

You were obviously up too late last night (or have other things on
your mind, perhaps... ;) You *know* you can't use the document('')
hack with variables that are computed dynamically. If you had:

> <xsl:variable name="col1">
> <xsl:for-each select="$set1">
> <xsl:sort select="@refDate"/>
> <xsl:copy-of select="."/>
> </xsl:for-each>
> </xsl:variable>

and did:

> <xsl:variable name="sorted1" select="document('')/*/xsl:variable[@name='col1']"/>

then $sorted1 would hold the <xsl:variable> element above, which has a
<xsl:for-each> child, which isn't what you want at all...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread