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

Re: Conditional extraction of data

Subject: Re: Conditional extraction of data
From: Bryan Rasmussen <bry@xxxxxxxxxx>
Date: Mon, 8 Nov 2004 15:03:18 +0100
Re:  Conditional extraction of data
-- 
Bryan Rasmussen



> <xsl:copy><xsl:copy-of select="@*"/>
> <xsl:apply-templates/>
> </xsl:copy>

I always prefer this way of copying, generally using a mode, on particular
namespaces or all elements. so

<xsl:template match="*" mode="copier">
<xsl:copy><xsl:copy-of select="@*"/>
<xsl:apply-templates mode="copier"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tag2" mode="copier">
<i><xsl:apply-templates/></i>
</xsl:template> 
<xsl:template math="anElement">
<xsl:apply-templates mode="copier"/>
</xsl:template>

so that everything gets copied with the copier mode, but tag2 doesn't and it
escapes the mode. This is just a personal preference though. 

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.