Java extension functions getHeight and getWeight not working in new DITA-OT version 4.3.2

12 views
Skip to first unread message

Ganapathy P

unread,
Oct 21, 2024, 5:42:37 AM10/21/24
to DITA-OT Users
Hi All,

namespace: xmlns:java="org.dita.dost.util.ImgUtils"

Java extension functions getHeight and getWeight not working in version of DITA-OT

The XSLT code snippet is below;

    <xsl:variable name="width-px" select="number(java:getWidth($image.dir, string(@href)))"/>
    <xsl:variable name="height-px" select="number(java:getHeight($image.dir, string(@href)))"/>

Error: Fatal Error! Cannot find a 2-argument function named Q{org.dita.dost.util.ImgUtils}getWidth()


Please provide your suggestion if you are facing this issue earlier.

Regards
Ganapathy


Radu Coravu

unread,
Oct 21, 2024, 9:00:48 AM10/21/24
to Ganapathy P, DITA-OT Users
This Google Group is not that used anymore. Maybe in the future you can start a new discussion on the DITA OT discussions list:
Recent versions of the DITA OT have a pre-processing step which uses a Java class named "ImageMetadataModule" that adds width/height attributes to all image references during the pre-processing. You can search in all the DITA OT build files for "ImageMetadataModule" to see how it is used by the base plugins.

--
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/CABZNbqSqLfdZhOuf%3DXvVU8pvW9dQQgBABRsX-2tajxBg3VZK_g%40mail.gmail.com.

Ganapathy P

unread,
Oct 21, 2024, 9:04:57 AM10/21/24
to Radu Coravu, DITA-OT Users

Thanks, I'll check it out.

Reply all
Reply to author
Forward
0 new messages