Re: conref and filtering

Stuart Norton <snorton@...>

Thanks for your response Christine. I tried it but that's not working for me; whether I used the product attribute in the conref or the section itself, the content inside the conref is not filtered.


I also tried setting filter-stage = "late" but I was surprised to see that it had no effect in the content inside the conref was still not filtered (using a modified oxygen DITA OT HTML 5 transform).


What worked better was specifying the filter file on the DITA command line using args.filter, instead of inside the map. If I specify args.fiter to indicate the DITA valve file from the command line, instead of using a ditavalref from inside the map, it works as I expected: the material inside the conref with the unmatched product attribute is filtered out, even if I only specify the product attribute on the paragraphs and not the section or topic.


Of course, specifying one filter on the command line doesn't help us do with branch filtering, where we want different sections of the ditamap to be filtered differently.


It basically looks to me like branch filtering is not designed to handle conditions inside conrefs. Am I missing something?





Juniper Business Use Only

From: <> On Behalf Of stinakab via
Sent: Tuesday, December 15, 2020 1:30 AM
Subject: Re: [dita-users] conref and filtering


[External Email. Be cautious of content]


Hi Stuart,

First of all, I would say that since the conref element only references that section (the section is not in the topic for real), it is not possible for the transformation to identify which parts should be filtered or not, especially if that section has no product attribute.
So maybe you could try the following:
For referencing, create product-related sections, not one section that contains only product-related <p> elements.
<section id="section_amd_sfj_znb" product="shown-product hidden-product">
   <title>Shared section</title>
   <p product="shown-product">I want to show this paragraph</p>
   <p product="hidden-product">I want to hide this paragraph</p>
It worked for me to conref this product-related section. If this doesn't work for you, you could also add a product attribute to the conref element, just in case. Our ditaval files are just like yours.


Join to automatically receive all group messages.