Profiling condition sets at the project level do not work

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DrStrangelove
Posts: 18
Joined: Thu Jan 25, 2018 11:21 pm

Profiling condition sets at the project level do not work

Post by DrStrangelove »

Our group would like to be able to toggle text based on a feature ID. To do this, I created a ditaval file whose entries have att="otherprops" , val = the feature ID, and the appropriate action. I went to Profiling/Conditional Text, and under Profiling Condition Sets, I specified this ditaval file.

When the transformation and the condition set are defined at the global level, the toggles work as expected. However, I would like to be able to store them in our source control system, so I need to define them at the project level.

When the transformation is at the project level, the toggles do not work (the text is always displayed).

I am using Author 19.1. Is this expected behavior? I tried setting my condition sets to be the same at the project and global level, but when I run a project-level transformation, the toggles do not work.
sorin_carbunaru
Posts: 398
Joined: Mon May 09, 2016 9:37 am

Re: Profiling condition sets at the project level do not work

Post by sorin_carbunaru »

Hello,

I tried a similar scenario in <oXygen/> XML Author 19.1, build 2017121318, and I didn't get the same behavior. It worked as expected. Let me tell you what exactly I did...

So, I created one DITA map and I referred one topic, and inside the topic I added "otherprops="toExclude"" on a paragraph. I also created a DITAVAL file containing the following rule: "<prop action="exclude" att="otherprops" val="toExclude"/>", and I added it to the "Profiling condition sets" table from the "Profiling/Conditional Text" preferences page. After that, I saved the preferences page at project level.

Coming back to the main editing area, I activated the new condition set from the "Profiling/Conditional Text" toolbar button. Then I clicked the "Configure Transformation Scenario" toolbar button, duplicated the "DITA Map PDF"/"DITA Map XHTML" scenario and saved the duplicate at the project level. When running the transformation, the profiled text is excluded from the output.

Please let me know if you find any differences between the way I tried to reproduce the problem and how you actually do it.

Best wishes,
Sorin Carbunaru
oXygen XML
DrStrangelove
Posts: 18
Joined: Thu Jan 25, 2018 11:21 pm

Re: Profiling condition sets at the project level do not work

Post by DrStrangelove »

Hi Sorin, thanks for your reply. As it turns out, while testing, I had updated my global transformation to use the same filter as the one I used for the condition set. That's why it worked in the global context.

But I am still trying to solve a problem related to condition sets. Under a project, we have various transformations, each of which has a different DITAVAL filter defined on the transformation. I am trying to find a way to combine the filter on the transformation with another filter (the only thing I could find is condition sets). The reason we need this is because we want to (a) have a single DITAVAL file with our feature IDs identifying whether they are included or excluded, and (b) have all of the transformations consume this second filter.

The problem is, it seems that if there is a DITAVAL filter on the transformation, Oxygen is not combining this with the DITAVAL filter defined as a condition set. Is this intentional, or is it a bug? If it is intentional, is there some other way I can get a transformation to ingest two DITAVAL filter files?
DrStrangelove
Posts: 18
Joined: Thu Jan 25, 2018 11:21 pm

Re: Profiling condition sets at the project level do not work

Post by DrStrangelove »

I think I have a solution. I can specify ditavalref in my ditamap, for example: <ditavalref href="feature-toggles.ditaval"/>
And still have a ditaval filter on the transformation for that map.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Profiling condition sets at the project level do not work

Post by Radu »

Hi,

Using the <ditavalref> is one solution, it might not be a fully implemented DITA 1.3 feature so you need to check out if you obtain the proper output using it.

Here's another way:

The DITA Open Toolkit publishing engine bundled with Oxygen allows receiving multiple references to DITAVAL filters, references which it can automatically merge and use as one DITAVAL during the transformation.
But because this is not a very used feature Oxygen's UI interface does not yet allow you to choose multiple DITAVAL filter files in the transformation scenario "Filters" tab.
What you can do is remove any reference to a DITAVAL file or to a profiling condition set in the transformation scenario Filters tab and instead go to the Parameters tab and edit the value of the args.filter parameter passing to it an enumeration of multiple ";"-delimited paths to DITAVAL files like:

D:\projects\samples\dita\flowers\test.ditaval;D:\projects\samples\dita\flowers\test2.ditaval

you can also use Oxygen editor variables like ${pd} when defining this enumeration of DITAVAL files in the parameter value like:

${pd}\test.ditaval;${pd}\test2.ditaval

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply