Using keys for topics in bookmaps
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 23
- Joined: Wed Jul 24, 2013 12:40 am
Using keys for topics in bookmaps
Hi
I have a common bookmap that I'm using in two product bookmaps, since 95% of the material is common to both products. For some topics though, like About Product X I need to be able to reference the correct topic for the product, so one Product A book would have About Product A and the other book About Product B. I can do this using profiling by having both these topics in the common bookmap and by setting the correct profile for each topic, but I don't think this is very elegant and I'd like to be able to do it through keys so the correct topic is automatically referenced in the Product A/B bookmap.
I guess what I'm asking is, is there a way to use keys to reference topics in a bookmap?
Thanks
Richard
I have a common bookmap that I'm using in two product bookmaps, since 95% of the material is common to both products. For some topics though, like About Product X I need to be able to reference the correct topic for the product, so one Product A book would have About Product A and the other book About Product B. I can do this using profiling by having both these topics in the common bookmap and by setting the correct profile for each topic, but I don't think this is very elegant and I'd like to be able to do it through keys so the correct topic is automatically referenced in the Product A/B bookmap.
I guess what I'm asking is, is there a way to use keys to reference topics in a bookmap?
Thanks
Richard
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using keys for topics in bookmaps
Hi Richard,
Let's say you would have a product1.ditamap which would have several key mappings among which a key mapping like:
and a product2.ditamap which at some point could define a key mapping for the same key like:
Then in the common bookmap you would need to refer to the defined key:
Regards,
Radu
Let's say you would have a product1.ditamap which would have several key mappings among which a key mapping like:
Code: Select all
<keydef href="product1Info.dita" keys="productInfo"/>
Code: Select all
<keydef href="product2Info.dita" keys="productInfo"/>
Code: Select all
<topicref keyref="productInfo"/>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 23
- Joined: Wed Jul 24, 2013 12:40 am
Re: Using keys for topics in bookmaps
Ah yes, that's what I was looking for - thanks.
I've discovered that NOT defining a key for a topic that's included in the common bookmap as a keyref excludes that topic from the generated output. However, although the PDF gets generated, a validation check fails due to the missing keydef. I thought about setting <keydef href="" keys="productInfo"/> but it gives a syntax error.
I've discovered that NOT defining a key for a topic that's included in the common bookmap as a keyref excludes that topic from the generated output. However, although the PDF gets generated, a validation check fails due to the missing keydef. I thought about setting <keydef href="" keys="productInfo"/> but it gives a syntax error.
-
- Posts: 23
- Joined: Wed Jul 24, 2013 12:40 am
Re: Using keys for topics in bookmaps
I had a read of the Oasis spec for the keydef element and there's an attribute called print, which accepts values of Yes and No. Applying this to the keydef does exactly what I want:
Code: Select all
<keydef href="product1Info.dita" keys="productInfo" print="no"/>
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using keys for topics in bookmaps
Hi,
Yes, the print attribute is a kind of profiling condition based on the obtained output format, print='yes' basically means PDF pr PDF-type outputs.
Regards,
Radu
Yes, the print attribute is a kind of profiling condition based on the obtained output format, print='yes' basically means PDF pr PDF-type outputs.
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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