Adobe InDesign CS5.5 Server (7.5) Object Model JS: XMLRuleProcessor

InDesign Server CS5.5

Class

XMLRuleProcessor

 An XML rule processor.

QuickLinks

addEventListener, endProcessingRuleSet, extractLabel, findNextMatch, getElements, halt, insertLabel, remove, removeEventListener, skipChildren, startProcessingRuleSet, startProcessingSubtree, toSource, toSpecifier

Hierarchy

Application
XMLRuleProcessor
Event | EventListener | MutationEvent | XMLRuleMatchData

Properties

PropertyTypeAccessDescription
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
haltedbool readonlyIf true, the XML rule process has halted.
idnumber readonlyThe unique ID of the XMLRuleProcessor.
indexnumber readonlyThe index of the XMLRuleProcessor within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the XMLRuleProcessor; this is an alias to the XMLRuleProcessor's label property.
parentApplication readonlyThe parent of the XMLRuleProcessor (a Application).
propertiesObject r/wA property that allows setting of several properties at the same time.
rulePathsArray of string readonlyThe XPath condition paths of the rules in the rule set.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void endProcessingRuleSet ()
Stop processing XML rule set.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

XMLRuleMatchData findNextMatch ()
Finds the next matching XML element.

Array of XMLRuleProcessor getElements ()
Resolves the object specifier, creating an array of object references.

void halt ()
Halt the XML rule processor.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the XMLRuleProcessor.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void skipChildren ()
Do not process XML elements (children) of the current XML element.

XMLRuleMatchData startProcessingRuleSet (initialElement: XMLElement)
Start processing an XML rule set.

ParameterTypeDescription
initialElementXMLElementThe XML element at which to start processing the rule set.

XMLRuleMatchData startProcessingSubtree ()
Process the XML elements of the current XML element.

string toSource ()
Generates a string which, if executed, will return the XMLRuleProcessor.

string toSpecifier ()
Retrieves the object specifier.

Element of

XMLRuleMatchData.parent

Used in:

XMLRuleProcessor XMLRuleProcessors.nextItem (obj: XMLRuleProcessor)

XMLRuleProcessor XMLRuleProcessors.previousItem (obj: XMLRuleProcessor)

Return

Array of XMLRuleProcessor XMLRuleProcessor.getElements ()

XMLRuleProcessor XMLRuleProcessors.[] (index: number)

XMLRuleProcessor XMLRuleProcessors.add (rulePaths: Array of string[, prefixMappingTable: Array of varies][, withProperties: Object])

XMLRuleProcessor XMLRuleProcessors.anyItem ()

Array of XMLRuleProcessor XMLRuleProcessors.everyItem ()

XMLRuleProcessor XMLRuleProcessors.firstItem ()

XMLRuleProcessor XMLRuleProcessors.item (index: varies)

XMLRuleProcessor XMLRuleProcessors.itemByID (id: number)

XMLRuleProcessor XMLRuleProcessors.itemByName (name: string)

Array of XMLRuleProcessor XMLRuleProcessors.itemByRange (from: varies, to: varies)

XMLRuleProcessor XMLRuleProcessors.lastItem ()

XMLRuleProcessor XMLRuleProcessors.middleItem ()

XMLRuleProcessor XMLRuleProcessors.nextItem (obj: XMLRuleProcessor)

XMLRuleProcessor XMLRuleProcessors.previousItem (obj: XMLRuleProcessor)

Jongware, 28-Apr-2012 v3.0.3iContents :: Index