A quick primer: ONIX is a list of tags that we in the book trade have agreed to use to describe our books to each other. Arbitrary though they may be, the consistency prevents confusion.

Take an author’s name, for example. The people who decided on ONIX tag names could have chosen “Author Name” or “Author First Name” or “Author Last Name.” But they settled on tags like “Contributor” and “KeyNames.” So now everyone who sends or receives an ONIX message knows exactly what the data mean.

Having a lingua franca such as this is hugely helpful. Over a decade after ONIX was first introduced, it’s no wonder that, nowadays, being able to describe your books using ONIX is now an absolute necessity for any publisher, large or small.

Once you’re ONIX-compliant, your data get sent to the data aggregators, and that’s great. But if you find yourself still having to manually type data anywhere—for your catalog, for your tipsheets, in emails, into spreadsheets for customers who are not yet receiving ONIX—then ONIX can help you, too.

Not all ONIX is created equal (ironically enough, for an XML standard). For example, Amazon’s PublishToKindle requires the tag in addition to the and tags, and fails silently if you omit it: ONIX will still validate without the inclusion of (see page 40 here.) So it helps if you know your way around the standard—and actually using ONIX to create documents is a great way to get familiar with it.

Let’s have a look at how three other programs you already have on your computer can deal with ONIX.

Spreadsheets Open up Excel or another open-source spreadsheet program like LibreOffice or OpenOffice. In LibreOffice, for example, go to Data > XML source and find your ONIX file on your computer or network. You’ll see the structure of ONIX appear. With a bit of clicking, you can map the ONIX fields to spreadsheet columns. Pick out “TitleText,” “Contributor,” “RecordReference” and “PublicationDate” to get your bearings. Click OK and see your data appear in a flash.

Word Documents The same goes for Microsoft Word. In Word 2007, for instance, create a new macro from the developer tab. (To show the developer tab, go to the Office button and click “Word Options” at the bottom of the dialog box. Click “Show Developer Tab” in Ribbon.) Paste the following into it:

ActiveDocument.CustomXMLParts.Add ActiveDocument.CustomXMLParts

and load your ONIX file.

Next, create tags in the Word document where you want the XML data to go. On the Developer/Controls tab, insert four of what Word calls “plain text content controls,” which is a placeholder tag for your data, just to get started. Now, map the tags to the XML data. Create a new macro, and paste in the data here.

Run the macros in the Word doc (you’ll probably have to save it first). And voila! the fields update with the ONIX data.

Adobe InDesign Finally, let’s look at Adobe InDesign, the application many publishers use to their seasonal catalogs (among other things). InDesign handles XML pretty well.

Start by downloading this zip file, which contains an InDesign document, a sample ONIX message, some XLST to transform your ONIX into something more useable by InDesign and some images. Follow the instructions within to make a perfectly laid-out InDesign catalog magically appear. Switch out the images and ONIX with your own images and ONIX, and you’re on your way to saving a huge amount of time and effort, every season.

There are more things you can do with ONIX, to be sure. At a very low level, try opening an ONIX file in a proper text editor such as TextWrangler or TextMate. The syntax highlighting helps you see which bits are data and which bits are tags, and a decent text editor will indent XML nicely so you have half a hope of being able to read it.

In the InDesign example above, we used XSLT to transform our ONIX into another sort of XML, using InDesign as a processor. You don’t need to use InDesign, though; you can convert ONIX into another sort of XML—including XHTML (yes, web pages!)—using XLST and SAXON on the command line or even a web-based processor such as this one.

Because XML is, by its nature, structured, you can manipulate it with very simple programming to remove, modify and copy elements. For instance, you can use the Ruby Nokogiri gem to manipulate ONIX to your heart’s content—to add agency pricing, for instance, or to set the UK GBP price from the USD price by applying business rules.

At the moment, we here at Bibliocloud are writing a Shopify app to allow the import of ONIX into the e-commerce platform.

All this manipulation can be a bind, of course, and if your bibliographic data management system is any good, you’ll be able to export data directly from it into whatever format you need, whether that’s a 1,000-page PDF catalog, a cut-down XML feed for InDesign to handle with less fuss, the Samsung ebook spreadsheet or CoreSource-flavored ONIX. But it’s still very useful to be familiar with ONIX terms, and playing around with importing it into a variety of programs can be both enlightening and productive.

But be warned: it’s very moreish. Once you get a glimpse into the sort of world where you can create a thousand catalog entries or a back-list order form with a single click, there’s no going back…


    Most popular

  1. Ruby code and why you should care
  2. A quick look at data visualisation and analysis
  3. Menial publishing jobs are destroying our future
  4. It's us in the industry who need to be able to code
  5. A manifesto for skills
  6. Learning how to code, the long way around
  7. Company news

  8. New website
  9. 2018 Customer survey report
  10. 2017 in review
  11. Sara O'Connor to join the team!
  12. And now we are five
  13. Prizes galore
  14. Product news

  15. 'Continuing to solve real problems': Futurebook 40, London Book Fair 2018 and the Works page
  16. How many authors is too many?
  17. Better ONIX fragments
  18. Advanced advance information!
  19. Schedules page
  20. Publishers hack their own bibliographic data
  21. Case studies

  22. Burleigh Dodds Science Publishing
  23. Zed Books
  24. IOP Publishing
  25. Code

  26. A publisher’s guide to APIs
  27. What publishers need to know about Ruby on Rails
  28. How APIs can make publishing more efficient
  29. A day in the life of a programmer
  30. eCommerce

  31. To go direct, publishers must mean business
  32. Don’t outsource your publishing business away
  33. Who has the balance of power over data?
  34. Inbound marketing
  35. The business case for going direct
  36. Why publishers must use direct sales
  37. ONIX

  38. A hidden benefit
  39. Thema Subject Codes Update November 2017
  40. ONIX. Not very standard
  41. Three ways to do more with ONIX
  42. A non-technical, beginners’ guide to ONIX for Books
  43. ONIX Changes
  44. BIC, Thema and artificial intelligence...
  45. How to create a catalogue automatically using ONIX and InDesign
  46. Skills

  47. Embrace the code
  48. Mechanical sympathy
  49. Publishers can learn a few things from programmers
  50. A taste of code
  51. Strategy

  52. Rejuvenation
  53. Why ‘easy’ publishing solutions hardly ever are
  54. The right tool for the job
  55. No computer system can fix a broken publisher
  56. Five things I've learned since moving into enterprise product management
  57. Managing expectations
  58. Start with Why – How to refine your publishing mission
  59. The real price of a strategy shift
  60. Technical debt
  61. Decisions, decisions
  62. Creative industries and the division of labour
  63. A company of one's own.
  64. Responsibility, Authority, Capability
  65. Sometimes, size matters
  66. The search for publishing's holy grails