xsl-list
[Top] [All Lists]

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

2017-10-15 14:32:34
On 15.10.2017 21:26, Felix Sasaki felix(_at_)sasakiatcf(_dot_)com 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
    <GROUP>
        <group-meta1>metainfo-group-1</group-meta1>
        <TRANSACTION>
            <transaction-meta>
<transaction-meta1>metainfo-transaction-1</transaction-meta1>
            </transaction-meta>
            <loop1>...</loop1>
            <loop2>to be done1</loop2>
            <loop2>to be done2</loop2>
        </TRANSACTION>
    </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.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>