... | ... | @@ -14,16 +14,6 @@ A general purpose "mapper" enabling class or style values on HTML elements to be |
|
|
|
|
|
XSweet can convert paragraphs `p` elements in HTML into `h1-h6` elements. It uses one of several means to determine which paragraphs receive this treatment: the most robust is to configure it yourself with a styles mapping file, another runtime configuration you set up yourself (which can be made sensitive to consistent code points in your inputs). Or, if your data is sufficiently regular, another method may be less onerous. Indeed if asked, HTMLevator's header promotion will 'guess' appropriate headers based on a ranking of format (style) attributes in the inputs.
|
|
|
|
|
|
Section inferencing - this requires structural induction.
|
|
|
|
|
|
*Structural induction* means HTMLevator will produce `<section>` elements where needed to "wrap" (structure) unorganized contents.
|
|
|
|
|
|
Over and above structural induction, *section type inferencing* means recognizing, for example, a **Conclusions** section (by means of its title and/or other properties) and submitting it to appropriate handling -- including validation, to detect whether and where such a section is required, expected or permitted. HTMLevator currently does not provide for section type inferencing, except to note that it is a natural requirement and one that can be readily accomplished in this architecture.
|
|
|
|
|
|
On HTML files whose section levels are *regularly* and *systematically* indicated by a "regular order" of headers, the XSLT provided here will reliably create a nested section structure.
|
|
|
|
|
|
More details:
|
|
|
|
|
|
## Structural induction
|
|
|
|
|
|
Any sequence of HTML elements leading with a header (h1-h6) is wrapped as a section. Within each section, the header plus its (block level) elements are followed by sections for contiguous (subsequent) lower level sections.
|
... | ... | @@ -83,6 +73,15 @@ correct, leading with para contents then h3; |
|
|
skipping levels at the front;
|
|
|
skipping levels inside)
|
|
|
|
|
|
|
|
|
## *section type inferencing*
|
|
|
|
|
|
Means recognizing, for example, a **Conclusions** section (by means of its title and/or other properties) and submitting it to appropriate handling -- including validation, to detect whether and where such a section is required, expected or permitted. HTMLevator currently does not provide for section type inferencing, except to note that it is a natural requirement and one that can be readily accomplished in this architecture.
|
|
|
|
|
|
On HTML files whose section levels are *regularly* and *systematically* indicated by a "regular order" of headers, the XSLT provided here will reliably create a nested section structure.
|
|
|
|
|
|
More details:
|
|
|
|
|
|
## For future development - validation of structures/content types
|
|
|
|
|
|
Once structures have been induced (inferred or projected over the element sequence), they need to be validated against rule sets appropriate to their workflows.
|
... | ... | |