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

Re: Default rule for passing matched elements thru unc

Subject: Re: Default rule for passing matched elements thru unchanged?
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 26 Feb 2002 22:57:44 -0700 (MST)
mike brown unc
Brad Cox wrote:
> I'm baffled by how to build an xslt stylesheet that recognizes 
> specified elements while passing those not specified through 
> unchanged.

All you need to do is learn to use xsl:copy.

The identity transformation (a recursive copy of the source tree to the result
tree) is in the XSLT spec itself. Section 7.5, "Copying"

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

Add to this your templates to do special things with your special nodes, and
make sure they end with an xsl:apply-templates so that the children get
processed.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 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.