ArborX


ttxml

Longname: t t xml   Open the Documentation Legend
Released: 7.78 
Created: 7.78 
See also: ttagxml txmlerror txmlload txmlsave txmlparser tnsuri
XML in Arbortext APP XPath in Arbortext APP

Summary
Force 3B2 to recognise a particular stream as requiring XML parsing or node information for XPath use even if it is not one of the recognised default stream types.
Example (n/a)
No example is available for this feature.

Syntax (7.78)
ttxml  stream:s?  on off:n?
stream:s

Defines whether or not to parse the contents of the stream as XML. If the stream parameter is not specified the current stream is used.

on off:n

Determines if the XML flag has been set automatically, or has been forced either to on or off.

Ø  Automatic mode: If the on off parameter is not specified, the macro toggles the XML flag on and off. If the mode flag is set to automatic mode, Arbortext APP calculates the default setting of the XML flag based upon the type of the specified stream or the contents of the stream. When the stream is in automatic mode, the following criteria are used to determine if the stream should be passed as XML:

Stream Type:

XML (.xm) or XSLT (.xs) type streams have the XML flag set on; all other stream types are set off.

Stream Contents:

If the stream has a valid XML declaration at the start the flag is set on. Once the XML flag has been set manually automatic detection for that stream is no longer available.

Forced mode - Force XML parsing off.
Forced mode - Force XML parsing on.
Reset the XML flag to its default value, returning to automatic mode.

Version specific information7.78  Prior to Version 7.78, when parsing an XML stream using the 3B2-XML parser, to obtain XML tree node information or to use XPath statements, the text stream had to be of either XML (.xm) or XSLT (.xs) type. This meant that the benefits of XML parsing was not available to other types of stream, for example, styles.

In order to change this and implement the benefits that XML offers, when using the Libxml parser, the ttxml macro is used to indicate if a stream contains XML and is required to be parsed.

The ttxml command is only available when using the Libxml parser. When a new stream is created or 3B2 file created in an earlier version of 3B2 is loaded, the mode flag for each stream is set to automatic mode and the state of the corresponding XML flag is calculated.

Document created on 08-Feb-2003 (revision 1)