🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8933

Item with specific XML Tag-Reg.

#8933
From: Harihara_Sudhan
Date: Thu, 21 Sep 2006 07:39
90 lines
3863 bytes
Dear All,

After creating a text frame in JS, I would like to assign a tag to that Textframe to use as placeholder...

I searched in the forum, but I didn't get any idea...

Question:
		1. placeHoldet Text assign to that particular Frame is possible using JS?
		2. Or Other root is there?. then please give me the Idea.

Pl. help...


Thanks & Regards, 
Harihara SudhaN. T.R , 


-----Original Message-----
From: Dave Saunders [mailto:member@adobeforums.com]
Sent: Wednesday, August 02, 2006 7:17 PM
To: adobe.scripting.indesign@adobeforums.com
Subject: Re: Item with specific XML Tag


A new message was posted by Dave Saunders in

InDesign Scripting --
  Item with specific XML Tag

Hate to say it but you've picked an area of the object model that is 
still something of a mystery to me. I just conducted some experiments 
and the results I'm getting are nothing like what happens in just about 
any other part of the object model.

For example. I created a new document and drew a rectangle on the page. 
I added a tag which I named Rectangle and assigned the tag to the rectangle.

Then, I selected the tag in the Structure pane. And this is where the 
problems start.

First, if you double-click the tag, the rectangle becomes the selection. 
So, there is a connection between the tag and the object. But how to 
find this in the object model has so far defeated me.

myEl = app.selection[0];

makes myEl an xmlElement object. So far so good. One of its properties 
is pageItems, so that looks promising, except that the length of that 
property is zero. None of the other properties seem to have any 
connection at all with the rectangle.

And here's the weird part. If I now do:

myProps = myEl.properties;

myProps consists only of:

contents = ""
id = 3
index = 0
markupTag = [object XMLTag]
	id = 208
	index = 0
	label = ""
	name = "Rectangle"
	parent = [object Document]
	properties = [object Object]
	tagColor = 1767007588
parent = [object XMLElement]
parentStory = [object Story]

aha! That's interesting. If the tagged object is a text frame, you can 
get at it by:

myEl.parentStory.textFrames[0];

But that doesn't work if you've tagged a rectangle.

Sorry; I'm striking out here. The XML features are a mystery, it seems 
to me, to anyone who isn't really on top of XML and even that might not 
be enough.

Dave


------------------------------------------------------
View/reply at <http://www.adobeforums.com/cgi-bin/webx?13@@.3bc10b1a/27>
Replies by email are OK.
Use the unsubscribe form at <http://www.adobeforums.com/cgi-bin/webx?280@@.3bc10b1a!folder=.eea52bc> to cancel your email subscription.
Technical Details
Message-ID: <70077F23D6108E49A004DF64766CFF2A06DC34@SPIINA1003S.spitech.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,aa73386c023df3c3,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Harihara_Sudhan@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Item with specific XML Tag-Reg.
Message-ID: <70077F23D6108E49A004DF64766CFF2A06DC34@SPIINA1003S.spitech.com>
Date: Thu, 21 Sep 2006 00:39:42 -0700
Lines: 99
Received: from spqes1002.spitech.com [202.14.85.209] by adobeforums.com; Thu, 21 Sep 2006 00:41:42 -0700
Received: from SPIINA1003S.spitech.com ([172.24.136.13]) by SPQES1002.spitech.com with Microsoft SMTPSVC(6.0.3790.1830);  Thu, 21 Sep 2006 15:39:33 +0800
Content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.5
Thread-Topic: Item with specific XML Tag
Thread-Index: Aca2OqHL9dLmjcvQRAm6Hx/NKsY/agnFgXjw
Return-Path: R.HariharaSudhan@spi-bpo.com
X-OriginalArrivalTime: 21 Sep 2006 07:39:33.0474 (UTC) FILETIME=[149FBC20:01C6DD51]
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit