• 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

<learningContent> with embedded topics

Posted on 09.21.18

The Learning and Training specialization Lesson 3: Learning content <learningContent> with embedded topics

In addition to the <learningContent> elements, <learningContent> topics can contain embedded topics.

Your instructional content might include a series of steps for the student to follow to complete an activity. In this case, you can embed a task topic within the <learningContent> topic to handle these steps:

<learningContent id="watching_ducks">
    <title>Watching ducks</title>
    <learningContentbody>
        <lcInstruction>
            <p>Read this to learn more about what you need to have a 
               satisfying duck-watching experience.</p>
        </lcInstruction>
    </learningContentbody>
    <task id="how_to_watch_ducks">
        <title>How to watch ducks</title>
        <taskbody>
            <steps id="steps_watching_ducks">
                <step>
                    <cmd>Choose a location to watch ducks.</cmd>
                </step>
                <step>
                    <cmd>Pick a field guide to identify the ducks.</cmd>
                </step>
            <step>
                <cmd>Find some good optics.</cmd>
            </step>
                </steps>
        </taskbody>
    </task>
</learningContent>

There are several benefits to embedding a topic within a <learningContent> topic:

  • Reuse. If you need to reuse content in your training materials, embedding topics allows you to use that content as written rather than restructuring it into learningContent-specific elements. Embedding topics can be especially useful for training departments that reuse a lot of content from other departments, such as tech comm or sales.
  • Control. The <lcInstruction> element in the body of a <learningContent> topic allows a limited element set. Embedding another topic type inside the <learningContent> topic allows you to use its element set instead. For example, you cannot use the <steps> element inside <lcInstruction> for step-by-step instruction, but the <steps> element is available inside an embedded task topic.
  • Flexibility. You can embed more than one topic into the body of a <learningContent> topic, which adds flexibility to your <learningContent> topics. For example, you might embed a concept topic to explain an idea to your students, and then embed a task topic to provide hands-on instructions to enhance their understanding of that concept.
Practice
  1. Open the file lesson3/lc_task_exercise_start.dita and use it to convert the following content from a LearningDITA course, The DITA task topic type, into a DITA <learningConcept> topic with an embedded task.

    Creating a new task topic

    At a minimum, the task topic must contain a <task> root element (with an id
    attribute) that contains a <title> element.

    Following the <title> element and an optional <shortdesc> element, a
    <taskbody> element contains the task content. The elements within the
    <taskbody> conform to a specific order. This course presents the elements of the
    <taskbody> in the order in which they must occur.

    1. Make a copy of the file l_task_start.dita and open it in your editor.

      If you are using a DITA-aware text editor, make sure you are in text
      mode, rather than author or visual mode.

    2. Inside the <title> element, update the text of the task title.
    3. After the <title> element, add a <taskbody> element.

      The <taskbody> element contains all the actual content in the task.

      This is the essential part of a DITA strict task topic. The rest of this
      lesson shows you how to add the first two child elements to the
      <taskbody> element.


  2. Check your file lesson3/lc_task_exercise_start.dita against the completed sample file lesson3/lc_task_exercise.dita
Contributors
  • Simon Bate, Scriptorium
  • Gretyl Kinsey, Scriptorium
  • Kaitlyn Heath, Scriptorium
Previous Topic
Back to Lesson
Next Lesson

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
  • Cookie Policy

Maintained by Scriptorium Publishing

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

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}