[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
> 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
|
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
|