Article View: adobe.scripting.indesign
Article #20811Copying an XML structure.
From: Rednaxela
Date: Thu, 30 May 2002 13:57
Date: Thu, 30 May 2002 13:57
25 lines
1941 bytes
1941 bytes
Beautiful program, I must say... However, I am having some difficulty in trying, through a script, to clone all tagged elements as a unit. Scenario goes as so: 1. Layout the page, tagging the page items as appropriate. 2. Logically reorganize the structure in the XML gui. The aim is to use one group of items as a 'template', cloning it for each new listing. The issue comes into play as the structure is lost after the clone, undoing the handwork. Not a major problem, at first I thought, scripting usually takes care of those kinds of niches. After banging my head up against some restrictions in the object model I'm asking for directions here. Collections are read only in most cases, accepting only untagged items to insert as an element, while the clone creates the XMLElement I would like to insert as a child, complete with tagged text placeholders. This makes it effectively impossible to copy the structure. Those are the general details of what I have been trying to accomplish, but all I am really interested is a recursive type clone. I hope I am missing something obvious and I'd appreciate any light you could lend here.
Technical Details
Message-ID:
<Xns921E5AF29D11Flunarorbitcom@216.52.21.19>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,b6af2860f9ad8283,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-05-30 07:07:46 PST From: Rednaxela <radiation@belt.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Copying an XML structure. Message-ID: <Xns921E5AF29D11Flunarorbitcom@216.52.21.19> Date: Thu, 30 May 2002 06:57:12 -0700 Lines: 25 Organization: Your Company User-Agent: Xnews/5.03.24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit