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

Re: suggestion: xsl:modified-copy

Subject: Re: suggestion: xsl:modified-copy
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 1 Aug 2012 11:57:39 +0100
Re:  suggestion: xsl:modified-copy
>> Again, that's
>
> <xsl:apply-templates select="foo" mode="m">
> <xsl:mode name="m" on-no-match="shallow-copy"/>
> <xsl:template mode="m" match="baz">
>   <xsl:next-match/>
>   <baz/>
> </xsl:template>
>
> I think it needs a more convincing use case.

Yeah the new xsl:mode looks good.  My particular use case this morning
is that I wanted it to be doable from within a template.  What you've
got above there is all in one place, however in reality the xsl:mode
and xsl:template would be in different places to the apply-templates.

The other benefit to being self contained is that it's likely to be
more intuitive than the identity template and the above, and it's a
bit more concise.

Regarding optimisation, I'm guessing it could be designed easily
enough to be "guaranteed streamable"... something the alternative
approaches might not be (or harder to ensure they are from a
developers perspective - is that right?)


-- 
Andrew Welch
http://andrewjwelch.com

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.