Data Exchange Tip #7: Mac-Based XML Solutions—Using oXygen

XML on Mac is a rare bird, or if not rare, seriously undercooked. There isn’t the same amount of options as on a PC, and certainly not an ONIX-based editor such as with ONIXEdit. There are a couple of free XML editors available, however Smultron is no longer updating and Serna Free XML Editor is not available for commercial use, instead deferring to Serna Enterprise for businesses. However, Serna Free is a good tool for getting used to XML.

OXygen is a WYSISYG XML editor with lot of powerful tools to do complex XML developmentbut using it to validate ONIX files is simple. It’s Java based, so it’s able to run on Windows, Linux or Mac platform and it edits files up to 70mb. You can use the large file viewer in the Tools menu to look at larger files, but you won’t be able to edit them due to the constraints of Java.

Caveats, they aren’t many. OXygen will do a basic or “DTD” validation on an ONIX file with the standard declaration. And to do a strict or “schema” validation, you’ll need to follow the same procedure detailed in the post about XML Notepad: The normal ONIX declaration needs to be replaced with declaration information set up for pulling schema information from your files.

But that’s quite easy. Follow the exact same steps as you would setting up XML Notepad. Download the schema, name it well, and replace the declaration with the same as in the “Create a Schema Specific File” portion of the BNC blog post Data Exchange Tips #6: A DIY Guide to Schema Validation on a PC: XML Notepad 2007. Now this part is a bit easier in oXygen, as you do not have to replace the last line of the declaration with the local address of your XML schema, the program will do that for you.

Setting Up to Use Schemas Using OXygen

Once you’ve downloaded the XML schema, open up your file in oXygen and replace the declaration. The hard part is over (well, depending on the quality of the metadata, anyway).

  • Top Menu Bar: Click on Document
  • From the dropdown: Choose XML Document
  • From the second dropdown: Choose Associate Schema

You should have opened a dialog box with several tabs at the top. XML Schema should be the first tab, already selected. The empty bar below is labeled URL—don’t be fooled, you want to open a local file. Click the folder to the right and find your schema accordingly.

Now you’re ready to validate. The declaration should have been changed accordingly. If not, it will tell you.

OXygen is a good system, it offers a lot of useful tools, including track changes to keep record of who did what to which file. It’s also useful as an ePub editor as you can open the full file without extracting it. The blog Instant InDesign has a good article on this:

Nic Boshart is Research and Communications Coordinator at the ACP and one of the organizers of next week’s The Canadian Publisher’s Digital Workshop on December 9 – 10, 2009.