InDesign User Group

Chicago InDesign User Group

Meeting Notes Archive

November 8, 2005
Hosted by Digital Bootcamp, Chicago, thanks to Mike Carruth, Commander-in-Chief

Topic: Using XML in InDesign® CS2

Presenters (in order of appearance):

  • Cathy Palmer, Independent Trainer, Adobe Certified Expert for InDesign CS2, Madison, Wisconsin
  • Jim Heffron, Prepress/Ad Design Manager, Farm Progress Companies, Carol Stream, Illinois
  • Bob Hopfner, Designer, MagnetStreet, Wheaton, Illinois

Tom Petrillo, our Adobe leader, started us out with the evening’s overview, including a mention of an excellent resource on the Adobe website — a 31-page XML white paper called “Real-World Case Studies: Getting XML From Adobe InDesign Layouts for Repurposing,” which includes two case studies: 1) How T+L Golf magazine creates HTML with InDesign and 2) How Texas Lawyer newspaper generates complete XML files with structure and attributes. I found the white paper by doing a search for “Real World XML” on the Adobe – site the target file showed up as the top listing. Jim Maivald, an “unofficial” contributor to the evening’s discussion and a regular member of our group, offered some useful books he has plumbed in preparation for teaching a new XML course — including Sam’s Teach Yourself XML in 24 Hours and XSLT, a book about transforming content from print to web via XML.

Tom also noted that as a member of the IDUG, you are entitled to a 30% discount on Peachpit books. Straight from the Peachpit site (thanks to Clint Funk): “USER GROUP COUPON CODE — We provide your group members with a 30% discount off the list price of any of our books. At checkout, right before they put their credit card number in, they must enter the user group coupon code UE-23AA-PEUF (case-sensitive). This coupon code is an exclusive offer that may not be used in conjunction with any other coupon codes.”

Perhaps a new (and regular?) addition to our meeting format is a short Q&A at the start, which this time included questions about getting ID CS1 presets into CS2 and exporting from InDesign to HTML. So bring your InDesign questions to our next meeting and get help from the experts.

Our first speaker of the evening was the multitalented Cathy Palmer, who has spoken to our group on XML in the past. She launched the evening with a bang by giving us an XML overview, with a focus on how the designer works with XML — namely how you get XML into and out of InDesign. Her 21-page PDF overview is available for download from this site.

Getting down some of the vocabulary is the first step, including “What is XML?” It’s a markup language, like HTML or SGML. It’s a way of identifying and organizing content that has nothing directly to do with formatting — but you can use XML to automate layout and type formatting, a powerful perk for designers. XML is about “what the content means,” not “what it looks like.” XML’s biggest job is enabling content to be easily “repurposed” from one medium to another — web to print, print to web, or even going from a catalog to a brochure. XML doesn’t care about platforms or media – it works with them all. XML is also perfect to automate page production, most common in publishing workflows in which page volume demands a more systematic approach — like with a textbook or a large catalog. Finally, XML is the magic vehicle for data-driven content. Customize your pages with the names of products and services and other relevant data that is specific to a given set of people or even an individual. This is clearly one of the most exciting and growth-driven areas for print and web communications as customized niche markets become more valued every day over mass-market sweeps. XML is also a lifesaver that allows content to be updated at the last minute, without the hassles of reformatting text or layout.

Like any markup language, XML works with “tags” that identify the main ingredients of your content. A tag can describe the role of an item (such as “article” or “sidebar”) and its relationship to other items. Or a tag can use the content itself as labels to create the hierarchical relationships (such as “earthquake” or “lava”). A content tag holds information (text or a graphic), while a container tag is used for structure to hold other tags and sets up a hierarchical or nested relationship for the content. Each content item, text or graphic, is surrounded by a start tag and an end tag, like a sandwich: an “open tag” precedes a bit of data (<tagname>) and a “close tag” follows (</tagname>). The whole sandwich is called an “element.” There aren’t any predefined tags, as with HTML, but the open and close tags need to match up to be “well-formed.” You’ve got data elements and structure elements and always at least one “root” that’s a big umbrella containing all the content and their respective tags. "Attributes" are like the adjectives that describe the data, such as an HREF link, the pathname to a graphic file.

Getting the XML into your document is easy enough. File>Import XML brings in both the content and the tags that describe it. XML can come from many sources, whether from a database or from code that’s been written in a text editor. What gives the XML its coherence is its structure — the order and sequencing of the elements. See the overall structure in the Structure panel (View>Structure>Show Structure, or just click the two-way arrows in the lower left of the document window — on Windows you may need to double-click). Then, to get that XML content into the layout, you can drag-‘n-drop the elements from the Structure panel onto frames on your pages. And if you set it up in advance, the content can automatically flow into placeholder frames on the pages as soon as you do the import — finished pages!

Although it’s true that XML does not directly control text formatting, one of the best tricks in the book is to automatically format text by matching up your XML tags to your paragraph and character styles using the Structure or Tags palette menus. When you “map” tags to styles, your imported XML-tagged text hits the page prestyled and looking just right. You can also “map” in the other direction — styles to tags.

