Re: [xsl] Question on XSLT streaming and accumulation of values

Subject: Re: [xsl] Question on XSLT streaming and accumulation of values
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Oct 2017 19:32:29 -0000
On 15.10.2017 21:26, Felix Sasaki felix@xxxxxxxxxxxxxx wrote:
Accidentally I sent the below mail to the wrong mail address, and inbetween found a solution to the issue: using for the accumulator
match="group-meta1/text()" select="string(.)"
In case there are other solutions, I am eager to learn about them .



I have an XML input of the following structure
B B <GROUP>
B B B B <group-meta1>metainfo-group-1</group-meta1>
B B B B <TRANSACTION>
B B B B B B <transaction-meta>
<transaction-meta1>metainfo-transaction-1</transaction-meta1>
B B B B B B </transaction-meta>
B B B B B B <loop1>...</loop1>
B B B B B B <loop2>to be done1</loop2>
B B B B B B <loop2>to be done2</loop2>
B B B B </TRANSACTION>
B B </GROUP>

I think, given the input XML, the only way to store the `group-meta1` content with a streamable accumulator is indeed to match on the text() child node as only then you can access the value. If you change or transform the XML to have e.g. <GROUP group-meta1="metainfo-group1">..., that is the value in an attribute, then you can have the match on `GROUP` and store the attribute value in the accumulator.


Current Thread