Page 1 of 1

How to show a glossary in HTML-based output?

Posted: Wed Feb 04, 2026 5:58 pm
by Frank Ralf
Hi,
I want to output a glossary as a separate chapter in my WebHelp documentation. However, the glossary does not show up in the output using any of the HTML-based transformation scenarios (HTML5, WebHelp Responsive, PDF - based on HTML5 & CSS). I have tried to use the attributes print="yes" and deliveryTarget="html" but to no avail. Am I missing something?

Best regards,
Frank

EDIT
I did some more testing and the glossary entries are generated in the HTML output but the glossary does not show up in the TOC.

Re: How to show a glossary in HTML-based output?

Posted: Thu Feb 05, 2026 11:24 am
by julien_lacour
Hi Frank,

You could use a topichead as visible in flowers.ditamap from our samples:

Code: Select all

<topichead navtitle="Glossary" id="glossary">
Regards,
Julien

Re: How to show a glossary in HTML-based output?

Posted: Thu Feb 05, 2026 12:16 pm
by Frank Ralf
Hi Julien,

Thanks for the pointer, will try that.

Best regards,
Frank

Re: How to show a glossary in HTML-based output?

Posted: Thu Feb 05, 2026 5:00 pm
by Frank Ralf
Hi Julien,

I did some testing and found some strange behavior:
  • Glossary items only show up in the HTML output when they are referenced by <topicref> instead of <glossref>.
  • The displayed text is taken from <glossterm>, the @navtitle attribute is ignored.
  • @print and @deliveryTarget attributes are ignored as well.
Works

Code: Select all

 <topicref navtitle="Genus" href="concepts/glossaryGenus_t.dita" keys="genus" print="yes"/>
Same as:

Code: Select all

 <topicref href="concepts/glossaryGenus_t.dita" keys="genus" />
Does not work

Code: Select all

<glossref navtitle="Genus" href="concepts/glossaryGenus_g.dita" keys="genus" print="yes"/>
Same as:

Code: Select all

<glossref href="concepts/glossaryGenus_g.dita" keys="genus" />
I find this strange because <glossref> is a specialization of <topicref>. Is this the intended behavior?

Best regards,
Frank

Re: How to show a glossary in HTML-based output?

Posted: Thu Feb 05, 2026 5:05 pm
by Frank Ralf
I think I found the reason for this behavior:

<glossref> has set the @toc attribute to "no" by default, whereas the @toc attribute is undefined for <topicref>. So this does the trick:

Code: Select all

<glossref href="concepts/glossaryGenus_g.dita" keys="genus" toc="yes"/>
So your initial tip to define a <topichead> was only part of the solution ;-)

Kind regards,
Frank

EDIT
According to the DITA specs the @toc attribute cascades so you should be able to set it on the <map> or <mapref> element. However, this does not seem to work.

Re: How to show a glossary in HTML-based output?

Posted: Mon Feb 09, 2026 10:15 am
by julien_lacour
Hi Frank,

If I refer to the specification, the default value should be set before the cascade (if you check the list order). So I assume this is the expected behavior, I don't think the cascade should override the default value (this could lead to unexpected results).
Do you have the possibility to send us a sample so we can analyze it and see if there is a problem?

Regards,
Julien

Re: How to show a glossary in HTML-based output?

Posted: Mon Feb 09, 2026 12:13 pm
by Frank Ralf
Hi Julien,

Thanks for the quick reply and the pointer to the specs. I had not found that page yet. Come to think of it, you are right, that the cascade should not override the default value. Thanks for your kind offer to look into this but I think I have understood the working of glossary elements now ;-)

Kind regards,
Frank