InDesign Interchange Formats INX and IDML
INX and IDML are both XML formats you can export from InDesign, but they’re not the same as exporting XML from a document (which would only include the XML structure itself). These formats render everything in the InDesign file, including styles, page items, formatting, colors, page margins, and ruler guides. In a way, these formats are XML alternatives to the InDesign binary document (you know, what you get when you choose Save from the File menu).
INX is an older format, and is primarily used for saving documents back to the previous version of InDesign. IDML, for “InDesign Markup Language,” is a replacement for INX, and much more. IDML is a huge improvement over INX: it’s far more readable and robust.
The InDesign Snippet (.idms) format is essentially the same as IDML, but is limited to representing page items or collections of page items as XML. IDML is also the format of library items. Another variant of the IDML format is ICML, which is used for saving InCopy stories.
The reason we’re talking about IDML, when we’ve already talked about it in Chapter 7, “Importing and Exporting,” is that it’s XML. All of the things you can do with XML files, you can do with IDML. Yes, that means you can import them into the XML structure of a document. Don’t do that! That’s not what we’re getting at.
Think about it. With the XML in an IDML file (or snippet file), you can lay out InDesign documents without even having InDesign open. You’ll need to open your copy of InDesign to proof, print, and export the files you’ve created, but the work can be done for you while the file is in its XML form. The work can be done by a database, or by a script, on your local machine, or on a server.
We don’t have the space here to discuss the IDML format in detail, and, besides, Ole’s already done that in the official, 300-odd page IDML specification, which you can find at:
First, IDML is not a simple text file. Instead, it’s a Zip archive containing a set of files and folders. We don’t think that this raises a signficant barrier to entry—after all, both platforms (Mac OS/Windows) have native tools for uncompressing Zip files.
We also believe that the way that the files are organized inside the archive really simplifies working with the XML content. The XML files in the archive each concentrate on a specific area.
This logical compartmentalization of the XML files that make up the IDML document makes sense. If you want to work with a story, for example, you can work with a relatively small XML file containing just that story, rather than editing a tiny and hard to find segment of an enormous XML document.
Spreads are also broken out into separate XML files in the IDML package, which makes it easy to swap and rearrange spreads inside a document or across a set of documents.
If you do a template-based publishing, where the main thing that changes in your documents is text, you should really consider looking at IDML. Especially in combination with scripting, this approach can bring about tremendous productivity gains for repetitive layouts such as business cards or data sheets.