Macro Language Reference > Macros > Document > ttxml
  
ttxml
Description
Forces PTC ALD to recognize a particular stream as requiring XML parsing or node information for XPath use, even if it is not one of the recognized default stream types .xm. or .xs
Syntax
ttxml stream:s? on off:n?
stream
The name of the stream whose contents should be parsed as XML. If the stream parameter is not specified, the current stream is used.
on off
Set / remove the XML flag:
Ø
Automatic mode: if the on off parameter is not specified, the macro toggles the XML flag on or off depending on the current setting. PTC ALD 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 to on; all other stream types are set to off.
Stream Contents
If the stream starts with a valid XML declaration, the flag is set to on. Once the XML flag has been set manually, automatic detection for that stream is no longer available.
0
Forced mode - turn XML parsing off.
1
Forced mode - turn XML parsing on.
2
Reset the XML flag to its default value, returning to automatic mode.
Additional Information
Prior toPTC ALD version 7.78, when parsing an XML stream using the PTC ALD -XML parser, a text stream had to be of either XML (.xm) or XSLT (.xs) type to obtain XML tree node information or to use XPath statements. 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, the ttxml macro is used to indicate if a stream contains XML and is required to be parsed by the LibXML parser
 
The ttxml command is only available when using the LibXML parser. When a new stream or PTC ALD file created in an earlier version of PTC ALD is loaded, the mode flag for each stream is set to automatic mode and the state of the corresponding XML flag is calculated.