RE: apply-templates select question

Subject: RE: apply-templates select question
From: "Hunter, David" <dhunter@xxxxxxxxxxxx>
Date: Tue, 15 Jun 1999 14:57:57 -0400
> 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="";>

  <xsl:template match="Features/ID"/>

      <xsl:apply-templates select="@* | * | text()"/>

  <xsl:template match="/TheRestOfTheDocument/Features">
      <xsl:apply-templates select="ID" order-by="+@Description"/>


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:

Current Thread