msmid / markdown2docbook

Conversion tool for transforming markdown text files to DocBook/HTML documents. Project is based on XSLT 2.0 technology.
MIT License
21 stars 6 forks source link

Grouping elements by headlines #44

Closed msmid closed 9 years ago

msmid commented 9 years ago

This problem is called transforming flat documents. I can use for-each-group function, but currently it is kind of buggy. When I have nested headline I get looping templates. Or I get groups duplicated and so on.

msmid commented 9 years ago

The problem had easy solution. Template that matches groups by h1 was called in #all modes, which generated tge bug. Now it is only group mode and each block element has it's mode counterpart with current-group() function, which redirects on correct templates with no duplicating or looping.