|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: looping through result tree fragments to aggregate
Erika,
You can certainly solve the problem by pipelining the process, as Simon says, but it may also not be necessary. In general, in XSLT 1.0 you are prevented from operating over result tree fragments (hence the name *result* tree fragments) for design reasons which have since come to be reconsidered, but which have been respected in good faith by the implementors of the engines. Most have, like MS, also provided an extension function to allow you to do this anyway (which is, along with this extension's popularity, undoubtedly a large reason why the constraint will be removed in XSLT 2). So the short answer is, "no, if you need to process over an RTF in a single pass, there's no better way than the extension function". Since this particular extension function is so widely implemented, however, it's not as harmful a dependency as some might be; you can sometimes even use a standard syntax for it (go see http://www.exslt.org). Also, depending on the original problem, sometimes you don't even need the original aggregation step, or can perform it in such a way that you can aggregate a node set, not an RTF. (One would have to see that for-each loop to know in your case. Does its operation merely collect a node set, or does it do something more complex?) If you can do this, you can process this node set; the problem goes away. XSLT also provides means for testing the availability of extension functions, which you can use to make stylesheets more portable. Cheers, Wendell At 12:31 AM 5/24/2003, Simon wrote: Use pipelined XSLT! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








