Combining ditavalref and conref (processing order?)

Post here questions and problems related to editing and publishing DITA content.
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Combining ditavalref and conref (processing order?)

Post by Fredrik_Lönn »

Hi,

I just wanted to quickly check if I am doing something unsupported. Profiling inside an element that is included with a conref, that worked well when using the editor profiling filters does not work when applying the same filters with a ditavalref.

EDIT:
I found this page, http://www.dita-ot.org/2.4/dev_ref/proc ... order.html, that explains that DITA-OT filters before resolving conrefs, but it does not mention any difference in order depending on how the DITAVAL file is refrenced (by ditavalref or as part of buildfile).
END EDIT.

I have a ditamap that includes another map by use of a topicref. A ditavalref element is used to reference a file containing a general exclude and a list of includes.

Code: Select all

<topicref href="prodspec_content_map.ditamap" format="ditamap">
<ditavalref href="filters.ditaval"/>
</topicref>
The ditaval file principally looks like this (exact products and features replaced by generics):

Code: Select all

<val>
<prop action="exclude"/>
<prop action="include" att="product" val="Product_A" />
<prop action="include" att="product" val="All_products" />
<prop action="include" att="props" val="Feature_1"/>
<prop action="include" att="props" val="Feature_2"/>
<prop action="include" att="props" val="Feature_3"/>
</val>
One of the dita-files in the prodspec_content_map.ditamap references content from a dita-file with a number of reusable text elements that also have profiling attributes assigned. This reference is used using conrefs:

Code: Select all

<ph conref="../reusable/c_ruse_text.dita#c_ruse_text/reuse_lo_limit"/>
This worked as expected when I used the Profiling Filter tool in the DITA Maps Manager, instead of the ditavalref as described above. Now, with the ditavalref it seems that the content included by the conrefs is output as completely unprofiled! The profiling is still visible in the editor. Does anyone recognize this?
mihaela
Posts: 489
Joined: Wed May 20, 2009 2:40 pm

Re: Combining ditavalref and conref (processing order?)

Post by mihaela »

Hi,

We need some sample files in order to reproduce the problems you describe regarding the usage of ditavalref.
Can you please send us your files (or a similar sample) on our support email address (support@oxygenxml.com)?

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Re: Combining ditavalref and conref (processing order?)

Post by Fredrik_Lönn »

Hi,

I managed to get around this issue by including the topic with reused text in my innermost map and setting the attribute processing-role to "resource-only". I guess that by doing this, the DITA-OT filtering stage (that apparently happens before conref completion) is applied to this file as well.

I still don't know why the result differs when using the filter function in the editor, but I will assume that that processing happens after conref completion.

Best Regards,
Fredrik
Radu
Posts: 8991
Joined: Fri Jul 09, 2004 5:18 pm

Re: Combining ditavalref and conref (processing order?)

Post by Radu »

Hi Fredrik,

If you can put together a small sample DITA project on which the original problem could be reproduced, zip it and send it to "support@oxygenxml.com" and I could try to take a look at it, maybe also run it with the latest released DITA OT 3.0 and see how it behaves in this situation, or add an issue on the DITA OT issues list.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Apollo102
Posts: 8
Joined: Mon Nov 26, 2018 12:56 am

Re: Combining ditavalref and conref (processing order?)

Post by Apollo102 »

Hi,
this is how it worked for me:
For ditaval to be applied to warehouse_task, processing-role="normal". So that despite keydef does not appear in the toc, additionally toc="no". So that no indexing for search additionally set the attribute search="no".

Code: Select all

    <keydef href="warehouse_task_0002.xml"
        keys="warehouseTask"  type="task" processing-role="normal" toc="no" search="no">   
        <topicmeta>
            <navtitle translate="no">warehouse_task</navtitle>
        </topicmeta>
    </keydef>
Regards,

Apollo
Radu
Posts: 8991
Joined: Fri Jul 09, 2004 5:18 pm

Re: Combining ditavalref and conref (processing order?)

Post by Radu »

Hi,

Thanks for posting the workaround.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Dan02
Posts: 31
Joined: Thu Sep 30, 2021 6:46 pm

Re: Combining ditavalref and conref (processing order?)

Post by Dan02 »

Hi,
I just ran into this same problem:
- Collection file contains reusable content, with two different conditions applied.
- One (or more) topics reuse content from the collection file via conref.
- Apply ditavalref to the map - but conditions are ignored in the output.
- Select the same ditaval file in the transformation scenario params - and conditions are applied in the output.
- Workaround in Apollo's post above works - use a topicref to point to the ditaval, and set processing-role to normal (and set search and toc to no).
But is this really expected behavior? Why the inconsistency?
What is the intended processing order? Is this a bug that needs fixing?
Thanks,
Dan
Radu
Posts: 8991
Joined: Fri Jul 09, 2004 5:18 pm

Re: Combining ditavalref and conref (processing order?)

Post by Radu »

Hi Dan,

Not sure, if you create a very small sample DITA project which can be used to reproduce the problem and send it to us via email (support@oxygenxml.com) along with steps to reproduce the problem, I could try to find some time to look into this.
There are a bunch of already opened ditavalref-related issues and possibly this is covered in one of those issues:
https://github.com/dita-ot/dita-ot/issu ... ditavalref

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