Skriftlig InfoDITA publishingDITA library topicsCreating a new DITA library topic

Creating a new DITA library topic

DITA library topics

Start page

About DITA library topics

How does it work?

When is it a good idea to establish a library?

Where should the library be located?

Make small libraries!

Basic rules for using libraries

Content types for library topics

Metadata for library topics

Procedures

Creating a new DITA library topic

Inserting a text fragment from a library topic

DITA library topics allow you the opportunity to reuse small text fragments in many topics. DITA is optimized for maximimum reuse. DITA topics can be easily reused in topic maps. DITA library topics allow you to reuse information in multiple topics. To establish a new library topic, you can either create a new one from a template, or copy an existing one.

(This procedure is based on the Tridion Docs database repository and Oxygen XML editor. Other tools have similar functionality.)

Prerequisites

You have all the tools available, and the relevant access rights to develop new content.

Context

A DITA library topic is defined as follows:

DITA library topic

A DITA library topic is a stand-alone data module that contains multimodal text. The module is created using a standard, non-specialized DITA topic. The text fragments contained in the library can be reused in multiple DITA topics using the mechanisms in DITA. The most common mechanism for retrieving information from a library is the <conref> element.

With libraries you can reuse text fragments:

Text fragment

A text fragment denotes each individual component of an information element. The text fragment consists of a multimodal text, and can for example contain a word, a sentence or an illustration. As part of the information element, the fragment can be reused in different contexts. Reuse takes place by electronic linking in a tool that supports such functionality.

Creating libraries is often a question of balance. It is important that we do not create too many libraries, because that makes it difficult to find the information we want to reuse. At the same time, it is equally important that each library is not too large.

Procedure

  1. From the editor's main menu, select Tridion DocsBrowse repository.
  2. In the database structure, navigate to the folder where you want to establish a new library topic.
  3. If necessary, create a new folder: Tridion Docs / Add folder
    1. Right-click on a selected folder and select NewFolder.
    2. In the dialogue box that opens, give the new folder good name.
    3. Set Content type to Library topic.
    4. Click OK.
  4. If you have created a new folder:
    1. Click on the new folder to open it.
    2. On the toolbar on the right side, click the green + symbol to bring up relevant templates.

      Tridion Docs / Browse repository toolbar

    3. Select a template.
    4. In the dialogue box that opens, fill in all relevant metadata fields.
    5. Click OK.
  5. If you are going to establish a new library topic in an existing folder where there are already other libraries:
    1. Right-click on one of the existing topics and select Duplicate.

      A copy of the existing topic is created.

    2. Right-click the new topic and select Properties.

      Make sure that you do this with the new object! Do not change the old one!

    3. In the dialogue box that opens, fill in all relevant metadata fields.
    4. Click OK.
  6. Right-click on the new topic and select Check out.
  7. Enter the desired content.

    The typical content is one or more elements with text. All text should be provided in <p>/<ph> element structures, like this:

    <p><ph>Text</ph></p>
    <p><ph>Text</ph></p>
    

    The fewer elements you put into the library, the better. A typical maximum number is five elements.

    Leave any <title>-elements empty.

  8. Recommended: Før du finalize the work with the library, do this:
    1. Insert a <comment> element at the top of the library topic.
    2. Copy the library's GUID-identification into the <comment>.

    Like this:

    <conbody>
    <title>-</title>
    <comment>The library's GUID-identification</comment>
    ...
    </conbody>
    

    The information in the comment is displayed when you preview the library topic. This makes it easier to retrieve the GUID identifier from the library when it is needed.

  9. From the editor's main menu, select Tridion DocsCheck in.

Related texts

About DITA library topics

How does it work?

When is it a good idea to establish a library?

Where should the library be located?

Make small libraries!

Basic rules for using libraries

Content types for library topics

Metadata for library topics


All external links open in a new window. I take no responsibility for information on external websites, even if I have linked to them. Please report links that do not work.

The information on this page represents my personal opinions and my understanding of the topic being described. Feel free to link to the page, but do not copy large parts of the content without permission. I take no responsibility for any errors, misunderstandings or missing information. I also take no responsibility for any mistakes you may make or cause as a result of incorrect or missing information. You are welcome to contribute with comments, relevant experiences or additional information. See Editor and contact information.