xsl-list
[Top] [All Lists]

Re: Problems sorting data

2005-07-04 07:07:41
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[(_at_)name='idstring']/string"/>
        </xsl:apply-templates>
</xsl:template>

<xsl:template match="object[(_at_)type='standard']">
    <xsl:value-of select="member[(_at_)name='idstring']"/>
    <xsl:value-of select="member[(_at_)name='id']"/>
    <xsl:value-of select="member[(_at_)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


--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>