XMLImportPreference

XML import preferences.

Methods:

addEventListener, getElements, removeEventListener, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, File, Object, XMLImportStyles, XMLTransformFile

Hierarchy:

Superclass: Preference

Class: XMLImportPreference

Property Listing

Property

Type

Access

Description

allowTransform

Boolean

read/write

If true, transforms the XML using an XSLT file.

createLinkToXML

Boolean

read/write

If true, creates a link to the imported XML file. If false, embeds the file.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

ignoreUnmatchedIncoming

Boolean

read/write

If true, ignores elements that do not match the existing structure. Note: Valid only when import style is merge.

ignoreWhitespace

Boolean

read/write

If true, leaves existing content in place if the matching XML content contains only whitespace characters such as a carriage return or a tab character. Note: Valid only when import style is merge.

importCALSTables

Boolean

read/write

If true, imports CALS tables as InDesign tables.

importStyle

XMLImportStyles

XMLImportStyles.APPEND_IMPORT

XMLImportStyles.MERGE_IMPORT

read/write

The style of incorporating imported XML content into the document.

importTextIntoTables

Boolean

read/write

If true, imports text into tables if tags match placeholder tables and their cells. Note: Valid only when import style is merge.

importToSelected

Boolean

read/write

If true, imports into the selected XML element. If false, imports at the root element.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

parent

Application

Document

readonly

The parent of the XMLImportPreference (a Application or Document).

properties

Object

read/write

A property that allows setting of several properties at the same time.

removeUnmatchedExisting

Boolean

read/write

If true, deletes existing elements or placeholders in the document that do not have matches in the XML file. Note: Valid only when import style is merge.

repeatTextElements

Boolean

read/write

If true, repeating text elements inherit the formatting applied to placeholder text. Note: Valid only when import style is merge.

transformFilename

File

XMLTransformFile

XMLTransformFile.STYLESHEET_IN_XML

read/write

The name of the XSLT file. Note: Valid when allow transform is true. Can return: File or XMLTransformFile enumerator.

transformParameters

Array of Orderedarraycontainingname:String

Array of Value:String

read/write

Stylesheet parameters as a list of name/value pairs in the format [[name, value], [name, value], ...]. Can return: Ordered array containing name:String, value:String.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

XMLImportPreference getElements ()

Resolves the object specifier, creating an array of object references.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

Generates a string which, if executed, will return the XMLImportPreference.

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Application.xmlImportPreferences

Document.xmlImportPreferences

Return

XMLImportPreference.getElements()