XML Snippets in InDesign CS2

Last month I talked about XML and why you need to learn more about it. Recently, I discovered a practical use for XML, namely, snippets—a feature of InDesign CS2.

The InDesign Help menu briefly describes the XML snippet. The InDesign CS2 Classroom in a Book has a page on it as well. Both of the aforementioned scratch the surface of snippets, but neither really explains how powerful the XML snippet really is.

Here is Adobe’s description of snippets from their CS2 help files:

“A snippet is an XML file that is a full representation of InDesign content, including page items and any XML structure applied to those page items. A snippet lets you reuse the content, formatting, tags, and structure of a document. You can store snippets in an Object library, and place them in other documents.

Snippets are based on the InDesign Interchange file format, which is the same format that lets you open a document in a previous version of InDesign. Snippets include an .inds extension.

Do one of the following:
Using a selection tool, select one or more frames, and then choose File > Export. From the “Save As Type” (Windows) or “Format” (Mac OS) menu, choose InDesign Snippet. Type a name for the file, and then click Save.

Using a selection tool, select one or more frames, and then drag the selection to your desktop. A file is created. Rename the file, but save it with an .inds extension.

Drag an item from Structure View to your desktop. “

The above gives us a basic idea, but what does one use a snippet for?

First, we can use it to create job slugs. Set up a job slug for proofs using logos, job number, job name, page numbers, sign off info, phone numbers, etc. To make it more interesting, use XML tags to identify job name, job number, and phone numbers and create an XML structure. Then save the snippet by selecting the whole thing, then group it and drag it to the desktop. InDesign names the file with a number and .inds, so it needs to be renamed in order not to get lost in your desktop clutter.

Now, when I have a job I want to apply the slug to, I can drag the file onto a master page. Using an XML file from a job ticket or workflow system with the name and job numbers, import the XML file and all the information goes into place on the slug. Of course, you can go one step further and use hands free automation to accomplish this—just use a javascript in InDesign and XML pickup in PowerSWITCH.
The great thing about a snippet is that it remembers its position on the page and all the InDesign elements that were created in the beginning are still there: transparency, automatic page numbers, grouping, layers, XML tags, and XML structures.

When using automatic page numbers in a slug, you must remember to attach the text box to the actual page of the document or else all of your page numbers will be PB (pasteboard).

Other uses for snippets include saving InDesign–created logos using images and text. The drag and drop feature is nice when setting up books with folios and catalog footers, as they can be placed onto multiple master pages in a flash. You can set the snippet up as a spread as well, and they will snap into place in the document. They can also be altered after they are placed, as they are still complete InDesign elements and can also be brought in using the Place command.

I know I seem to go on and on about XML, both in this article and in last month’s, but XML is increasingly vital in today’s graphic arts marketplace. There are many management systems out there today that are applicable to the graphic arts industry and that allow you to pick up data about a job in XML format. There are also database systems in use that can repurpose this XML data. These simple files can inject data into your InDesign workflow using the powerful technology of XML snippets. And then you get everything in its place and the same data every time. That’s the kind of reliability that’s worth spending two columns on.    

Andrea Mahoney
TriBay Enterprise
T: 416.729.9687
andrea@tribay.ca
www.tribay.ca

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -