Import XML into InDesign CS3

9 05 2008

The scenario:

We have 100 odd study guides, each require the creation of an overprint PDF containing course and faculty information, as well as a barcode and item number. The overprints are printed onto an already produced cover. It saves time, money and makes sense for us really.

The problem associated with that is, no one really has time to manually create 100 pages in InDesign, and copy and paste course information and barcode information from a number of sources, yuk! Even if we did have time, I don’t like the changes or stuffing up one of the barcodes, since you can’t even read what you’ve typed or pasted in.

The solution:

Pull the course, faculty and barcode information from a Database; create a simple XML file, and import into InDesign!

How the process went:

From what I’d read on the net, I assumed that when one imports XML into InDesign, all your pages are automatically created.  Maybe I missed something but I found that I had to actually create the pages manually, which isn’t really a problem as it’s only a few mouse clicks.

The next subtle thing I found which seemed to be missing from all of the instructions and tips I read on the net, was that the pages didn’t actually take on the tagged structure of their master page!  Okay, that was easy, all I had to do was tell the pages to Over-ride their master; and once I’d done that, DELETE the content of the master page (or else the imported xml goes in to the master page as well as your normal pages).

Despite everything looking perfect the XML wouldn’t import correctly; I ended up having some data missing on a page, then it’d be on the next page; basically stuff was all over the place.  

I found out, after going around in circles for ages; that when I’d told my pages to over-ride the master page – they didn’t take on the XML structure exactly as it was on the master!!!!  They all had their tags in the wrong bloody order!

So then all I did was just adjust the order of tags in my XML source, it still made sense so that was fine with me. 

Once I’d done that.. it worked perfectly!  XML in to InDesign does work, it’s just a little bit annoying sometimes!

R

Advertisements

Actions

Information

6 responses

20 07 2008
Suzan

Hi R,

I went trough exactly the same process, with the tags on the master page. But I’m not satisfied with all the tags being in the wrong order on the document pages. Did you (or somebody else) find a solution for this eventually? (So the question is: How can I make sure the structure on the document pages will automatically be exactly the same as on the master page?).

I would be so happy with a solution for this problem!

17 12 2008
Anne-Marie

Gabriel Powell’s book, Instant InDesign has a useful chapter on XML where he discusses this very issue. You might also want to look at Jim Maivald’s A Designer’s Guide to XML in InDesign.

5 11 2009
Rolley

Hrmmm I never did find a solution for the initial problem, but then I was pretty happy just reordering my xml to suite InDesign : ) hehe. Sorry : )

31 03 2010
Rolley

Hey Suzan, I know it’s been forever since I wrote this and you commented, but if you never ended up finding a solution I have an idea.

I’ve been stuffing around with XSL, and when you import an XML doc in to InDesign, it lets you specify an XSL file as well. It’d be really easy to make a simple XSL doc that just re-orders your XML upon import!

26 10 2010
Ries

What I did was instead of deleting the tags on the master page was creating dummy xml content to flow into the masterpage. A bit silly of course, but it works… Until you add another masterpage that is, and forget to add extra dummy content.

Did not suffer from messed up structures after separating pages from their master (in CS4). I used XSL and a lot of anchored objects to get the hierarchy right.

26 10 2010
Rolley

Hey Ries, yeah totally, I did the same one time as well, used a bit of dummy content, but I sorta got annoyed at that (not that the deleting master page tags was any better!). At the time I didn’t think of using XSL, that’s definitely the way to go!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: