Chapter 3.2. General Rules

In Docmenta, a content-node has to contain a well-formed XHTML fragment. Only elements that are allowed within the <body>...</body> part of an XHTML page are allowed. That means, it is forbidden to use the <html>, <head>, <meta>, <style>, <link>, <frameset>, ... tags within a content-node.
Header elements
Furthermore, content-nodes should never contain header elements like <h1>, <h2>,...,<h6>, because headers are automatically generated by Docmenta. The structure of the generated header tags is based on the section-structure in Docmenta. In other words, in cases where you would use a header-tag in a plain HTML document, a section-node needs to be created in Docmenta instead. The section-node can itself contain other content-nodes or section-nodes, therefore forming the hierarchical publication structure.
Export modifications
If a publication is exported as WebHelp, the XHTML is exported nearly unchanged (since WebHelp version 2). There are some exceptions, for example Docmenta adapts links to the exported file-structure and the configured link format. Another example are figure-titles and table-captions, where Docmenta may add numbered labels, depending on the output-configuration.
Non XHTML 1.0 elements
Elements that have not been defined in the XHTML 1.0 standard are allowed in content-nodes, as for example any of the new HTML5 tags. Although such tags are properly exported for WebHelp output, some non-standard XHTML 1.0 tags may be ignored for other output formats, for instance when exporting a publication in ePub- or PDF-format. Therefore, to assure that the content is properly displayed in all output formats, only the elements and attributes described in this document should be used in content-nodes.
For more advanced users, Docmenta provides a hook called "AutoFormat Transformation" which allows to dynamically transform content before export. This way it is possible to transform XHTML/XML elements that are not natively supported by an output format into content that is supported.
As an example consider the title attribute of the <div> element. Normally the title attribute is not displayed in print-output. However, you could create an AutoFormat-Transformation that transforms the title-attribute into something that is visible in print-output. This transformation could be done for all output formats, or by using style-variants (see Section 2.4.6, “Using style variants”), just for specific output variants, as for example print-output. A special use case of an AutoFormat-Transformation are dynamic templates, which are described in Section 1.9.2, “Dynamic Templates”.