Wrapping multi-level elements (Conversion Table)
In our unstructured documents, we have multi-level headings, up to 6 levels deep. We are moving to structured documents. Each Heading element is wrapped in its own section, so a Section can consist of a Heading (followed by other elements), followed by another (sub-)Section, etc.
An oddity we have is that, in our unstructured documents, the heading levels are not sequencial and can be followed by any heading of a lower level, i.e Heading Level 1 can be followed by a Heading level 3.
When coverting to a structured document, we need to retain this structure. In our Conversion Table we have rules that successfully wrap the headings in the appropriate, cascasing, sections.
This only works if the respective elements are present. If any of the heading levels are missing, the structure is incorrect. I.e. if, in our unstructure document, we have Heading lvl 1 following by Heading lvl 3, in the structured document, both are wrapped in a Level 1 Section, instead of the Level 3 Section being wrapped in an (empty) Level 2 Section, the (empty) Level 2 Section in turn wrapped in the Level 1 Section.
Is there a way to achieve this without adding the missing Heading levels in our unstructured document?
