Skip to main content

Reference Glossary Entry by XML ID

If you are going to translate your content, you will most likely want to refer to glossary terms that are also translated. For example, if you have English and French content, you probably want the French topics to reference French glossary terms. To do this, use an xml:id reference.

With an xml:id reference, the underlying code is the same for all language versions. So if you have a glossary entry with an xml:id of N5f84b058951b3 in your English content, that same id is also used for the glossary entry in any other languages.

If you used a baseform reference instead, the glossary term would only work for one language. This is because the baseform term is language-specific. For example, let's say you have English content and you use baseform: valve for a glossary reference. Paligo will look for valve in the English glossary, and will find it (assuming it exists). But for the French glossary, Paligo will still look for baseform:valve, and valve will not exist in the French glossary as it is translated to vanne.

Tip

You can use xml:id references for content in a single language too. This is a good idea if you do not translate your content now, but may need to translate it in the future.

To use the xml:id to reference a glossary entry:

  1. Open your glossary topic. This is the topic that contains your glossary and the entries and definitions.

  2. Select a glossentry element. Check that it does not have an xml:id entry in the Element attributes section. If it does, check the other glossentry elements too. If they all have xml:ids, ignore step 3 and continue from step 4. If any glossentry does not have an xml:id, you will need to add one (see step 3).

    Element attributes panel showing glossentry with an xml:id
  3. Select the glossentry element on the Element Structure Menu and then select Generate ID. This gives the glossentry a unique ID (xml:id).

    Glossentry element selected in the element structure menu. The generate ID option is highlighted.

    When all of the glossentry elements have an xml:id, you can reference them from your topics.

    Tip

    You can manually change an xml:id to something that is more meaningful, if you wish. This can make it easier to work with xml:ids for glossary references.

    When changing an xml:id, there are some rules to follow:

    • The xml:id must start with a letter

    • There is a 36 character limit

    • You cannot use spaces, so use an underscore instead. For example, glid valve is not allowed, but you could use glid_valve.

    It is a good idea to have a consistent xml:id naming strategy for your glossary entries.

  4. Open a topic and select the text that you want to reference a glossary term.

    Some text with the term XML highlighted.
  5. Use the element context menu to apply the glossterm element.

    The Paligo editor shows the element context menu being used to add the glossterm element
    The Paligo editor shows that the glossterm element is selected. In the content, the term XML is shown in italic to show that it links to a glossary term.
  6. Select the glossterm element and then add the linkend attribute in the Element attributes section.

    The element attributes section shows the glossterm element is selected. It has been given the linkend attribute.
  7. Set the value of the linkend attribute to match the xml:id of the glossary entry you want to reference.

    The element attributes section shows the glossterm element is selected. It has been given the linkend attribute. The linkend attribute has a reference as its value.
  8. Repeat steps 4 to 7 inclusive for each reference.

  9. Select Save. Save icon.

When you publish, Paligo will automatically detect the references in your content and will match them to the terms in your glossary.