Page 1 of 1
.framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Wed Dec 04, 2024 2:26 pm
by vishwavaranasi
image2022-9-12_19-8-18.png
Hello Team ,
We have a custom insert image operation for the below
image2022-9-12_19-8-18.png
our .framework file distributed via add-ons and the custom operation works fine in oxygen 24 version.
here is the entry
Code: Select all
<poPatch>
<field name="fieldPath">
<String>authorExtensionDescriptor/actionDescriptors/[11]/actionModes</String>
</field>
<field name="index">
<Integer>0</Integer>
</field>
<field name="value">
<actionMode>
<field name="xpathCondition">
<String>oxy:allows-child-element("*", "class", " topic/image ")</String>
</field>
<field name="argValues">
<serializableOrderedMap/>
</field>
<field name="operationID">
<String>com.custom.operations.InsertImageOperation</String>
</field>
</actionMode>
</field>
<field name="patchHandling">
<String>addIndex</String>
</field>
<field name="anchor">
<null/>
</field>
</poPatch>
The mapping of the operation shows in oxygen as below in oxygen 24 - showing correctly our mapped operation
oxygen24.png
where as when we installed same framework file to oxygen 26 - showing 2 entries - our custom is in 2 entry
entry 1 is oxygen default and entry 2 - which is pointing to our custom insert - because of these 2 entries in oxygen 26 the insert image showing oxygen default instead our custom.
oxygen26.png
would you please help us to make sure the .framework file works for both oxygen 24 and oxygen 26 version.
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Thu Dec 05, 2024 11:52 am
by Radu
Hi,
Oxygen 24 is in our end of life stage so we no longer officially support it in any way (including technical support, security patches, fixes):
https://www.oxygenxml.com/eol.html
Instead of creating your own "insert.my.image" action and using it in the content completion, toolbars and menus instead of the original "insert.image", you edited the original "insert.image" action and changed the custom operation that it calls. This indeed saves a patch with your changes in the framework. Later on I think probably in a newer Oxygen version the base "insert.image" action was changed by us and its xpath was changed. And somehow now there are problems as Oxygen is unable to correctly apply the patch so that it works both with Oxygen 24 and 26.1 (or our latest Oxygen
As possible workarounds I see:
- Give up support for Oxygen 24 and support only Oxygen 26 or newer, making changes to the framework extension only in Oxygen 26.
- Create in Oxygen 24 your own custom action "insert.my.image" in your framework extension and use that in all places (toolbars, menus, content completion window) instead of editing the base "insert.image" action.
- Keep two extension framework files, one for Oxygen 24 and one for Oxygen 26 and maybe two add-ons to install your frameworks, one for each Oxygen version.
Regards,
Radu
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Mon Dec 09, 2024 8:55 am
by vishwavaranasi
Thanks for the inputs Radu.
We will consider moving to newer version of oxygen.
Thanks,
Vishwa
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Wed Jan 29, 2025 3:16 pm
by vishwavaranasi
Hello Radu , we are now moving to Oxygen 27
where do we can find the Xpath Expression for "insert.image" for version 27?
right now our .framework file has this action defined for oxygen 24
Code: Select all
<poPatch>
<field name="fieldPath">
<String>authorExtensionDescriptor/actionDescriptors/[11]/actionModes</String>
</field>
<field name="index">
<Integer>0</Integer>
</field>
<field name="value">
<actionMode>
<field name="xpathCondition">
<String>oxy:allows-child-element("*", "class", " topic/image ")</String>
</field>
<field name="argValues">
<serializableOrderedMap/>
</field>
<field name="operationID">
<String>com.custom.operations.InsertImageOperation</String>
</field>
</actionMode>
</field>
<field name="patchHandling">
<String>addIndex</String>
</field>
<field name="anchor">
<null/>
</field>
</poPatch>
Thanks,
vishwa
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Wed Jan 29, 2025 4:42 pm
by Radu
Hi,
You can probably open from the installation folder of Oxygen 27 the "frameworks/dita/dita.framework" configuration file and look there at how the action is defined.
Regards,
Radu
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Wed Jan 29, 2025 5:03 pm
by vishwavaranasi
Thanks Radu , i have looked at the oxygen 27 installation folder and found this
Code: Select all
<field name="xpathCondition">
<String>oxy:allows-child-element("*", "class", " topic/image ") or ancestor-or-self::hazardstatement</String>
</field>
for oxygen 24
Code: Select all
<field name="xpathCondition">
<String>oxy:allows-child-element("*", "class", " topic/image ")</String></field>
in general what does it mean hazardstatement incase of oxygen 27 ? , does this add any extra info when we render in pdf or html?
Thanks,
viswa
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Thu Jan 30, 2025 7:55 am
by Radu
Hi,
More about the hazardstatement element:
https://www.oxygenxml.com/dita/1.3/spec ... ement.html
It has a hazardsymbol sub-element which is kind of an image reference. And I think the main idea was that if the caret was inside a messagepanel which was inside a hazardstatement, inserting an image should have been enabled in order to insert the hazardsymbol image reference after the messagepanel.
Regards,
Radu
Re: .framework in oxygen24 and oxygen26 for a custom insert operation
Posted: Wed Feb 05, 2025 7:53 am
by vishwavaranasi
Thanks Radu.