17.16.5.28 INCLUDETEXT

field-argument-1 [ field-argument-2 ]

[ switches ]

  • field-argument-1: field-argument

  • field-argument-2: field-argument

Description: Inserts all or part of the text and graphics contained in the document named by field-argument-1. field-argument-1 specifies the location of the document using an IRI (Duerst and Suignard 2005). If the document is a WordprocessingML document, the portion marked by the optional bookmark field-argument-2 is

inserted. If no such bookmark is specified here, the whole document is inserted. If the document is an XML file, the fragment referred to by an XPath expression in the \x switch is inserted. If no such switch is specified, the whole XML file is inserted.

If field-argument-1 contains white space, it shall be enclosed in double quotes.

[Note: A list of possible text formats is provided in 11.3.1. end note]

Field Value: The specified text and graphics.

Switches: Zero or more of the following field-specific-switches.

\!

Prevents this field from being updated unless all fields in the inserted text are first updated in their original document.

\c

Specifies that the file specified by field-argument-2 shall be processed by a document filter whose name matches the corresponding field-argument value. Possible field-argument values are implementation-defined.

\e

Specifies the encoding applied to the data within the file referenced by field-argument-1. If this argument is omitted, applications should attempt to determine the encoding by reading the file’s contents if possible.

\m

Specifies the MIME type of the file referenced by field-argument-1, as defined by http://www.iana.org/assignments/media-types/. If this argument is omitted, applications should attempt to determine the file type from its contents if possible.

\n

The text in this switch’s field-argument specifies a namespace mapping for XPath queries. This switch is required if the \x switch refers to an element by name in an XML file that declares a namespace.

\t

The text in this switch’s field-argument specifies an XSLT for formatting XML data.

\x

The text in this switch’s field-argument specifies the XPath for returning a fragment of data in an XML file.

[Example: The following field inserts the portion of the WordprocessingML document referred to by the bookmark Summary:

INCLUDETEXT "file:///C:/Winword/Port Development RFP" Summary

The following field inserts the Name element of the XML document Resume.xml and applies the XSLT Display.xsl to it:

INCLUDETEXT "file:///C:/Resume.xml" \n xmlns:a=\"resume-schema\"
  \t "file:///C:/display.xsl" \x a:Resume/a:Name

end example]

Syntax:

Last updated on