Page 1 of 1

Execute XSLT Transformation on Save in Custom Framework

Posted: Wed Jan 15, 2025 1:20 pm
by csonder
Dear Oxygen-Community,

I have a custom Oxygen framework that is shipped to my colleagues working with XML files.
We want to execute a XSLT transformation whenever a XML file that belongs to the framework is saved.
Is this possible? Are there any "event hooks" like "on save", for example?

Re: Execute XSLT Transformation on Save in Custom Framework

Posted: Wed Jan 15, 2025 3:50 pm
by Radu
Hi,
What would the XSLT processing do? Publish some content to another format? Or apply the XSLT somehow on the XML document as a kind of post-processing when the save operation is invoked? After the XSLT is applied do you want to open a certain result file in Oxygen or a system application?
Regards,
Radu

Re: Execute XSLT Transformation on Save in Custom Framework

Posted: Thu Jan 16, 2025 12:09 pm
by csonder
Thanks, Radu, for your fast response.
The XSLT should do some kind of postprocessing on the same XML file. There is no need to open another file or application.
We already have the transformation scenario and have integrated it into our framework, the only thing is, one has to start
the transformation via the "Start Transformation Button", but we want this to execute every time a file is saved to the disk.

Re: Execute XSLT Transformation on Save in Custom Framework

Posted: Thu Jan 16, 2025 5:35 pm
by Radu
Hi,
In general a framework configuration is useful mostly for configuring behaviors and custom actions when working in the Author visual editing mode.
We have open and save hooks which can be added from an Oxygen plugin, for example this sample plugin which uses Javascript to call our APIs and add two hooks, one for open and one for save. Each hook calls an XSLT stylesheet.
https://github.com/oxygenxml/wsaccess-j ... XSLTFilter
Regards,
Radu

Re: Execute XSLT Transformation on Save in Custom Framework

Posted: Tue Jan 21, 2025 12:20 pm
by csonder
Thanks again for your fast response!
We will investigate if a plugin meets our needs. Is it possible to deliver a plugin within a framework or does a plugin have to be set up separately?

Re: Execute XSLT Transformation on Save in Custom Framework

Posted: Tue Jan 21, 2025 12:45 pm
by Radu
Hi,

Delivering a framework with a plugin inside is not possible.
But it's possible to deliver a plugin with one or multiple frameworks inside it.
https://www.oxygenxml.com/doc/versions/ ... nsion.html

Regards,
Radu