Page 1 of 1

Using otherprops= for image filtering

Posted: Wed Dec 18, 2019 4:18 pm
by shereeasymile1
Hi there,

I need help with creating filters for different products for images.

Currently we use the otherprops=X (x= product version) to filter content so it appears for one version and not another.
I have 2 images: one for product X and one for all other products. When I do it this way I still get the problem of two images showing on versionX.

This is how I tried to do it but the "all other versions" image still shows on version X's PDF.

Code: Select all

 <image href="img/start_test_run.png.png" id="image_zhj_dlx_vjb" width="350" otherprops="all other versions"/> 
<image href="img/P_test_r_G2_.png" width="350" id="image_zbg_v1b_ckb" otherprops="versionX"/>
Could someone let me know what I'm doing wrong?

Thank you and kind regards,
Sheree.

Re: Using otherprops= for image filtering

Posted: Thu Dec 19, 2019 10:13 am
by DmitryS
Hi Sheree!
What happens if change "all other versions" to "all_other_versions"?

Regards,
Dmitry

Re: Using otherprops= for image filtering

Posted: Thu Dec 19, 2019 10:53 am
by Radu
Hi Sheree,

By default when it comes to DITA and filtering, everything gets included.
But you can write a DITAVAL filter file like this:

Code: Select all

<val>
    <prop action="exclude" att="otherprops"/>
    <prop action="include" att="otherprops" val="versionX"/>
</val>
to only include DITA elements which have otherprops="versionX" but to exclude all other DITA elements with @otherprops equal to any other value.

Regards,
Radu