But let’s say you don’t have any XML yet. You’ve got a layout in InDesign that has content you want to use elsewhere. Now you need to set up your XML tags here using the Tags palette and then apply them to the appropriate content, text and graphics. Easy options for tagging: Either drag-‘n-drop or point-'n-click. From either the Tags palette or the Structure panel, your InDesign command centers for XML, just drag a tag name onto a text or graphic frame. Or select a frame or highlight text and then click the tag name to assign. Of course, you can also choose tagging commands from palette menus (Structure or Tags palette) – that’s the long way. Once you’ve tagged a frame or bit of text, it’s an XML element, part of the document structure — and it’s included when the content is repurposed.

There are lots of ways to see the XML in action in InDesign. Turn on a color-coded display of all tagged frames and text under the View menu (View>Structure>Show/Hide Tag Markers and >Show/Hide Tagged Frames). You’ll see right-angle brackets around each tagged element. Since each tag has a color associated with it, the color of the brackets indicates the specific tag that’s assigned. For tagged text, you can also see the tags easily by turning on Show Hidden Characters and then examining the text in InDesign’s Story Editor.

To show off how it all comes together, Cathy displayed some pages from a Harley-Davidson catalog, demonstrating how the XML can be matched up with existing content and swapped out while the page retains all the same formatting, but now with new text and a different-color motorcycle. Bravo, Cathy!!

Next up was Jim Heffron, Design Manager from Farm Progress Companies, a magazine publisher. Jim first started exploring XML three years ago, when the company was using Quark. At that time, they had to purchase a $1,200 Quark XTension to work with XML. Even so, their efforts to allow customers to build their ads online and import them into an XML template did not succeed due to lack of customer interest. Six months later, however, after they made the move to InDesign, they switched directions with XML to solve a different production headache. Among the 18 monthly magazines the company publishes, some are over 100 pages and have over 100 ads each! Can you imagine placing hundreds of ads one by one each month? Nothing short of a Herculean effort.

Solving this production dilemma has been their focus with XML. Here’s how it works. Their Microsoft Access database stores the advertisers' names and their ad numbers. Using an XML export script, they bridge that data with XML code to bring placeholder ads (PDFs) into their InDesign layouts. The advertisers' names are stored in element tags and the corresponding locations of all the ads are stored in the HREF attributes. Each HREF, or HyperReference, contains the pathname to the PDFmasters folder on the server and the particular ad placeholder PDF for that number. As Tom pointed out, Jim’s use of XML is not about producing finished pages but rather about efficiently accessing the database to pull in the ads — a big step forward.

Some of the details… When Jim does File>Import XML, he clicks the option Create Link so that a live update is created that points to the location of each ad placeholder. Later, when the actual ads become available, they are moved into the same PDFmasters folder, and, because the same filenames are used, the placeholder files are simply overwritten by the actual art files. Then, in InDesign, the Links palette displays a yellow warning icon opposite each placed PDF, indicating the out-of-date status. Clicking the Update Link button on the Links palette, he can then bring the actual art onto the page.

Finally, the last of a full evening of speakers, Bob Hopfner, Marketing Designer for MagnetStreet Inc., treated us to a very interesting and unusual case study in using XML with InDesign to produce refrigerator magnets with customized K-12 school calendars with important school info. These relatively small items have all the major events for each school year encapsulated on one small magnet. School administrators can compose their magnets at schoolmagnets.com, indicating all the events they want to include and their dates, using letter codes to signify the type of event (“F” for “first day,” “V” for vacation, etc.). The website captures that data into the company’s database. They also include important data such as attendance hotline and school nurse phone numbers. Finally, internal routing information is also attached to the job.

Originally this project was done in Quark, typing in customer data from paperwork. In fact, to get one school magnet with a calendar all done by hand, it used to take up to 30 minutes. But now that Bob started using XML with InDesign, his team can crank out 30-40 a day each! Recently they handled 297 orders in one day — adding up to 1,157 magnets for the entire week. The process starts by creating a school magnet template. Right now, they have at least 4,000 templates for all markets — and every design uses its unique XML template, which is exported from a tagged template. The web server re-creates these templates, inserting customer data in the appropriate places. When a designer begins a job, he imports this web-generated XML file, forgoing the tedious data entry that mired the department in needless typing. The style sheets are mapped to the tags, creating a perfectly formatted document every time. For Bob, using the Map Tags to Styles command from the Tags palette menu, as mentioned by Cathy, is the key to making the process doable. By using their existing paragraph and character styles, they not only get instant formatting of all text, but, when those last-minute updates come in, the text just reformats automatically. Leave manual reformatting behind – it all happens on the fly. Sound simple? Only in hindsight!

The meeting ended with our ritual raffle prizes and happy winners. Join us next time, in January, for another great meeting.

—The Chicago InDesign user group meeting notes have been prepared by Eda Warren, Adobe Certified Training Provider and Adobe Certified Expert on InDesign CS2 (http://www.go-training.com/)Thanks to the speakers for help with these notes.



Photos From This Meeting!
Photos are available from this user group meeting.
See the photos.





Meeting Notes Archive
View notes from past meetings of the Chicago InDesign user group.
Read notes from other meetings!


Meeting Topics Archive
With user group chapters across the United States, Europe, and Australia, we have gathered quite a bit of information from presenters, Adobe representatives, attendees, and industry experts during the past four years.
Read all of the notes

Copyright © 2008 Adobe Systems Incorporated. All rights reserved.

Online Privacy Policy  •   Terms of Use