XML Info for InDesign CS2

June 16, 2005 - 1:00am ||| 0 Comments | Add new

A while back I read some very interesting, detailed information online about a couple of new features in InDesign CS2; specifically about its enhanced XML workflow for text styles and tables. I'm not an XML pro (yet!) but a number of my publishing clients are really putting it through its paces, so it caught my eye.

The author, who posted this in a private forum, said the information would be included in an upcoming Adobe white paper focused on using XML with InDesign CS2. Most of Adobe's end-user information (white papers and tutorials) on InDesign and XML appears in their Cross Media Resources page, which is where I assume it'll pop up (it hasn't yet, I've been checking):

The problem is that so far there's been precious little in-depth, nitty-gritty information published about InDesign and XML; as opposed to, say, InDesign and tagging; or InDesign and scripting. The "What's New in InDesign CS2" page on Adobe's site and the companion PDF simply mention that new features exist, and not really how to use them. Luckily the XML-related Help files for ID CS2 are fairly robust (as is the PDF version of the manual on the install CD); but even those sources don't contain the type of "here's a list of valid attributes, here's how to write the code" that people in the trenches need, like, today.

So, I e-mailed Adobe the contents of that post and asked permission to re-publish it on my site's InDesign Resources page, and they gave me the thumbs-up (thanks!). I put it in a PDF which you can download here:
… it's the first PDF in the "Tips and Handouts" section towards the top.

By the way, I sent the info to one of my most advanced InDesign/XML workflow-using clients and their emailed response was (quote) "Holy Cr@p! Now we have to upgrade!" hahaha … so I guess it's useful.

The PDF isn't a huge manual or anything, just 2 sides of a page, dealing with importing Styles and the InDesign CS2 "table model." In fact, the styles section is so short I'll just reprint it here.

Importing Style Sheets with XML (InDesign CS2 only)
First, declare the InDesign namespace using:


… and then you can use attributes "aid:pstyle" and "aid:cstyle" to style elements using paragraph and character styles, respectively. The attribute value is the name of the style. If a style with that name does not exist, a new style will be created.

Here's a simple example:

<Root xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/">
<para aid:pstyle="MyParaStyle">styled with MyParaStyle</para>
<char aid:cstyle="MyCharStyle">styled with MyCharStyle</char>

At the end of XML Import, "styled with MyParaStyle" will be styled with paragraph style "MyParaStyle," and "styled with MyCharStyle" will be styled with character style "MyCharStyle." If these styles do not exist, then they will be created.

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.