[Home] [By Thread] [By Date] [Recent Entries]
Hi Eliot,
I think this can be tackled with what I call "upward projection", see for ex. https://markmail.org/message/kmq2g4fidmw6cofz You'd identify all leaf elements and group them (maybe a combination of group-starting-with="two-colum-start" and group-ending-with="two-colum-end" is in order here). Then for each group you transform the top-level block in a certain mode, with a tunneled parameter. The tunneled parameter contains the current group and its ancestors. In the template that matches any element in this mode, you check whether the tunneled parameter contains the current element. If so, the next-match identity template will apply, if not, nothing will be written to the result. There's a special template in this mode that matches the two-column-start element. It will create <fo:block span="none"> and then go on processing the children. I'm not 100% sure whether this works, but I have an intercontinental flight ahead of me. It will give me some time to create working code, unless you're faster implementing the suggested solution (or a better one). I guess that the solution scales with the number of splitting points times the number of leaves, so performance may deteriorate for large documents with frequently changing column spans. Gerrit On 18/04/2018 19:45, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: Using XSLT 2 with Saxon.
Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 GeschC$ftsfC<hrer / Managing Directors: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt
|

Cart



