Print Glossary
Oxygen general issues.
-
- Posts: 5
- Joined: Tue Jul 15, 2014 3:42 pm
Print Glossary
How do you include a Glossary in a DITA OT output? I can't find any specific instructions and after 4 days of grinding my teeth and going round in circles with the documentation, I am just about to call it quits and become a beachbum instead. I have created the following simple example:
The Root Map looks like this:
The Glossary map looks like:
The Glossary term looks like this:
The Root Map looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Capacity Management</title>
<topicref href="introduction.ditamap" format="ditamap"/>
<topicref href="roles.ditamap" format="ditamap"/>
<topicref href="glossary.ditamap" format="ditamap" print="yes"/>
</map>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Glossary</title>
<keydef href="Glossary/gloss_dita.dita" keys="DITA" print="yes"/>
</map>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary//EN" "glossary.dtd">
<glossentry id="gloss_dita">
<glossterm>DITA</glossterm>
<glossdef>Darwin etc...</glossdef>
</glossentry>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Print Glossary
Hi,
You need to add "processing-role='normal'" to the key definition:
The main idea is that the "keydef" by default is considered just a definition of a key linked to a topic which will not appear in the published output:
https://www.oxygenxml.com/dita/1.3/spec ... eydef.html
So by default its processing-role is "resource-only", meaning that it is not considered for inclusion in the output.
Of course, you can also define a key on a regular <topicref> like this:
and it will appear in the published output by default.
Regards,
Radu
You need to add "processing-role='normal'" to the key definition:
Code: Select all
<keydef href="Glossary/gloss_dita.dita" keys="DITA" print="yes" processing-role="normal"/>
https://www.oxygenxml.com/dita/1.3/spec ... eydef.html
So by default its processing-role is "resource-only", meaning that it is not considered for inclusion in the output.
Of course, you can also define a key on a regular <topicref> like this:
Code: Select all
<topicref href="Glossary/gloss_dita.dita" keys="DITA"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Jul 15, 2014 3:42 pm
Re: Print Glossary
Thanks Radu,
That worked. but it seems a bit much to have to remember to include that attribute for all the keydef entries - is there no way for it to be configured as standard?
Does that mean I don't need to add the print='yes' attribute, in which case, is the Print attribute redundant?
I do not understand your 2nd example though - what are you saying (sorry, to you it all looks quite simple, to me it's one helluva complication)?
That worked. but it seems a bit much to have to remember to include that attribute for all the keydef entries - is there no way for it to be configured as standard?
Does that mean I don't need to add the print='yes' attribute, in which case, is the Print attribute redundant?
I do not understand your 2nd example though - what are you saying (sorry, to you it all looks quite simple, to me it's one helluva complication)?
Code: Select all
<topicref href="Glossary/gloss_dita.dita" keys="DITA"/>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Print Glossary
Hi Nick,
So:
You can find this out for yourself if you open the DITA Map in the main editing area, switch to the text editing mode and move the caret on a <keydef> tag. The "Attributes" view will show you all default attribute values for it (the @class attribute value showing that the <keydef> is an extension of <topicref> and the @processing-role attribute value).
So this:
and this:
are equivalent when building the output from the DITA content.
By default the <topicref> has 'processing-role='normal'' so it appears in all outputs + you can define keys on a <topicref>, you do not have to define them on a <keydef>.
At some point I wrote on the Oxygen XML Blog a post linking to various resources about learning DITA:
http://blog.oxygenxml.com/2016/03/resou ... xygen.html
Regards,
Radu
So:
Only by creating a DITA DTD specialization which would take quite some work. But out of the box, using the <keydef> as defined in the DITA specification the attribute "processing-role" is considered to have the default value "resource-only".That worked. but it seems a bit much to have to remember to include that attribute for all the keydef entries - is there no way for it to be configured as standard?
You can find this out for yourself if you open the DITA Map in the main editing area, switch to the text editing mode and move the caret on a <keydef> tag. The "Attributes" view will show you all default attribute values for it (the @class attribute value showing that the <keydef> is an extension of <topicref> and the @processing-role attribute value).
Yes, by default on a <keydef> the print attribute has the value "yes". You would usually set a print="no" on topicrefs which you do not want to publish to PDF but want to publish to an HTML-type output.Does that mean I don't need to add the print='yes' attribute, in which case, is the Print attribute redundant?
DITA is all about inheritance. A "keydef" is actually a "topicref" with one attribute ("processing-role") set to a default value.I do not understand your 2nd example though - what are you saying (sorry, to you it all looks quite simple, to me it's one helluva complication)?
So this:
Code: Select all
<keydef href="Glossary/gloss_dita.dita" keys="DITA"/>
Code: Select all
<topicref href="Glossary/gloss_dita.dita" keys="DITA" processing-role='resource-only'/>
By default the <topicref> has 'processing-role='normal'' so it appears in all outputs + you can define keys on a <topicref>, you do not have to define them on a <keydef>.
At some point I wrote on the Oxygen XML Blog a post linking to various resources about learning DITA:
http://blog.oxygenxml.com/2016/03/resou ... xygen.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Print Glossary
Hi Nick,
No problem. As you start learning DITA if you have feedback for us, maybe ways to make the application more intuitive to use, please do not hesitate to contact us either via email (support@oxygenxml.com) or on the forum.
Happy holidays.
Regards,
Radu
No problem. As you start learning DITA if you have feedback for us, maybe ways to make the application more intuitive to use, please do not hesitate to contact us either via email (support@oxygenxml.com) or on the forum.
Happy holidays.
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