xsl-list
[Top] [All Lists]

Re: [xsl] Sorting help

2007-05-23 07:26:02


<xsl:template match="@*" mode="copynode">

so when this template is activated the current node is an attribute (as
it matches @*)

            <xsl:copy>

copies the enitre attribute (including its value)

                        <xsl:apply-templates select="@*"
                        mode="copynode"/>

This will do nothing as attribute nodes never have attributes

                        <xsl:apply-templates mode="copynode"/>  

This will do nothing as attribute nodes never have child nodes.

            <xsl:for-each select="pd:Usage">
This will do nothing as attribute nodes can't have pd:Usage element children.
            <xsl:sort select="@UsagePurpose" order="descending" 
data-type="text"/>
                        </xsl:for-each>
            </xsl:copy>
</xsl:template>


I suspect that you want to move all of this code into the template that
matches eleemnts, but I couldn't tell from your descriptiuon what you
actually wanted to sort. (It woud lbe better to cut your example input
down to just 10 or so lines ((but still a well formed example) and then
show the desired output)

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

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