Definitions in separate document - Fluid Topics - Latest

DITA Connector Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

To have glossary definitions in a separate document from the one that references them:

  1. Create a DITA map for the definitions (for example, glossary_keystore.ditamap).

    The DITA map acts as a reference point for the glossary terms. <glossref> elements must include the toc="yes" attribute.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
    <map>
        <title>Glossary Keystore</title>
    
        <!-- Topics -->
        <glossref href="dita-def.dita" keys="dita" toc="yes"></glossref>
    </map>
    
  2. Create a glossary entry topic (for example, dita-def.dita).

    The following is an example of glossary entry:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary Entry//EN" "glossaryentry.dtd">
    <glossentry id="dita-definition">
        <glossterm>Darwin Information Typing architecture</glossterm>
        <glossdef>
            <p>A specification that defines a set of document types for authoring and organizing topic-oriented information.</p>
        </glossdef>
        <glossBody>
            <glossSurfaceForm>DITA (format)</glossSurfaceForm>
        </glossBody>
    </glossentry>
    
  3. Compress all files, and publish.

  4. Remove toc="yes" from <glossref> elements in the DITA map created for the definitions.
  5. Create a DITA map for the main content (for example, my_document.ditamap).

    Users must reference the glossary map, as in the following example:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
    <map>
        <title>What is DITA?</title>
    
        <!-- Topics -->
        <topicref href="glossref-sample.dita"/>
    
        <!-- References -->
        <mapref href="glossary_keystore.ditamap" format="ditamap"/>
    
    </map>
    
  6. Reference the glossary entry in a topic (for example, glossref-sample.dita), as in the following example:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="glossref-sample">
        <title>Glossref tooltip DITA sample</title>
        <conbody>
            <p><term keyref="dita"/> is based on XML.</p>
        </conbody>
    </concept>
    
  7. Compress all files, and publish.

This example produces the following tooltip:

Selecting the link makes the following window appear:

Screenshot of a link next to a tooltip showing the meaning of the acronym DITA, and its definition.