User Tools


Convert ONIX reference to ONIX short

Before you get started, you'll need to download the below files:

  1. switch-onix-tagnames-2.0.xsl - save this page with a .xsl extension
  2. ONIX International DTD - this will download a .zip file called onix. Do not alter the structure of this folder. The ONIX International DTD is located in: 2.1 > reference > onix-international.dtd

Once these are downloaded, you'll need to create a new folder on your computer and put the xsl file, the onix folder, and the ONIX file into this same folder.

Once these files are in the same folder, you can start the process of converting the ONIX file into short form:

  1. Open up the ONIX file
  2. You'll need to change the filepath for the DTD so that it references the local copy that you downloaded. In the DOCTYPE, change the filepath to: "2.1/reference/onix-international.dtd"
  3. Save the file
  4. Open up Terminal (if you use a Mac) from inside the folder that contains the files. You can right-click on the folder, select Services and then New Terminal at Folder. You may need to set up your Mac to open Terminal from a specific folder.
  5. Copy and paste the below command into Terminal. You can modify the names of the input and output files - ONIX2Ref.xml should be the name of the ONIX file on your computer, and ONIX2Short.xml is the name of the output file.
    1. saxon ONIX2Ref.xml switch-onix-tagnames-2.0.xsl result-document=ONIX2Short.xml dtd-path=2.1/reference/onix-international.dtd
  6. Press enter to run the command in Terminal
  7. The output file (in this example that's ONIX2Short.xml) should appear in the folder
  8. Open up the output file. You should see that the reference tags have now been converted into short tags.

The next step is to convert this ONIX short file into MARC XML. Move on to Convert ONIX short to MARC XML.

public/nnels/publishing/onixref-onixshort.txt · Last modified: 2018/08/16 22:06 (external edit)