XMLmind DITA Converter fully supports HDITA, which specifies how to write DITA topics and maps in HTML5.
ImportantOnly XHTML5, that is,
the XML syntax of HTML5, is supported. Plain HTML5 is not
supported.
In practice, this means that all tags must be closed (e.g.
<img/> and not <img> ), all attributes
must have a quoted value (e.g. controls="" and not
controls ) and that elements like head and
body may not be omitted. |
lwdita_templates/hdita_topic.html
):<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"/> <title>Topic title here</title> </head> <body> <article id="???"> <h1>Topic title here</h1> <p>Short description here.</p> <p>Topic body starts here.</p> </article> </body> </html>
lwdita_templates/hdita_map.html
):<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"/> <title>Map title here</title> </head> <body> <nav> <h1>Map title here</h1> <ul> <li><p><a href="???"></a></p> <ul> <li><p><a href="???"></a></p></li> <li><p><a href="???"></a></p></li> </ul> </li> <li><p><a href="???"></a></p></li> </ul> </nav> </body> </html>
data-class="concept"
to the top-level
article
element may be used to generate a DITA
concept
rather than a DITA topic
.<div data-class="fn">
, in addition to
<span data-class="fn">
.
<a href="#FOOTNOTE_ID"></a>
.<a href="#TARGET_ID">
. Notice that there is no need
to specify, like in DITA XML, <a href="#./TARGET_ID">
or <a href="#TOPIC_ID/TARGET_ID">
.meta
elements having the following names are
translated to their DITA equivalent (that is, elements contained in the
prolog
of a DITA topic
or the
topicmeta
of a DITA map
):
audience
author
category
created
or dcterms.created
(maps to
<critdates>/<created>
)keyword
(maps to
<keywords>/<keyword>
)permissions
publisher
or dcterms.publisher
resourceid
revised
or dcterms.modified
(maps to
<critdates>/<revised>
)source
meta
element having any other name is
translated to DITA element data
.br
, hr
,
iframe
, script
, etc) are simply
ignored;ph
or
div
having an outputclass
attribute
reflecting their HTML5 origin.
small
is translated to DITA
<ph outputclass="role-small">
. h1
element other than the very first one (specifying
the title of the topic) is translated to DITA
<div outputclass="role-h1">
. <div outputclass="role-section">
.rowspan
in td
or
th
elements will generally cause an incorrect DITA table to
be generated.