• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Learning DITA

Free DITA training

Free DITA training

  • Log in
  • Register
  • Newsletter
  • Profile
  • Privacy
  • Home
  • About
  • Courses
  • News
  • Resources
  • Support the site
  • Contact
  • Recordings

Adding other elements

Posted on 08.30.15

DITA uses many other important elements. Here are three more:

<fn>

The element that inserts a footnote.

<menucascade>

The element that indicates the order of a menu path, such as File > Save As. Each item inside the <menucascade> element is contained in a <uicontrol> element.

<dl>

The element that contains a definition list. A definition list is a list of terms and their corresponding definitions, presented in a format similar to a two-column table by default. The definition list contains one or more entries, tagged with the <dlentry> element, and each entry contains a term (tagged with the <dt> element) and one or more definitions (tagged with the <dd> element).

Practice
  1. Continue using the file lesson3/l_concept_elements_start.dita to add each of these elements to your example file.
  2. After the last <p> element, add a new <p> element with the <fn> element inside it as shown in the following example.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
      <conbody>
    ...
     <p>Ducklings need higher levels of protein in their diets than adult ducks.<fn>A protein level of 18-20% is recommended for newborn ducklings.</fn></p>
    </conbody>
    </concept>
    The <fn> element indicates where the footnote reference number will appear inside the paragraph. By default, the text inside the <fn> element is displayed at the bottom of the page (for PDF) or end of the topic (for HTML) when you generate output from the file.
    Video: Creating a menucascade in DITA
  3. After the last <p> element, add a new <p> element with a <menucascade> element inside it, as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
      <conbody>
    ...
    <p>To create a spreadsheet to keep track of when you need to replenish your 
    ducklings' food and water, go to 
    <menucascade>
    </menucascade>.
    </p>

    </conbody>
    </concept>
    In the example you added, the <menucascade> element will be used to show the menu options involved in creating a spreadsheet.
  4. Inside the <menucascade> element, add a <uicontrol> element and add content to it as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
       <conbody>
    ...
    <menucascade>
    <uicontrol>File</uicontrol>
    </menucascade>
    ...
    </conbody>
    </concept>
    In the example you added, the <uicontrol> element contains the name of the first menu option involved in creating a spreadsheet: “File.”
  5. After the <uicontrol> element, add two more <uicontrol> elements and add content to them as shown in the following example.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
      <conbody>
    ... 
    <menucascade>
    <uicontrol>File</uicontrol>
    <uicontrol>New</uicontrol>
    <uicontrol>Spreadsheet</uicontrol>

    </menucascade>
    ...
    </conbody>
    </concept>
    By default, an arrow symbol is inserted between <uicontrol> elements in the output to indicate the hierarchy of the menu options.
    With the <menucascade> and <uicontrol> elements in the example you added, the user now knows to click on “File,” then “New,” then “Spreadsheet.”
    You can use the <uicontrol> element without the <menucascade> element. For example, you can tag a word with the <uicontrol> element to indicate a button the user should click. Because the <uicontrol> element indicates that the text it surrounds will have special styling, avoid using the <b> element or other inline styling elements inside the <uicontrol> element.
    Video: Creating a definition list in DITA
  6. After the <menucascade> element, add a new introductory <p> element followed by a <dl> element as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
       <conbody>
    ...
    </menucascade>
    <p>Domestic ducks fall into categories based on weight. These weight classes may 
    help you choose a species based on how much you will need to feed your ducks.</p>
    <dl>
    </dl>

    </conbody>
    </concept>
    The <dl> element sets up the framework for a definition list.
  7. Inside the <dl> element, add a <dlentry> element as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
       <conbody>
    ...
    <dl>
     <dlentry>
    </dlentry>

    ...
    </conbody>
    </concept>
    Each <dlentry> element contains a term and its definition. The <dlentry> element can contain one or more <dd> elements.
  8. Inside the <dlentry> element, add the <dt> and <dd> elements and add content to them as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
       <conbody>
    ...
        <dlentry>
        <dt>Bantam</dt>
            <dd>The lightest-weight ducks and best fliers, such as the Mallard duck.</dd>

    ...
    </conbody>
    </concept>
    The <dt> element contains the term, and the <dd> element contains its definition.
  9. After the <dlentry> element, add three more <dlentry> elements and add content to them with <dt> and <dd> elements as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    <concept id="concept_elements">
       <title>Wild duck species</title>
      <conbody>
    ...
        </dlentry>
        <dlentry>
            <dt>Light</dt>
            <dd>The second lightest-weight ducks and best egg-layers, such as the Khaki 
                Campbell duck.</dd>
        </dlentry>
        <dlentry>
            <dt>Medium</dt>
            <dd>The mid-weight and generally calmest ducks, such as the Swedish duck.</dd>
        </dlentry>
        <dlentry>
            <dt>Heavy</dt>
            <dd>The heaviest and generally friendliest ducks, such as the Pekin duck.</dd>
        </dlentry>

    ...
    </conbody>
    </concept>
  10. Check your file lesson3/l_concept_elements_start.dita against the sample file lesson3/l_concept_elements.dita.
Practice
  1. Open the file lesson3/l_concept_elements_exercise_start.dita and use it to convert the following untagged content into DITA:

    Source: Content Strategy 101

  2. Check your file lesson3/l_concept_elements_start.dita against the sample file lesson3/l_concept_elements_exercise.dita.
Contributors
  • Gretyl Kinsey, Scriptorium

sidebar

Blog Sidebar

  • Scriptorium logo
    Maximize the value of your content. Read more.
  • Scriptorium logo
    Already in DITA and need support? Contact us.
RSSTwitter

Want to add content? Join the ditatraining GitHub repository.

  • Home
  • Sponsor
  • News
  • Contact
  • Privacy

Maintained by Scriptorium Publishing

Logo and site presentation © 2015-2022 Scriptorium Publishing. Content based on the open-source DITA training project.