|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: apply-templates select question
> Just have a template that matches the IDs but doesn't do anything:
>
> <xsl:template match="Features/ID" />
>
> and give the general copy template a lower priority.
>
> James Tauber
I'm still missing an essential piece of XSL thinking somewhere, because the
closest I can come with this, using my little sample XML document, is the
following stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="Features/ID"/>
<xsl:template>
<xsl:copy>
<xsl:apply-templates select="@* | * | text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/TheRestOfTheDocument/Features">
<xsl:copy>
<xsl:apply-templates select="ID" order-by="+@Description"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
In this case the "ID" elements are properly sorted by "Description", but the
"Count" element is lost. In desperation I tried all 6 permutations of the
three template elements, to play around with the priorities, but this
permutation is the only one where the "ID" elements are sorted.
Could I get another little "nudge" in the right direction? :-)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








