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:
-
Open your glossary topic. This is the topic that contains your glossary and the entries and definitions.
-
Select a
glossentry
element. Check that it does not have an xml:id entry in the Element attributes section. If it does, check the otherglossentry
elements too. If they all havexml:id
s, ignore step 3 and continue from step 4. If anyglossentry
does not have anxml:id
, you will need to add one (see step 3). -
Select the
glossentry
element on the Element Structure Menu and then select Generate ID. This gives theglossentry
a unique ID (xml:id
).When all of the
glossentry
elements have anxml: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 withxml:id
s 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. -
-
Open a topic and select the text that you want to reference a glossary term.
-
Use the element context menu to apply the
glossterm
element. -
Select the
glossterm
element and then add thelinkend
attribute in the Element attributes section. -
Set the value of the linkend attribute to match the xml:id of the glossary entry you want to reference.
-
Repeat steps 4 to 7 inclusive for each reference.
-
Select Save.
When you publish, Paligo will automatically detect the references in your content and will match them to the terms in your glossary.