Subject: Re: [xsl] suggestion: xsl:modified-copy From: Andrew Welch <andrew.j.welch@xxxxxxxxx> Date: Wed, 1 Aug 2012 11:57:39 +0100 |
>> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] suggestion: xsl:modified-, Michael Kay | Thread | [xsl] XSL-List Guidelines, Tommie Usdin |
Re: [xsl] suggestion: xsl:modified-, Michael Kay | Date | [xsl] XSL-List Guidelines, Tommie Usdin |
Month |