Different keywords in each submap not resolving
Post here questions and problems related to editing and publishing DITA content.
Different keywords in each submap not resolving
Hi there
I am working on a catalogue and have the content for each product contained in a map. Each of these maps have two keydefs containing keywords for the product code and product name, e.g.:
Each of these product maps are referenced in a parent map for the whole catalogue.
The 'specification.dita' topic has a two keywords in the first paragraph:
This topic is used in each map and keywords should resolve to use the keydef in that map. Instead, when I publish, only the keywords from the first map are used.
Have I missed something here?
Many thanks
Matt
I am working on a catalogue and have the content for each product contained in a map. Each of these maps have two keydefs containing keywords for the product code and product name, e.g.:
Code: Select all
<map id="ditamap-5910">
<title>Catalogue</title>
<keydef keys="product_name">
<topicmeta>
<keywords><keyword>Product Name A</keyword></keywords>
</topicmeta>
</keydef>
<keydef keys="product_code">
<topicmeta>
<keywords><keyword>Product A</keyword></keywords>
</topicmeta>
</keydef>
<topicref href="topics/product_a.dita">
<topicref href="topics/product_a_description.dita"/>
<topicref href="shared_content/specification.dita"/>
<topicref href="topics/product_a_use_case.dita"/>
<topicref href="topics/product_a_pricing.dita"/>
</topicref>
</map>
The 'specification.dita' topic has a two keywords in the first paragraph:
Code: Select all
<p>The … <keyword keyref="product_name"/> (<keyword keyref="product_code"/>) is the best product.</p>
Have I missed something here?
Many thanks
Matt
Re: Different keywords in each submap not resolving
Hi Matt,
By default there is a single key scope, the key scope of the entire publication. So if in a main DITA Map you refer to submap1 which defines "keyName" and to "submap2" which defines the same "keyName", the "keyName" will expand to its first definition, no matter if the keyref is in the first or second submap. This is how the DITA standard works.
But there is also this concept of key scope:
https://www.oxygenxml.com/dita/1.3/spec ... copes.html
So for example if in the main DITA Map you use:
this would be enough for the keyref to "keyName" to resolve differently in the submaps.
https://www.oxygenxml.com/dita/1.3/spec ... copes.html
https://blog.oxygenxml.com/keyscopes/keyscopesBlog.html
Regards,
Radu
By default there is a single key scope, the key scope of the entire publication. So if in a main DITA Map you refer to submap1 which defines "keyName" and to "submap2" which defines the same "keyName", the "keyName" will expand to its first definition, no matter if the keyref is in the first or second submap. This is how the DITA standard works.
But there is also this concept of key scope:
https://www.oxygenxml.com/dita/1.3/spec ... copes.html
So for example if in the main DITA Map you use:
Code: Select all
<mapref href="submap1.ditamap" keyscope="k1"/>
<mapref href="submap2.ditamap" keyscope="k2"/>
https://www.oxygenxml.com/dita/1.3/spec ... copes.html
https://blog.oxygenxml.com/keyscopes/keyscopesBlog.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 907
- Joined: Thu May 02, 2019 2:32 pm
Re: Different keywords in each submap not resolving
Post by chrispitude »
Hi Matt,
If a variable needs to have different values in different parts of your top-level map, you will need to use keyscopes. In the following application note:
DITA 1.3 Feature Article:
Understanding Scoped Keys in DITA 1.3
the "widget, gadget, doodad" example on the bottom of page 5 seems to match your example.
If a variable needs to have different values in different parts of your top-level map, you will need to use keyscopes. In the following application note:
DITA 1.3 Feature Article:
Understanding Scoped Keys in DITA 1.3
the "widget, gadget, doodad" example on the bottom of page 5 seems to match your example.
-
- Posts: 907
- Joined: Thu May 02, 2019 2:32 pm
Re: Different keywords in each submap not resolving
Post by chrispitude »
Hi Matt,
What made me really appreciate the power of keyscopes was when I had to include multiple books in an online help map:
and no matter what keys were used in each of the books, all the cross-references within the book continued to work perfectly without any interference or collision with the other books.
What made me really appreciate the power of keyscopes was when I had to include multiple books in an online help map:
Code: Select all
<map>
<mapref href="book1" keyscope="book1"/>
<mapref href="book2" keyscope="book2"/>
<mapref href="book3" keyscope="book3"/>
</map>
Return to “DITA (Editing and Publishing DITA Content)”
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