Am 14.07.2017 um 09:09 schrieb Felix Sasaki felix(_at_)sasakiatcf(_dot_)com:
I want to analyse a list of transactions in XSLT 3.0 streaming mode.
Transactions should be grouped by a key which is nested inside each
transaction (see SUBITEM2.2/GROUPING-KEY below). For the grouped
transactions, there are items to count or items with numeric values to
some up, see ITEM1 and ITEM2/SUBITEM2.1.
<TRANSACTION-LIST>
<TRANSACTION>
<ITEM1> something to count </ITEM1>
<ITEM2>
<SUBITEM2.1> something to sum up</SUBITEM2.1>
<SUBITEM2.2> ...
<GROUPING-KEY>some-key</GROUPING-KEY>
</SUBITEM2.2>
</ITEM2>
</TRANSACTION> ...
</TRANSACTION-LIST>
The output should be a list as follows:
- Transaction following grouping key value 1:
Numbers of ITEM1
Sum of ITEM 2
- Transactions following grouping key value 2, 3, ...n: the same list
with other values.
See also
https://stackoverflow.com/questions/44287959/xslt-3-0-streaming-with-grouping-and-sum-accumulator/44291127#44291127
for a similar problem and some worked out code samples trying to tackle
the problem.
--~----------------------------------------------------------------
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
--~--