code-srv-test/dita-ot-3.6/doc/topics/lwdita-input.html
2021-03-23 22:38:58 +00:00

94 lines
No EOL
11 KiB
HTML

<!DOCTYPE html
SYSTEM "about:legacy-compat">
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2020"><meta name="generator" content="DITA-OT"><meta name="description" content="DITA-OT provides preview support for the authoring formats proposed for Lightweight DITA, or “LwDITA”. The XDITA, MDITA and HDITA formats are alternative representations of DITA content in XML, Markdown and HTML5."><meta name="keywords" content=", topicref, format, authoring formats, Lightweight DITA, metadata, DITA 1.3, converting lightweight formats to DITA"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Preview support for Lightweight DITA</title></head><body id="lwdita-input"><header role="banner"><div class="header">
<p>DITA Open Toolkit</p>
<hr>
</div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.6</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../topics/input-formats.html">Authoring formats</a><ul><li><a href="../topics/dita-xml-input.html">Standard DITA XML</a></li><li><a href="../topics/markdown-input.html">Markdown content</a></li><li class="active"><a href="../topics/lwdita-input.html">Lightweight DITA</a></li><li><a href="../topics/markdown-dita-syntax-reference.html">Markdown DITA syntax</a></li></ul></li><li><a href="../topics/output-formats.html">Output formats</a></li><li><a href="../parameters/index.html">Parameters</a></li><li><a href="../topics/html-customization.html">Customizing HTML</a></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/adding-plugins.html">Adding plug-ins</a></li><li><a href="../topics/custom-plugins.html">Creating plug-ins</a></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
<h1 class="title topictitle1" id="ariaid-title1">Preview support for Lightweight DITA</h1>
<div class="body"><p class="shortdesc">DITA-OT provides preview support for the authoring formats proposed for
<a class="xref" href="http://docs.oasis-open.org/dita/LwDITA/v1.0/cn01/LwDITA-v1.0-cn01.pdf" target="_blank" rel="external noopener">Lightweight DITA</a>, or “<dfn class="term">LwDITA</dfn>”. The XDITA, MDITA and HDITA formats are alternative
representations of DITA content in XML, Markdown and HTML5.</p>
<div class="note attention note_attention"><span class="note__title">Attention:</span> Since
<a class="xref" href="http://docs.oasis-open.org/dita/LwDITA/v1.0/cn01/LwDITA-v1.0-cn01.pdf" target="_blank" rel="external noopener">Lightweight DITA</a> has not yet been released as a formal specification, the implementation for XDITA, MDITA
and HDITA authoring formats is subject to change. Future versions of DITA Open Toolkit will be updated as LwDITA
evolves.</div>
<section class="section"><h2 class="title sectiontitle">XDITA</h2>
<p class="p">XDITA is the LwDITA authoring format that uses XML to structure information. XDITA is a subset of DITA, with
new multimedia element types added to support interoperability with HTML5. XDITA is designed for users who want
to write DITA content but who do not want (or need) the full power of DITA.</p>
<p class="p">The XDITA parser included in the <code class="ph codeph">org.lwdita</code> plug-in provides preliminary support for XDITA
maps and XDITA topics.</p>
<p class="p">To apply XDITA-specific processing to topics in an XDITA map or a full DITA 1.3 map, set the
<code class="keyword markupname xmlatt">@format</code> attribute on a <code class="keyword markupname xmlelement">&lt;topicref&gt;</code> to <code class="ph codeph">xdita</code>:</p>
<div class="p">
<pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;map&gt;
&lt;topicref href="xdita-topic.xml" <strong class="ph b">format="xdita"</strong>/&gt;
&lt;/map&gt;</code></pre>
</div>
<div class="note tip note_tip"><span class="note__title">Tip:</span> For examples of cross-format content sharing between topics in XDITA, HDITA, extended-profile
MDITA, and DITA 1.3, see the LwDITA sample files in the DITA-OT installation directory under
<span class="ph filepath">plugins/org.oasis-open.xdita.v0_2_2/samples</span>.</div>
</section>
<section class="section"><h2 class="title sectiontitle">MDITA</h2>
<p class="p">MDITA is the LwDITA authoring format based on Markdown. It is designed for users who want to write structured
content with the minimum of overhead, but who also want to take advantage of the reuse mechanisms associated
with the DITA standard and the multi-channel publishing afforded by standard DITA tooling.</p>
<p class="p">Recent proposals for LwDITA include two profiles for authoring MDITA topics:</p>
<ul class="ul">
<li class="li">The “<dfn class="term">Core profile</dfn>” is based on
<a class="xref" href="https://github.github.com/gfm/" target="_blank" rel="external noopener">GitHub-Flavored Markdown</a> and includes elements that are common to many other Markdown implementations.</li>
<li class="li">The “<dfn class="term">Extended profile</dfn>” borrows additional features from other flavors of Markdown to represent
a broader range of DITA content with existing plain-text syntax conventions.</li>
</ul>
<p class="p">The Markdown DITA parser included in the <code class="ph codeph">org.lwdita</code> plug-in provides preliminary support for
these profiles and additional Markdown constructs as described in the syntax reference.</p>
<p class="p">To apply LwDITA-specific processing to Markdown topics, set the <code class="keyword markupname xmlatt">@format</code> attribute to
<code class="ph codeph">mdita</code>:</p>
<div class="p">
<pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;map&gt;
&lt;topicref href="mdita-topic.md" <strong class="ph b">format="mdita"</strong>/&gt;
&lt;/map&gt;</code></pre>
</div>
<p class="p">In this case, the first paragraph in the topic will be treated as a short description, for example, and
additional metadata can be specified for the topic via a YAML front matter block.</p>
<div class="note note note_note"><span class="note__title">Note:</span> Setting the <code class="keyword markupname xmlatt">@format</code> attribute to <code class="ph codeph">mdita</code> triggers stricter parsing than the
more lenient document parsing approach that is applied to <code class="ph codeph">markdown</code> documents.</div>
<div class="note attention note_attention"><span class="note__title">Attention:</span> The MDITA map format is not yet supported. To include Markdown content in publications, use
an XDITA map or a DITA 1.3 map.</div>
</section>
<section class="section"><h2 class="title sectiontitle">HDITA</h2>
<p class="p">HDITA is the LwDITA authoring format based on HTML5, which is intended to support structured content authoring
with tools designed for HTML authoring. HDITA also uses custom data attributes to provide interoperability with
DITA.</p>
<p class="p">The HDITA parser included in the <code class="ph codeph">org.lwdita</code> plug-in provides preliminary support for these
constructs.</p>
<p class="p">To apply LwDITA-specific processing to HTML topics, set the <code class="keyword markupname xmlatt">@format</code> attribute to
<code class="ph codeph">hdita</code>:</p>
<div class="p">
<pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;map&gt;
&lt;topicref href="hdita-topic.html" <strong class="ph b">format="hdita"</strong>/&gt;
&lt;/map&gt;</code></pre>
</div>
<div class="note attention note_attention"><span class="note__title">Attention:</span> The HDITA map format is not yet supported. To include HDITA content, use an XDITA map or a
DITA 1.3 map.</div>
</section>
<section class="section"><h2 class="title sectiontitle">Converting lightweight formats to DITA XML</h2>
<p class="p">When you add LwDITA topics to a DITA publication, the content is temporarily converted to DITA in the
background when generating other output formats like HTML or PDF, but the source files remain unchanged.</p>
<p class="p">If you prefer to maintain this content in DITA in the future, you can generate DITA output by passing the
<span class="keyword parmname">--format</span>=<span class="keyword option">dita</span> option on the command line.</p>
<p class="p">This converts all input files (both LwDITA formats and DITA XML) to
<a class="xref" href="dita2dita.html" title="The dita transformation generates normalized topics and maps from DITA input. The normalized output includes the results of DITA Open Toolkit pre-processing operations, which resolve map references, keys, content references, code references and push metadata back and forth between maps and topics.">Normalized DITA</a>. You can then copy the generated DITA files from the output
folder to your project and replace references to the lightweight topics with their DITA equivalents.</p>
</section>
</div>
<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/input-formats.html" title="In addition to standard DITA XML, DITA-OT supports several alternative input formats, including Markdown and the proposed XDITA, MDITA and HDITA authoring formats currently in development for Lightweight DITA.">Authoring formats</a></div></div><div class="linklist relinfo"><strong>Related information</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/dita-xml-input.html" title="DITA Open Toolkit supports all released versions of the OASIS DITA specification, including 1.0, 1.1, 1.2, and 1.3. As of release 3.6, DITA-OT also provides an initial preview of features for the latest draft of the upcoming DITA 2.0 standard.">Standard DITA XML</a></li><li class="linklist"><a class="link" href="../topics/markdown-input.html" title="Markdown is a lightweight markup language that allows you to write using an easy-to-read plain text format and convert to structurally valid markup as necessary.">Markdown content</a></li><li class="linklist"><a class="link" href="../topics/markdown-dita-syntax-reference.html" title="Markdown DITA uses CommonMark as the underlying markup language.">Markdown DITA syntax reference</a></li></ul></div></nav></article></main></body></html>