Using XSLT for alternative XML formatting

Hi!
I want to set up an integration with a party that expects a specific XML file, this is different than the XML my export definition is creating at the moment. I got the tip that an XSLT file could be used to change the formatting of an XML file. Could anyone elaborate on how to do this exactly and if this can be done in an automatised way, since this integration is supposed to run every night :smiley:
Thanks in advance!

1 Like

Hi Mila,

In short the steps to add an XSLT to change the formatting of your export are as follows:

  1. Open the export definition
  2. In the settings of the export definition set the option XSLT-transformation to ‘Yes’, a field will be shown where you can upload the XSLT file you want to use to change the export output.
    image

To create the XSLT you can do the following:

  1. Open your preferred application to create XSLTs. For the creation of XSLT I normally use Notepad++ including the XML tools plugin because it gives you the possibility to test with the XSLT you create.
  2. Export the exportdefinition without the ‘XSLT-transformation’ option set to ‘Yes’ and save this file, you will use this for testing. The output will be the standard Novulo Export and look similar to this.
  3. Collect the target XML you want to create
  4. Create the .XSLT to change the Novulo Export into the desired target XML.
  5. In Notepad++ you can test your XSLT by (1) opening the Novulo Export you saved, (2) clicking on XSL transformation in the plugins>XML tools menu (3) selecting the XSLT you created and (4) clicking on Transform:
  6. One good source for information about the creation/usage of XSLTs is ( XSLT Reference (w3schools.com).

To automate this integration you can use a scheduled task.

3 Likes

Thank you so much! I will try this :smiley:

Thank you for your detailed response @gweijman! :slight_smile:

As an addition:
You can also use ChatGPT to write XSLT files for you.
It may still contain errors, but it’s a good way to get started :slight_smile:

2 Likes