[xsl] sorting in <xsl:apply-templates>

Subject: [xsl] sorting in <xsl:apply-templates>
From: "Fred Wells" <Fred.Wells@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Dec 2003 12:13:38 -0600
hello all,
Coming to the realization I don't understand <xsl:apply-templates> at
all.

here's my xml:
<chapters>
	<chapter title="Pop Music" seq="1" pages="1-20"
uri="0-534-59368-7_09"/>	<chapter title="Regarding 'The White
Visitation'" seq="2" pages="21-31" uri="0-534-82354-7_15"/>
	<chapter title="Picking Your Fights Carefully" seq="4"
pages="76-93" uri="0-843-71963-7_03"/>
	<chapter title="Philosophy and Religion" seq="3" pages="32-75"
uri="0-984-59754-7_02"/>
	<chapter title="Publishing Issues" seq="5" pages="94-104"
uri="0-534-59368-7_13"/>
	<chapter title="Harvesting Honey for Profit" seq="6"
pages="105-183" uri="0-454-99999-7_19"/>
</chapters>

here's the snippets of my xsl that are problematic:

		<assemblePDF>
			<xsl:apply-templates mode="assemble">
				<xsl:sort data-type="number"
select="@seq"/>
			</xsl:apply-templates>
		</assemblePDF>

	<xsl:template match="//chapter" mode="assemble">
		<document source="{@uri}" bookmark="{@title}"/>
	</xsl:template>

Now it's my understanding that this should bring back a nodelist and
that within the 'apply-templates' I should be able to sort that
nodelist. However no sorting is happening, I've gone through some
diffrent variations on this with no success. Am I looking at this way
too simply? Thanks.

-fw

Frederick Wells
Capps Digital
35 W Wacker
30th Fl.
Chicago, IL
312.220.3056
www.cappsdigital.com

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


Current Thread