Using otherprops= for image filtering

Post here questions and problems related to editing and publishing DITA content.
shereeasymile1
Posts: 3
Joined: Thu Dec 05, 2019 1:10 pm

Using otherprops= for image filtering

Post 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.
DmitryS
Posts: 26
Joined: Wed Nov 27, 2019 11:03 am

Re: Using otherprops= for image filtering

Post by DmitryS »

Hi Sheree!
What happens if change "all other versions" to "all_other_versions"?

Regards,
Dmitry
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using otherprops= for image filtering

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply