Xml; Overview; The Best Approach To Scripting Xml In Incopy; Scripting Xml Elements - Adobe 65009333 - InCopy CS4 - PC Manual

Scripting guide: javascript
Hide thumbs Also See for 65009333 - InCopy CS4 - PC:
Table of Contents

Advertisement

8

XML

Extensible Markup Language, or XML, is a text-based mark-up system created and managed by the World
Wide Web Consortium (www.w3.org). Like Hypertext Markup Language (HTML), XML uses angle brackets
to indicate markup tags (for example,
XML allows you to describe content more precisely by creating custom tags.
Because of its flexibility, XML increasingly is used as a format for storing data. InCopy includes a complete
set of features for importing XML data into page layouts, and these features can be controlled using
scripting.
We assume you already read
We also assume you have some knowledge of XML, DTDs, and XSLT.

Overview

Because XML is entirely concerned with content and explicitly not concerned with formatting, making
XML work in a page-layout context is challenging. InCopy's approach to XML is quite complete and
flexible, but it has a few limitations:
Once XML elements are imported into an InCopy document, they become InCopy elements that
correspond to the XML structure. The InCopy representations of the XML elements are not the same thing
as the XML elements themselves.
Each XML element can appear only once in a layout. If you want to duplicate the information of the
XML element in the layout, you must duplicate the XML element itself.
The order in which XML elements appear in a layout depends largely on the order in which they
appear in the XML structure.
Any text that appears in a story associated with an XML element becomes part of that element's data.

The best approach to scripting XML in InCopy

You might want to do most of the work on an XML file outside InCopy, before importing the file into an
InCopy layout. Working with XML outside InCopy, you can use a wide variety of excellent tools, like XML
editors and parsers.
When you need to rearrange or duplicate elements in a large XML data structure, the best approach is to
transform the XML using XSLT. You can do this as you import the XML file.

Scripting XML Elements

This section shows how to set XML preferences and XML import preferences, import XML, create XML
elements, and add XML attributes. The scripts in this section demonstrate techniques for working with the
XML content itself; for scripts that apply formatting to XML elements, see
story" on page
Chapter 2, "Getting Started
83.
or
). While HTML has a predefined set of tags,
<article>
<para>
"
and know how to create, install, and run a script.
"Adding XML elements to a
77

Advertisement

Table of Contents
loading

This manual is also suitable for:

Incopy cs4

Table of Contents