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
2. Click the wrench or word “Tools” to open the Tools menu
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.
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.
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).
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.”
MarcEdit will create a processed_files
directory in the directory you chose.