Hi Dimitri and everyone,
It now works fine.
Mind you, I understand the impacts of extreme hours ...
I tried checking the performance of your key-based approach against
David's for-each-group approach, but at 21000 nodes (sections), I still
cannot detect any difference and if there is one, it is still well under
a second. In fact, the whole process which involves reading and merging
(2 x 2) 120 source WBS files and writing 60 result WBS files, each with
over 500 nodes and 360 tasks/sections to process, takes less than 2
seconds. To get more differentiating results will involve using a very
large dataset. I wonder if the key approach would use more or less
resources than the grouping approach. I am inclined to think that on a
very large dataset, the key approach may be advantageous because of all
the group creation implied by the other approach, unless Saxon performs
some smart optimization. What do you think ?
Thank you again,
ac
Hmm, I usually reply to messages very early in the morning, possibly
sometimes feeling sleepy.
Just change in my code:
<xsl:key name="kChildren" match="section"
use="generate-id(preceding::section
[(_at_)level = current()/@level - 1]
[last()]
)"
/>
With:
<xsl:key name="kChildren" match="section"
use="generate-id(preceding::section
[(_at_)level = current()/@level - 1]
[1]
)"
/>
and now you'd be getting the correct results.
Hope this helped.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--