Low Tech vs. High Tech XML

XML is daunting for many creatives. This article focuses on low-tech uses of XML that can be very user-friendly.

I’ll be the first to admit I’m not a techie. When a new gadget comes out I’m not the first in line to buy (which in the end saves me money when the price comes down or when something better supplants it.) When an application developer comes out with a new software version, I wait for the “early adopters” to find all the bugs before I upgrade. I don’t write scrips for tasks which are just as easy to do with keyboard commands.

For example, it is possible to extract XML from Office programs in the OOXML format, or from in the Open XML format. From Microsoft, you merely export the XML. From Open Documents, you save to a file, change the the extension to .zip and unzip the file, then open the Contents.xml document in a text editor. Either way, what you will see will scare the pants off you: lines and lines of xml-y code before you even get to word one of your real document.

You’d then need to write a transform document to get this into the right format. The learning curve for us non-techies is steep. You have to evaluate whether it is worth the effort to learn XSLT and XPath.

But there is an easier way (some might say “cheesier” way). If you know that xml describes data, and an article or book chapter is just “loosely-structured data”, you can use that knowledge for a low-tech solution. Simply make a table or spreadsheet such that the header row contains the XML elements you’d like to use to describe the “data”, and put the “data” into the cells beneath its header.
I’m using Calc (OpenOffice.org‘s spreadsheet software) in the image below.

Article as Spreadsheet

The spreadsheet has a heading for Author, Title, Deck, First P(aragraph), Body, and Auth(or) Info. Each of these heading will become an XML element. I can save the spreadsheet or table as comma- or tab-delimited text and import into my favorite XML editor, such as Oxygen or Editix, which will convert the file into clean XML.

Converted to XML

If I name my InDesign paragraph styles exactly the same as my headings/XML elements, when I import the XML doc into the InDesign structure, all my text will be automatically styled. Great. No high-tech XSLT required, no unintelligible OOXML to deal with: a perfect low-tech solution that nevertheless takes advantage of InDesign’s high tech features.

See ya soon!

Gregory Ledger

About these ads

About this entry