[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:15:28 +0100
Re:  Conditional extraction of data
-- 
Bryan Rasmussen
sorry, I was under the impression that tag2 would always be text, and that text
would be having the default text() template.


Quoting David Carlisle <davidc@xxxxxxxxx>:

> 
> > This is just a personal preference though. 
> 
> Not really, as it produces a different result. Sometimes you need one
> of those results and sometimes the other.
> 
> you have
> 
> <xsl:template match="tag2" mode="copier">
> <i><xsl:apply-templates/></i>
> </xsl:template> 
> 
> which means tag2 gets turned into i but the contents of tag2 are not
> copied they get the default mode applied (which presumably doesn't copy)
> 
> The originally proposed solution would be equivalent to
> 
> 
> <xsl:template match="tag2" mode="copier">
> <i><xsl:apply-templates mode="copier"/></i>
>                         ^^^^^^^^^^^^^
> </xsl:template> 
> 
> which would change tag2 to i but recursively copy its content (except
> for any nested tag2 elements of course).
> 
> I find that, normally, I'd want this second form.
> 
> David
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

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.