Skip to content

Commit

Permalink
Add topic on DITA features used in docs (Fixes #50)
Browse files Browse the repository at this point in the history
Signed-off-by: Roger Sheen <roger@infotexture.net>
  • Loading branch information
infotexture committed Nov 11, 2016
1 parent 70182c8 commit 0babcff
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 1 deletion.
2 changes: 1 addition & 1 deletion parameters/parameters.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<topicref href="dita-command-arguments.dita" keys="dita-command-arguments"/>
<topicref href="parameters_intro.dita" keys="dita-ot-params">
<topicref href="parameters-base.dita" keys="parameters-base" navtitle="Common"/>
<topicref href="parameters-base-html.dita">
<topicref href="parameters-base-html.dita" keys="parameters-base-html">
<topicref href="generate-copy-outer.dita" keys="generate-copy-outer" toc="no"/>
</topicref>
<topicref href="parameters-html5.dita"/>
Expand Down
124 changes: 124 additions & 0 deletions user-guide/DITA-features-in-docs.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->

<concept id="ID">
<title>DITA features in the documentation</title>
<titlealts>
<navtitle>DITA features in docs</navtitle>
</titlealts>
<shortdesc>The DITA Open Toolkit uses various recent DITA features in the project documentation.</shortdesc>

<conbody>
<p>The
<xref href="https://github.com/dita-ot/docs" format="html" scope="external">source files</xref> for the DITA-OT
documentation include examples of the following DITA features (among others):</p>
<ul>
<li>subjectScheme classification for controlling available attributes</li>
<li>profiling and branch filtering (novice/expert content)</li>
<li>extending topics with conref push</li>
<li>keys and key references</li>
<li>XML mention domain</li>
</ul>
<section>
<title>Subject schemes </title>
<p>Various topics, sections and elements in the docs are profiled by audience:</p>
<codeblock>&lt;li id="novice-variables-last" audience="novice"&gt;
&lt;p id="common-format-info"&gt;
&lt;varname&gt;format&lt;/varname&gt; is the output format (transformation type).
Use the same values available for the &lt;parmname&gt;transtype&lt;/parmname&gt;
build parameter, for example, &lt;codeph&gt;html5&lt;/codeph&gt; or &lt;codeph&gt;pdf&lt;/codeph&gt;.
&lt;/p&gt;
&lt;/li&gt;</codeblock>
<p>An “audience” subject scheme controls the values that are available for the <xmlatt>audience</xmlatt>
attribute:</p>
<codeblock>&lt;subjectdef keys="audience"&gt;
&lt;subjectdef keys="novice"/&gt;
&lt;subjectdef keys="expert"/&gt;
&lt;subjectdef keys="xslt-customizer"/&gt;
&lt;/subjectdef&gt;</codeblock>
</section>
<section>
<title>Branch filtering: re-using profiled content</title>
</section>
<section>
<p>The <cite>Getting Started</cite> section pulls a subset of the build description from the <cite>User
Guide</cite>, filtered to display only content deemed suitable for novice users under
<xref keyref="first-build-using-dita-command"/>:</p>
<codeblock>&lt;topicref href="../user-guide/using-dita-command.dita"
copy-to="using-dita-command.dita" keys="first-build-using-dita-command"&gt;
&lt;topicmeta&gt;
&lt;navtitle&gt;Building output&lt;/navtitle&gt;
&lt;/topicmeta&gt;

&lt;ditavalref href="../resources/novice.ditaval"&gt;
&lt;ditavalmeta&gt;
&lt;dvrResourcePrefix&gt;first-build-&lt;/dvrResourcePrefix&gt;
&lt;/ditavalmeta&gt;
&lt;/ditavalref&gt;
&lt;/topicref&gt;</codeblock>
<p>The same content appears later in the <cite>User Guide</cite> with additional information on arguments, options
and examples (see
<xref keyref="build-using-dita-command"/>).</p>
</section>
<section>
<title>Conref push</title>
</section>
<section>
<p>The docs build uses the conref push mechanism (specifically
<xmlatt>conaction</xmlatt>=<codeph>"pushafter"</codeph>) to extend the parameter descriptions embedded in the
default plug-ins:</p>
<codeblock>&lt;plentry id="args.csspath"&gt;
&lt;pt&gt;
&lt;parmname&gt;args.csspath&lt;/parmname&gt;
&lt;/pt&gt;
&lt;pd conaction="mark"
conref="parameters-base-html.dita#base-html/args.csspath.desc"/&gt;
&lt;pd conaction="pushafter" audience="xslt-customizer"&gt;
Corresponds to the XSLT parameter &lt;parmname&gt;CSSPATH&lt;/parmname&gt;.
DITA-OT will copy the file to this location.&lt;/pd&gt;
&lt;/plentry&gt;</codeblock>
<p>The pushed content appears in the output after the default description. (See
<xref keyref="parameters-base-html"/>.)</p>
<note type="tip">You could also use the same mechanism to extend the documentation with custom information that
applies only to your company's toolkit distribution.</note>
</section>
<section>
<title>Keys and key references</title>
</section>
<section>
<p>The <codeph>key-definitions.ditamap</codeph> defines keys for version references, re-usable links, etc.</p>
<p>This key definition defines the maintenance release version:</p>
<codeblock>&lt;keydef keys="maintenance-version"&gt;
&lt;topicmeta&gt;
&lt;keywords&gt;
&lt;keyword&gt;2.3.3&lt;/keyword&gt;
&lt;/keywords&gt;
&lt;/topicmeta&gt;
&lt;/keydef&gt;</codeblock>
<p>In topics, the keyword is used in place of hard-coded version references:</p>
<codeblock>&lt;title&gt;DITA Open Toolkit &lt;keyword keyref="maintenance-version"/&gt; Release Notes&lt;/title&gt;</codeblock>
</section>
<section>
<title>XML mention domain</title>
</section>
<section>
<p>The docs use the
<xref format="html"
href="http://docs.oasis-open.org/dita/dita/v1.3/os/part3-all-inclusive/langRef/containers/xml-mention-domain.html#xml-mention-domain"
scope="external">XML mention domain</xref> to mark up XML elements and attributes:</p>
<codeblock>&lt;li id="1777"&gt;
DITA 1.3: Initial support has been added for the &lt;xmlatt&gt;orient&lt;/xmlatt&gt;
attribute on &lt;xmlelement&gt;table&lt;/xmlelement&gt; elements. These changes allow
Antenna House Formatter to render tables in landscape mode when the
&lt;xmlatt&gt;orient&lt;/xmlatt&gt; attribute is set to &lt;option&gt;land&lt;/option&gt;. […]
&lt;/li&gt;</codeblock>
<p>When the toolkit generates output for the sample above:</p>
<ul>
<li>the XML element name is wrapped in angle brackets as <xmlelement>table</xmlelement>
</li>
<li>the attribute name is prefixed with an “at” sign as <xmlatt>orient</xmlatt></li>
</ul>
</section>
</conbody>
</concept>
1 change: 1 addition & 0 deletions user-guide/spec-support.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<topicref href="DITA_v1-3-support.dita"/>
<topicref href="implementation-dependent-features.dita" navtitle="Feature implementation" locktitle="yes"/>
<topicref href="extended-functionality.dita"/>
<topicref href="DITA-features-in-docs.dita" keys="features-in-docs"/>
</topicref>
</map>

0 comments on commit 0babcff

Please sign in to comment.