How to style dictionary elements: italic-style term description (bold-style shot abbreviation))
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 59
- Joined: Tue Sep 13, 2022 4:13 pm
How to style dictionary elements: italic-style term description (bold-style shot abbreviation))
Hello!
I tried to state the question in the title
but still I will explain: how to make a dictionary term inserted with using the DITA reusable components menu, - to look like this in the text: Some Term Explanation (STE)
Thanks in advance!
P.S. I know how to use this system, I just don't quite understand (at the moment) how to style it.
I tried to state the question in the title

Thanks in advance!
P.S. I know how to use this system, I just don't quite understand (at the moment) how to style it.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to style dictionary elements: italic-style term description (bold-style shot abbreviation))
Hi,
It usually helps me if I have a small example of how the DITA XML structure looks like.
Do you have a DITA <glossentry> topic looking like this:
referenced in the DITA Map with a key defined on the topicref:
and then in the DITA topics do you use abbreviated-form element to refer to it?
And you are interested in the published output, right? HTML or PDF?
Looking at the generated HTML output from the DITA topic, it looks something like this:
So the acronym appears in the same text as the gloss title, making it impossible to style separately using CSS.
Maybe this could be done with some XSLT customization, with a DITA OT plugin which overrides the xsl template:
from the base "DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl" but this needs to be investigated, I do not have a quick fix for you.
Regards,
Radu
It usually helps me if I have a small example of how the DITA XML structure looks like.
Do you have a DITA <glossentry> topic looking like this:
Code: Select all
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary Entry//EN" "glossaryentry.dtd">
<glossentry id="abs-definition">
<glossterm>Anti-lock Braking System</glossterm>
<glossBody>
<glossSurfaceForm>Anti-lock Braking System (ABS)</glossSurfaceForm>
<glossAlt>
<glossAcronym>ABS</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>
Code: Select all
<topicref href="topics/abc.dita" keys="abs"/>
Code: Select all
<abbreviated-form keyref="abs"/>
Looking at the generated HTML output from the DITA topic, it looks something like this:
Code: Select all
<a href="untitled1.html" title="Anti-lock Braking System (ABS)"><dfn class="term abbreviated-form">Anti-lock Braking System (ABS)</dfn></a>
Maybe this could be done with some XSLT customization, with a DITA OT plugin which overrides the xsl template:
Code: Select all
<xsl:template match="*" mode="getMatchingSurfaceForm">
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service