Display ditaval flag on topicref and mapref
Post here questions and problems related to editing and publishing DITA content.
Display ditaval flag on topicref and mapref
Hi there
I have created a ditaval to display different background and text colours for specified product and platform values, on publication. These work as expected when applied to elements within a topic.
However, we have some topics and maps referenced in our bookmaps, that may have platform or product attributes applied. The ditaval flags do not appear to work on topicref or mapref elements. Is that expected behaviour? Or, is there a way that it can be achieved.
Many thanks
Matt
I have created a ditaval to display different background and text colours for specified product and platform values, on publication. These work as expected when applied to elements within a topic.
However, we have some topics and maps referenced in our bookmaps, that may have platform or product attributes applied. The ditaval flags do not appear to work on topicref or mapref elements. Is that expected behaviour? Or, is there a way that it can be achieved.
Many thanks
Matt
Re: Display ditaval flag on topicref and mapref
Hi Matt,
Is this question related to editing or to publishing? If it's about publishing, to what output format do you publish?
Can you maybe give a small example about how the DITA Map looks like, what the DITAVAL looks like and what the expected publishing should look like?
Regards,
Radu
Is this question related to editing or to publishing? If it's about publishing, to what output format do you publish?
Can you maybe give a small example about how the DITA Map looks like, what the DITAVAL looks like and what the expected publishing should look like?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Display ditaval flag on topicref and mapref
Hi Radu
This question relates to publishing to PDF and EPUB.
I've replicated what we are trying to achieve below:
The map:
topic_1.dita looks like this:
pl1_topic.dita looks like this (others are the same, but with different pl#):
The ditaval that we want to use to show all content, but with a different colour for each product attribute, looks like this:
Where we have applied a product attribute to a topicref, we would like to include it in the output, but with the colour defined in the ditaval.
As an alternative, I tried applying the product attribute to the <body> element, but that doesn't appear to work.
I'd be grateful for any suggestions that you may have.
I'll email a package of the content and output to the support email address.
Many thanks
Regards
Matt
This question relates to publishing to PDF and EPUB.
I've replicated what we are trying to achieve below:
The map:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="ditamap-8452" xml:lang="en-gb" class="- map/map ">
<title class="- topic/title ">Test map</title>
<topicref href="topic_1.dita" class="- map/topicref ">
<topicref product="pl1" href="pl1_topic.dita" class="- map/topicref "/>
<topicref product="pl2" href="pl2_topic.dita" class="- map/topicref "/>
<topicref product="pl3" href="pl3_topic.dita" class="- map/topicref "/>
<topicref product="pl4" href="pl4_topic.dita" class="- map/topicref "/>
</topicref>
</map>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic-5562" xml:lang="en-gb" class="- topic/topic "><title class="- topic/title ">Topic 1</title><shortdesc class="- topic/shortdesc "/><prolog class="- topic/prolog "><author translate="no" type="creator" class="- topic/author ">Matt</author><metadata class="- topic/metadata "><keywords class="- topic/keywords "/></metadata></prolog><body class="- topic/body "><p class="- topic/p ">This topic has some content for each of the 4 outputs:</p><ul class="- topic/ul "><li product="pl1" class="- topic/li ">
<p class="- topic/p ">This bullet is for PL1.</p>
</li><li product="pl2" class="- topic/li ">
<p class="- topic/p ">This bullet is for PL2.</p>
</li><li product="pl3" class="- topic/li ">
<p class="- topic/p ">This bullet is for PL3.</p>
</li><li product="pl4" class="- topic/li ">
<p class="- topic/p ">This bullet is for PL4.</p>
</li></ul></body></topic>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic-6268" xml:lang="en-gb" class="- topic/topic ">
<title class="- topic/title ">PL1 topic</title>
<shortdesc class="- topic/shortdesc "/>
<prolog class="- topic/prolog ">
<author translate="no" type="creator" class="- topic/author ">Matt</author>
<metadata class="- topic/metadata ">
<keywords class="- topic/keywords "/>
</metadata>
</prolog>
<body class="- topic/body " product="pl1">
<p class="- topic/p ">This topic is for PL1 only.</p>
</body>
</topic>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<val>
<prop action="exclude" att="audience">
<startflag/>
</prop>
<prop action="include" att="audience" val="pdf"/>
<prop action="exclude" att="platform" val="subjective"/>
<prop action="flag" att="product" color="#00B0F0" val="pl1"/>
<prop action="flag" att="product" color="red" val="pl2"/>
<prop action="flag" att="product" color="green" val="pl3"/>
<prop action="flag" att="product" color="magenta" val="pl4"/>
</val>
As an alternative, I tried applying the product attribute to the <body> element, but that doesn't appear to work.
I'd be grateful for any suggestions that you may have.
I'll email a package of the content and output to the support email address.
Many thanks
Regards
Matt
Re: Display ditaval flag on topicref and mapref
I've done a bit more testing.
I have found that we can achieve the required results by applying the product attribute to a child element of the topic body, even if the topicref has the same product attribute.
I tested this by adding a Learning Content topic to the same map, applied the product attribute to the topicref and to the learningContentbody/lcIntro, like this:
It is not very elegant or ideal, but it seems to work.
I have found that we can achieve the required results by applying the product attribute to a child element of the topic body, even if the topicref has the same product attribute.
I tested this by adding a Learning Content topic to the same map, applied the product attribute to the topicref and to the learningContentbody/lcIntro, like this:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE learningContent PUBLIC "-//OASIS//DTD DITA Learning Content//EN" "learningContent.dtd">
<learningContent id="untitled1">
<title>PL 1 learning topic</title>
<learningContentbody>
<lcIntro id="lcIntro_kym_ldq_5qb" product="pl1">
<p>This is a PL1 learning topic.</p>
</lcIntro>
</learningContentbody>
</learningContent>
Re: Display ditaval flag on topicref and mapref
Hi Matt,
I found this older issue I had added on the DITA Open Toolkit issues list, re-opened it and added a reference to this forum thread:
https://github.com/dita-ot/dita-ot/issues/2809
Indeed right now as a workaround you need to add the profiling attribute also inside the topic, from my small tests adding it to the root element should also work.
Regards,
Radu
I found this older issue I had added on the DITA Open Toolkit issues list, re-opened it and added a reference to this forum thread:
https://github.com/dita-ot/dita-ot/issues/2809
Indeed right now as a workaround you need to add the profiling attribute also inside the topic, from my small tests adding it to the root element should also work.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 495
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Display ditaval flag on topicref and mapref
Post by julien_lacour »
Hello,
Starting with Oxygen 24.0, flagging attributes (@audience, @platform, @product, etc.) set on topicrefs are copied onto their target topics when using DITA Map PDF - based on HTML5 & CSS transformation.
Regards,
Julien
Starting with Oxygen 24.0, flagging attributes (@audience, @platform, @product, etc.) set on topicrefs are copied onto their target topics when using DITA Map PDF - based on HTML5 & CSS transformation.
Regards,
Julien
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