Rendering and flagging content from all conditions

Post here questions and problems related to editing and publishing DITA content.
Ronser
Posts: 13
Joined: Thu Apr 12, 2018 5:33 pm

Rendering and flagging content from all conditions

Post by Ronser »

Hi,

We have single-sourced content for a product for two brands. We conditionalize the content using the product attribute.

A regulatory body wants to see the difference between the manuals that we output for both brands. I am trying a PDF2 build that uses conditional flagging in a ditaval to output a PDF that includes content for both brands and flags the condtionalised content e.g. a purple background for product A content, a red background for Product B content.

I'm running into some issues though. We have conditionalized keyref'd images. In the images keydef map, if Product A is defined before Product B, in the PDF, only Product A will render. An example of the image keydef map in this instance:

<keydef href="ProductA.png" format="png" keys="image1" product="A"/>
<keydef href="ProductB.png" format="png" keys="image1" product="B"/>

I would want both images to render and show the conditional flagging.

Is there any way to achieve this without reworking all my images? Or is there any other way we could provide regulatory with a view of what's different between 2 versions of content?

Thanks

Ronan
Radu
Posts: 9440
Joined: Fri Jul 09, 2004 5:18 pm

Re: Rendering and flagging content from all conditions

Post by Radu »

Hi Ronan,

According to the DITA specification if you have two or more keys with the same name the first key definition will always be used. And the publishing engine is implemented based on the specification.
The only way I see right now to make this work for this particular use case would be to avoid using keys completely.
Maybe you can also ask around on the DITA Users List, get some more ideas about this: https://dita-users.groups.io/g/main

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: Rendering and flagging content from all conditions

Post by chrispitude »

Hi Ronan,

If you can find a utility to diff HTML webpages, one idea might be to use PDF Chemistry to publish both condition-specific documents, then compare the intermediate merged HTML between the two transformations.

The intermediate merged HTML file produced by PDF Chemistry is similar to the DITA-OT's HTML5 output, but it is one monolithic large file instead of being split up into individual files, which would be perfect for diffing.

This has the advantages of operating on text content and removing PDF pagination as a complicating factor. You could even apply highlighting colors to the conditions in both transformations, if you are able to find an HTML comparison utility that shows them.

The trick to this approach would be to find an HTML diffing utility that looks at the rendered/user-facing output, and not all the individual HTML ID/anchor/etc. attributes that don't actually matter to this comparison.
Post Reply