Page 1 of 1

Conditional processing

Posted: Thu Sep 15, 2011 11:14 pm
by Bob.Conlin
Hello,

How do I set up automatic conditional processing? Specifically I want to use the product attribute to control if an element is included or not. What I have so far is a topic that will be reused many times that only needs a couple of <p> elements to be specific for the different ditamaps that reference that topic. I also have another topic with an acronyms table with the rows identified by a product attribute. I succeeded in rendering to PDF by first creating the profiling attributes and then with the condition set in the supporting topics the correct elements rendered when I submitted the ditamap. Then to render the next ditamap I have to manually change the conditional profile in the supporting topics. I suspect there is a way to set the topicref in the ditamap to automate this but I haven’t been able to figure it out. :( I did find http://docs.oasis-open.org/dita/v1.0/ar ... dproc.html on the OASIS site but that didn’t help me. Everything I’ve read says conditional reusable content is a big reason to use DITA. I plan on using a lot more conditional profiles as I build the document set, I just need a better way to implement it.

Re: Conditional processing

Posted: Fri Sep 16, 2011 11:52 am
by Radu
Hi Bob,

Profiling attributes are useful to publish different content data starting from a DITA Map by filtering parts of the source.

I'll start with an example. Our user manual is published using DITA. We have a single DITA Map but with different DITAVAL filter files we can publish it to different contents depending on the product type (we have Oxygen XML Editor, Developer, Author and SVNClient).
We use the "product" attribute to filter entire topic references from the DITA Map like:

Code: Select all

 <topicref href="tasks/installation-instructions-all-platforms.dita"
product="editor author svnClient diff developer" collection-type="sequence"/>
or elements from inside a topic like:

Code: Select all

 <ph product="author">
<filepath>oxygenAuthor.bat</filepath>
</ph>
<ph product="developer">
<filepath>oxygenDeveloper.bat</filepath>
</ph>
Our editor.ditaval filter (for publishing the Oxygen XML Editor user manual) content look like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<val>
<prop action="exclude" att="product" val="editorEclipse"/>
<prop action="exclude" att="product" val="author"/>
<prop action="exclude" att="product" val="authorEclipse"/>
<prop action="exclude" att="product" val="svnClient"/>
<prop action="exclude" att="product" val="diff"/>
<prop action="exclude" att="product" val="developer"/>
<prop action="exclude" att="product" val="developerEclipse"/>
<prop action="exclude" att="product" val="expertDeveloper"/>
<!--This will generate content only for Oxygen XML Editor-->
<prop action="include" att="product" val="editor"/>
</val>
So in our case we decided to use a single map and by using one DITAVAL filter file or another we can produce user manuals for all our products starting from a single DITA Map.

An Oxygen transformation scenario has settings which allow you to specify such a DITAVAL file to be used when publishing or to create and use automatically a DITAVAL file based on the profiling condition set you have currently selected for the DITA Map:

http://www.oxygenxml.com/doc/ug-editor/ ... lters.html

In your case you seem to have more than one DITA Maps.
So from what I understand you have set values to the "product" attribute in order to successfully generate different outputs (depending on the filters) from the first DITA Map.
For the second map, are the values you have set for "product" not applicable? Maybe then you can use another profiling attribute like "audience" and profile the first map with "product" and then second map with "audience".

Maybe if I have understood wrong you can give us more details about the particular use case.

Regards,
Radu

Re: Conditional processing

Posted: Fri Sep 16, 2011 6:31 pm
by Bob.Conlin
Thanks for the quick response. Actually I like your solution (a single ditamap for multiple output) better than my plan to create multiple datamaps. The DITAVAL filter file is new to me, I'll research that. I'm not clear on how to implement the DITAVAL in the transformation scenarios but you have definitly started me on the right track.

Re: Conditional processing

Posted: Mon Sep 19, 2011 8:56 am
by Radu
Hi Bob,

The DITA Open Toolkit used by Oxygen to publish DITA content to various output sources uses a filter file with the extension .ditaval to filter elements based on various profiling attribute values:

http://docs.oasis-open.org/dita/v1.1/OS ... taval.html

Oxygen has a new file template for creating such a file.

If you choose to duplicate and edit an Oxygen transformation scenario (like "DITA Map to PDF"), it contains a Filters tab where you can either specify a custom ditaval file or allow Oxygen to automatically generate one for you either by using the current applied condition set or by filling in a table with the attribute names and values which should be excluded.

By the way, we also have some video demonstrations with the DITA support in Oxygen which you might find useful:

http://www.oxygenxml.com/videos.html

Regards,
Radu

Re: Conditional processing

Posted: Thu Jun 07, 2018 3:56 pm
by taz-man
We have 25 different applications that each need a PDF. For these our project uses a ditamap to contain all of our variables "conditionalized" with properties and uses a specific ditaval for each PDF transform to control what variables appear. For our project, we have a specific bookmap ditamap for each book. In summary for each PDF, we have one bookmap ditamap and use a specific transform to reference a specific ditaval to control which variables get used in the variables file.

We are now creating a new project for release notes for these applications. I've been wondering if it would be more efficient to change our model slightly and use a single bookmap ditamap that many uses "conditionalized" content sections controlled by the same properties to variables rather than using many specific bookmaps. Since release notes don't contain too many topics, I think this would work since we already have ditavals to control the "conditionalized" properties.

Has anyone determined if there's a good rule for deciding to when to use unique bookmaps to control the content of a book versus a single bookmap with conditional properties? Since we already have created the ditaval structures to conditionalize variables, I feel it might be easier to conditionalize the content too - less ditamaps to maintain. Some on my team think the single bookmap with many conditionalized sections would be too messy for multiple writers to use. I do see this point,so I'm unsure this there's a preferred way.

I want to ask some DITA experts if they see any advantage in either scenario so I can take the feedback to my team. thank you!

Re: Conditional processing

Posted: Fri Jun 08, 2018 9:12 am
by Radu
Hi,

So:
Has anyone determined if there's a good rule for deciding to when to use unique bookmaps to control the content of a book versus a single bookmap with conditional properties? Since we already have created the ditaval structures to conditionalize variables, I feel it might be easier to conditionalize the content too - less ditamaps to maintain.
In my opinion for products which are very similar and share a lot of the table of contents structure, a single DITA Map would probably be better.
But I think it's hard to decide which is better, as with anything "it depends".
Some on my team think the single bookmap with many conditionalized sections would be too messy for multiple writers to use. I do see this point,so I'm unsure this there's a preferred way.
We use a single bookmap for our Oxygen User's Manual and depending on the filtering we obtain about 10 user's manuals for all our products. I can confirm working on a single DITA Map containing lots of profiling and such increases the cognitive load. But we do reuse much of the table of contents structure and most of the topics so I think that at least in our case we are probably better off.
I want to ask some DITA experts if they see any advantage in either scenario so I can take the feedback to my team. thank you!
You may also want to register on the Yahoo Groups DITA Users list and ask there, maybe they have better suggestions for you.

Regards,
Radu