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?
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".
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).
Does that mean I don't need to add the print='yes' attribute, in which case, is the Print attribute redundant?
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.
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)?
DITA is all about inheritance. A "keydef" is actually a "topicref" with one attribute ("processing-role") set to a default value.
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'/>
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/resources-for-learning-dita-with-oxygen.html