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

Re: recursivly applying a transform to a result tree

Subject: Re: recursivly applying a transform to a result tree
From: tcn@xxxxxxxxxxxxx (Trevor Nash)
Date: Mon, 09 Apr 2001 12:59:06 GMT
Re:  recursivly applying a transform to a result tree
>But this gives the next problem that if the input already has b/c it also
>will be transformed to <d />.

One mans problem is another mans solution ;-)
In one of my applications this is precisely the behaviour I want.

> This
>I solved by using mode="tree" in the <xml:apply templates select="$tree" />
>and the
><xsl:templates match="b/c">.

Yes, that is what I would do.  This means that you can decide on a
case by case basis whether given templates may be composed or not.  I
did not follow your proposal exactly, but I suspect it did not offer
this choice?

>It works, but I'm not really charmed about the solution. I also read
>something in the XSLT1.1 spec that the result tree fragments were going to
>be removed ? But I'm not sure (I'm not getting any response from
>w3c.org so I can't look it up). If they remove this feature, I hope they
>will add a slightly more elegant way to apply templates to result tree
>fragment.

They have not removed them exactly, they just removed the distinction
between RTF and node-set.  This allows the pattern I described: before
you would have had to use an extension function such as

 <xsl:apply-templates select="saxon:node-set($tree)"/>

Regards,
Trevor Nash

 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.