[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Best Way to Break Up Nested Structures Based On I
I tend to agree. This will leave the original code less cluttered. On
the other hand, avoiding an extra pass is also cool.
We could pass position() as a tunneled parameter from the inner grouping to the apply-templates and make IDs unique by appending this position parameter (preceded by some glue string, for ex. '__'). But then we need to also adjust the references. We could automatically append '__1' to each reference so that it will point to the first occurrence of the original ID in the split document. Gerrit On 18/04/2018 23:27, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: The only refinement I had to add was a post-process to remove duplicate IDs. I couldn't immediately think of a way to determine that a give @id attribute was being handled for the first time during the split process, so easier to just filter out duplicates as a follow-on process.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|