Subject: Re: [xsl] Sorting help From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 23 May 2007 15:25:42 +0100 |
<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. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Sorting help, Vandna Sharma | Thread | Re: [xsl] Sorting help, Abel Braaksma |
[xsl] Sorting help, Vandna Sharma | Date | Re: [xsl] Sorting help, Abel Braaksma |
Month |