Close
MerMEId

Batch transforming XML files in the database

Sometimes you need to make the same changes to many or all of your MEI documents. Typical changes are text replacements (if, for instance, your project changes its name or address), but also more complex, structural changes are possible. Using an XSL transformation for such tasks often is more efficient than editing all the documents by hand. Instead of downloading all of your files, transforming them locally on your computer, and upload them back to the server, MerMEId offers a script to do such a transformation directly on the server.

Prior to using the script, an XSLT style sheet making the desired changes must be placed somewhere where your server has access to it.

The script is located in the 'tools' folder in your eXist database: batch_transform_settings.xq.

The server may prompt you for an administrator password in order to give you access to the script. You should see the following form. It includes basic instructions and suggests default settings in some of the fields:

Batch transform

Fill in the form to define which files to select. Type the XSLT style sheet's URI (the location http://[your-server]/storage/ is configured in MerMEId to be equivalent to the eXist database's root collection /db/; but your style sheet may also be located outside of the database or on some other server). Click the 'Search files' button to get a list of files matching the search criteria. Possibly not all files will be changed — that depends on your XSL transformation. The list only indicates the files that the script will attempt to transform.

Hit the 'Transform' button to run the transformation.

After the transformation process — if the connection did not time out — a result page will list the files changed and those that were unaffected by the transformation.