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

Re: Problems sorting data

Subject: Re: Problems sorting data
From: Glenn Thomas Hvidsten <gth@xxxxxxxxx>
Date: Mon, 04 Jul 2005 16:07:41 +0200
glenn thomas
David Carlisle wrote:
without any nested xsl:templates?

I can't really guess what a nested template would mean.

A template within a template


<template>
	<template>
	</template>
</template>


But I considered what you said about having a template within another template was not a good thing and twisted my mind around that. So now I've got this XSLT (also added the string to the sorting, courtesy of David):


<xsl:template match="report">
    <xsl:apply-templates match="contents"/>
</xsl:template>

<xsl:template match="contents">
	<xsl:apply-templates>
		<xsl:sort select="member[@name='idstring']/string"/>
	</xsl:apply-templates>
</xsl:template>

<xsl:template match="object[@type='standard']">
    <xsl:value-of select="member[@name='idstring']"/>
    <xsl:value-of select="member[@name='id']"/>
    <xsl:value-of select="member[@name='title']"/>
</xsl:template>


This workes just the way I want it, so unless you guys can see something wrong with this I can happily get out of the office :)


GTH

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