How to Register a New XSLT Operation in MarcEdit 7

I had to put this together for another purpose today and I tracked down how to do it through a video, I thought I’d make a screenshot/instruction blog post of the steps I took. NB: Per Terry Reese, it works the same way in MarcEdit 3.x on Mac.

When creating these screenshots, I was demonstrating how to add a new XSL transformation from the MarcEdit xslt directory. MarcEdit comes with a number of these transformations registered as batch operations you can perform. However, MarcEdit comes with many more transformations you can try. Many of these are drafts. In my use case, I wished to illustrate how you’d add one of these and use it. However, you can also add your own XSL and let MarcEdit do the heavy lifting for either getting the data out of the MARC or making MARC. In that case, you could use this directory or another.

1. In MarcEdit 7, open MARC Tools

A screenshot of the initial MARC Tools window

2. Click the wrench or word “Tools” to open the Tools menu

An image of selecting the wrench in the upper left-hand corner of MARCTools, which opens an entire menu. This is important because I had not realized at first that the wrench and word Tools were meaningful.

3. Select “Edit XML Function List.” This opens the following box. Select “Add” if you don’t already have this screen. Name your function (give it a useful Alias!). Click the folder next to XSLT/XQuery Path to find your transformation file.

This screenshot shows a dropdown for Defined Functions, a list of Add, Delete, Modify, Download Actions, and then the screen where you can edit an Alias, locate a transformation, and select its properties

4. Locate the transformation you need. MarcEdit contains many more draft transformations than are registered. Their names are fairly clear. You can use these as a starting point to create your own transformation. For MarcEdit 7 on Windows 10, I found these in C:\users\username\AppData\Roaming. If you’re not using one of these, select your own directory.

This screenshot just shows selecting a single XSLT file from an entire directory full of them. The filepath shows we are in my App Roaming Data

5. After choosing your file, designate the original format the transformation should expect. In this case, we’re starting with MARC and ending with Other (which happens to be XML).

A screenshot of the Edit XML Functions screen where I have chosen the Original and Final format for the functions as MARC and Other

6. To use a transformation on a lot of similar files in a directory, choose “Batch Process,” designate the filename type you’re expecting (e.g. .mrc), select the name of the transformation you just created, and click “Process.”

The popup of the Batch Process function. Shows part of a directory path you have selected, the .mrc filetype, and that the MARCtoEAD function I selected exists

MarcEdit will create a processed_files directory in the directory you chose.