🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15060

Re: [ID:CS]Generating automatic XML entries (think phonebook entries)

#15060
From: Urho_Palosaari
Date: Mon, 15 Dec 2003 21:19
15 lines
2002 bytes
I'm working on a similar project, but with a product catalog with over 6000 entries. The way I go about this is creating one template for a product, with all the fields in the XML file as own objects. I also include a "Start" frame and "End" Frame, these are to keep track of the top and bottom of my template.

Next I label them with the same name as corresponding XML element.
Then Tag your template with your first XMLNode

Then starts the automation part. You Copy each pageitem from your template and Copy/Paste or duplicate/move (when this works) it to the new location.
Then you need some functions to traverse your XML tree (Getting the next monster). I have written som that might work for you (let me know if you want it). When you have an XMLElement Object pointing at the monster you want. You just take the copied template object and with the placeXML method you bind it with the corresponding XMLElement.

Repeat this for all your XMLElements. One other thing is that if you want to use paragraph styles, you can map your Tags to paragraph styles. You need to create a paragraph style for each Tag. You should not have the same Tag name at different depths of your XML.

Next things to keep track of is handling overflows in textframes and page brakes.

Hope this gives an idea of what you need to do.

//Urho
Technical Details
Message-ID: <2ccee71d.3@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccee71d.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,2dee2a2cb114224f
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-12-15 13:37:57 PST
From: Urho_Palosaari@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: [ID:CS]Generating automatic XML entries (think phonebook entries)
Message-ID: <2ccee71d.3@webx.la2eafNXanI>
Date: Mon, 15 Dec 2003 13:19:07 -0800
References: <2ccee71d.-1@webx.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit