Issues with profiling inisde reusable components

Post here questions and problems related to editing and publishing DITA content.
msapaev
Posts: 2
Joined: Wed Jul 21, 2021 5:00 pm

Issues with profiling inisde reusable components

Post by msapaev »

Hi there!
I've got an issue with profiling inside reusable content.
I have a DITA topic with some profiled content. For example, it could be a list of items that should appear in the output depending on the platform:

Code: Select all

<ul>
<li>Some content</li>
<li platform="course">Course content</li>
<li platform="help">Help content</li>
</ul>
The topic is in a ditamap with a ditaval file. For example, to include content intended for the "course" platform and exclude content intended for the "help" platform

Code: Select all

<val>
    <prop action="exclude" att="platform" val="help"/>
    <prop action="include" att="platform" val="course"/>
</val>
When I create a PDF using a transformation scenario in oXygen 23.1, the content of the ditamap is profiled well according to the ditalav file. I get rid of "help" content, the "course" content is in the pdf.

Issues come when I create a reusable component using this profiled list. So now the list with profiled items is in a reusable topic, and my topic in the ditamap has a conref link to this reusable topic with that profiled list. When I create a pdf again, the list contains all the items including "help" ones that should be omitted according to the ditaval file (and that were omitted, when the list was directly in the topic).

Is it a known limitation? I've googled a bit and have found nothing. If not, could you please advise me on what could I do to profile content inside reusable components so that it works?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issues with profiling inisde reusable components

Post by Radu »

Hi,
Oxygen 23 is in our end of life stage so officially we no longer support it:
https://www.oxygenxml.com/eol.html
Coming back to your issue:
The topic is in a ditamap with a ditaval file.
Do you mean you are using branch filtering (ditavalref)?
If so, are you using multiple branches or did you consider a good idea to connect the DITA Map with the DITAVAL directly instead of specifying the DITAVAL filter in the transformation scenario?
The publishing engine has multiple stages, the branch filtering stage is done before the conref expansion stage. So if the topic containing reusable content is not referenced directly in the DITA Map branch, the ditaval filter will not be applied to it in the branch filtering stage.
If you do not necessarily need branch filtering I would suggest you do avoid it:
https://github.com/orgs/dita-ot/discussions/4282
In my opinion in order for branch filtering to work properly you also need to use conkeyref and key scopes to reuse content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
msapaev
Posts: 2
Joined: Wed Jul 21, 2021 5:00 pm

Re: Issues with profiling inisde reusable components

Post by msapaev »

Hi Radu!

Thank you for your answer, it makes sense! We use ditaval files referenced directly in our ditamaps as <ditavalref> so we just used our regular transformation scenarios with no additional profiling setting.
So I followed your advice and defined the ditaval file at the transformation scenario level and voila, the content profiled properly.
Unfortunately, it seems using conkeyref is not a convenient way for us at this stage, so I haven't checked if it helps but I believe it will.

Thank you so much for your help!
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issues with profiling inisde reusable components

Post by Radu »

Hi,
Thanks for updating the thread!
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply