On 10/14/24 00:01, Jirka Kosek wrote:

I've encountered strange behaviour of DITAC that seems to me as a bug in filtering when attribute groups are used.

Consider that map includes topic by:

<topicref href="topic-for-group-B.dita" audience="group(B)"/>

Now lets consider that I want to include only topics belonging into group A. I will use the following .ditaval file

<val>
   <prop action="exclude" att="group"/>
   <prop action="include" att="group" val="A"/>
</val>

However topic topic-for-group-B.dita is included. It seems that exclude for group in .ditaval is ignored.

If I will modify .ditaval to exclude all profiling attributes and groups instead, filtering works correctly:

<val>
   <prop action="exclude"/>
   <prop action="include" att="group" val="A"/>
</val>

Filtering works correctly also if I will directly reference profiling attribute instead of attribute group in .ditaval as:

<val>
   <prop action="exclude" att="audience"/>
   <prop action="include" att="group" val="A"/>
</val>

So to me it seems that following is being ignored by ditac:

   <prop action="exclude" att="group"/>

Seems like attribute groups are not honored for exclusions in ditac. My understading of DITAC specs is that this should work and DITA-OT also support this -- and produces different output than DITAC when filtering is applied in this way.

Many thanks in advance for looking into this issue.

Yes, it seems that we have a bug here.
---
<val>
  <prop action="exclude" att="group"/>
  <prop action="include" att="group" val="A"/>
</val>
---
does not work

while
---
<val>
  <prop action="exclude" att="audience"/>
  <prop action="include" att="group" val="A"/>
</val>
---

works.

A quick look at the code seems to indicate that the problem comes from:
---
  <prop action="exclude" att="group"/>
---
which is not supported because (1) prop/@att is not the name of an filtering attribute (e.g. "audience") but the name of a group (e.g. "group") within this filtering attribute AND (2) there is no prop/@val

(which is indeed valid DITA
--
 @att
The attribute to be acted upon. If using a literal attribute name, it must be one of @props, @audience, @platform, @product, @otherprops, @deliveryTarget, or a specialization of @props. Otherwise, the value should be the name of a group used within the @audience, @platform, @product, or @otherprops attributes. If the @att attribute is absent, then the <prop> element declares a default behavior for any conditional processing attribute.
--
https://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part2-tech-content/langRef/ditaval/ditaval-prop.html)

We'll try to reproduce the bug here at XMLmind Software and fix it for next release of ditac (v3.16).



--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to