Setting ${otversion} dependent properties

14 views
Skip to first unread message

corinna...@gmail.com

unread,
Sep 9, 2024, 6:39:18 AM9/9/24
to DITA-OT Users
Hello!

I'm trying to modify our plugin build.xml file to set ant properties on the basis of the DITA-OT version, here's what I have tried:

<condition property="build-step.copy-image" value="false">
<and>
<equals arg1="${mmpdf:copyImagesToOutput}" arg2="N"/>
<isset property="otversion"/>
<compare arg1="${otversion}" arg2="4.0.0" operator="ge"/>
</and>
</condition>
<condition property="preprocess.copy-image.skip" value="true">
<and>
<equals arg1="${mmpdf:copyImagesToOutput}" arg2="N"/>
<isset property="otversion"/>
<compare arg1="${otversion}" arg2="4.0.0" operator="lt"/>
</and>
</condition>


... but running this with DITA-OT 3.7.4 fails with this error:
 
and doesn't support the nested "compare" element.

Any suggestions as to how to do this?

Best wishes!
... Corinna

Radu Coravu

unread,
Sep 9, 2024, 8:08:30 AM9/9/24
to corinna...@gmail.com, DITA-OT Users
Hi Corinna,
All possible child elements of the Ant <condition> are listed here:
There is no <compare> element available.
There is a <matches> element which can be used, maybe you can somehow express things using a regexp.

Regards,
Radu

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/e62d0d63-e165-4c02-9b98-308bc5a40c33n%40googlegroups.com.

Corinna Kinchin

unread,
Sep 9, 2024, 9:03:18 AM9/9/24
to dita-o...@googlegroups.com
Thanks so much Radu, I'll try <matches> - my fault for asking chatGPT :)

Best wishes!

Corinna

Corinna Kinchin
Datazone Ltd., developers of MiramoPDF automated publishing software
+353 64 6628964 | +353 87 7478358 | Schedule a meeting
www.miramo.com | Linkedin | YouTube

Exhibiting at Nordic Techkomm, Copenhagen [18-19 Sept] and tcworld, Stuttgart [5-7 Nov]

**** DISCLAIMER **** The contents of this e-mail are intended for the named addressee only. It contains information which may be confidential and which may also be privileged. Unless you are the named addressee (or authorized to receive for the addressee) you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. Further, we make every effort to keep our network free from viruses. However, you do need to verify that this email and any attachments are free of viruses as we can take no responsibility for any computer virus which might be transferred by way of this e-mail.

Reply all
Reply to author
Forward
0 new messages