[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
apply templates select
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.