Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Problems sorting data

From: Glenn Thomas Hvidsten <gth@--------->
To:
Date: 7/4/2005 2:47:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent