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

Re: Question on XSLT streaming and accumulation of val

Subject: Re: Question on XSLT streaming and accumulation of values
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Oct 2017 11:06:17 -0000
Re:  Question on XSLT streaming and accumulation of val
> On 16 Oct 2017, at 06:54, Felix Sasaki felix@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Thank you very much for your feedback, Michael and Martin.
>
> I have two other questions. First, does it matter wheter
accumulator-before() or accumulator-after()? I assume not because the metadata
values do not change before or after processing a given loop2 element.

If the value doesn't change then it doesn't really matter. Use
accumulator-before() in preference, because the rules are a bit more liberal
about exactly where it can be used.
>
> Second, I have an additional requirement to process metadata that appears at
the end of the document:
>
>>
>> For each loop2, I want to copy not the values but the whole XML tree of
document-end-metadata. Currently I am achieving this by doing two streams. a)
go through the document and gather the document-end-metadata subtree to be put
into a variable b) process the loop2 elements and add a copy of the variable
into the loop2 specific output.
>>
>> Since this requirement means copying a sub tree and not values, I assume
there is no way to achieve this with accumulators or xsl:iterate, or other
approaches?
>>

Yes, I think a two-pass approach is the only way around that.

Michael Kay
Saxonica

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.