Re: [xsl] Collect data from a whole map hierarchy, then use it in a topic

Subject: Re: [xsl] Collect data from a whole map hierarchy, then use it in a topic
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Jun 2023 15:04:34 -0000
Am 6/15/2023 um 4:46 PM schrieb rick@xxxxxxxxxxxxxx:

I am still trying to find the best way to navigate through an entire
ditamap structure, collect certain data, then reprocess the map to
insert the pertinent data into one of the topics. Earlier this week I
posted code using an accumulator, but when I reprocess the map using a
different mode, it only shows the each topicbs collected data.

Did you see my suggestion to use a tunnel parameter passing in the accumulated/collected data for the processing by a different mode?

As for the currently failing attempt, consider sharing minimal but
complete samples of XML and XSLT and output you want and the one you get.

I can post my code, but I am wondering if there is a better general
purpose algorithm for doing this with XSLT 3. I am not familiar with
some of the version 3 things like iterate or folding, but I am willing
to learn the best approach to a task like this.

I am not sure there is a best approach, in the end you need to recursively process your documents and seemed to want to simply collect some elements, that can of course be done by a recursive function instead of exploiting the recursion of apply-templates and doc() processing. But I don't think there is a "best" approach you would need to find, in the end a chosen approach should lead to a satisfying result.

Current Thread