FOM Reference > Application > Preferences > fTemplatePreferencesXML interface
  
fTemplatePreferencesXML interface
This object specifies XML preferences for the current template.
ResolveNamespaces enumeration
How to resolve tag namespaces during formatting.
The ResolveNamespaces enumeration has the following constants of type int.
RESOLVE_URIAPP = 0
Look for tags in a namespace with an associated URI that matches the namespace of the current node. If one isn't found, use standard PTC ALD resolution methods.
RESOLVE_URI = 1
Only look for tags in a namespace with an associated URI that matches the namespace of the current node.
RESOLVE_APP = 2
Only look for tags in a namespace using standard PTC ALD resolution methods, ignoring any XML namespace URI information.
ExpandEntities enumeration
When to expand entity references when contained in attribute values during formatting.
The ExpandEntities enumeration has the following constants of type int.
EXPAND_NEVER = 0
Never expand entity references in attributes.
EXPAND_SHOWSTRING = 1
Only expand entity references in attributes when processing show strings.
EXPAND_ATTRLOOPS = 2
Only expand entity references in attributes when processing attribute loops.
EXPAND_BOTH = 3
Expand entity references in attributes when processing both show strings and attribute loops.
ExtensionFunctions enumeration
How to allow PTC ALD extension functions when processing XPath expressions.
The ExtensionFunctions enumeration has the following constants of type int.
FUNCTIONS_NONE = 0
Don't allow any PTC ALD extension functions.
FUNCTIONS_GLOBAL = 1
Only add the PTC ALD extension functions to the global namespace.
FUNCTIONS_X3B2 = 2
Only add the PTC ALD extension functions to the x3b2 namespace.
FUNCTIONS_BOTH = 3
Add the PTC ALD extension functions to both the global and x3b2 namespaces.
addDefaultAttributes attribute
Macro: tdpref
If true, any default attributes specified in the DTD will be added to the built tree once parsing is complete.
addDefaultAttributes
Access
read-write
Returns
boolean
allowAPPNodeTests attribute
Macro: tdpref
If true, use of the PTC ALD extension node tests will be permitted inside XPath expressions.
allowAPPNodeTests
Access
read-write
Returns
boolean
allowAPPVariables attribute
Macro: tdpref
If true, use of PTC ALD variables will be permitted inside XPath expressions using the "^varname" syntax.
allowAPPVariables
Access
read-write
Returns
boolean
allowExtensionFunctions attribute
Macro: tdpref
Whether to allow use of the PTC ALD extension functions inside XPath expressions, and which namespace the extension functions should be added to. Value should be one of fTemplatePreferencesXML.ExtensionFunctions.
allowExtensionFunctions
Access
read-write
Returns
int
createLinksToFiles attribute
Macro: tdpref
If true and loadExternalFiles is true, the files will be loaded as links to tags in PTC ALD. Otherwise the contents of the file will be discarded once parsing and validation has finished.
createLinksToFiles
Access
read-write
Returns
boolean
enableNSDOMFormatting attribute
Macro: tdpref
Enable tnsuri and XPath prefix shortcuts when formatting DOM trees.
enableNSDOMFormatting
Access
read-write
Returns
boolean
expandEntityReferences attribute
Macro: tdpref
When to expand entity references in attributes during formatting. Value should be one of fTemplatePreferencesXML.ExpandEntities
expandEntityReferences
Access
read-write
Returns
int
ignoreMissingXMLDecl attribute
Macro: tdpref
If true, no warning will be generated if the XML declaration is missing from the document being parsed.
ignoreMissingXMLDecl
Access
read-write
Returns
boolean
ignoreUndefinedEntities attribute
Macro: tdpref
If true, no errors will be generated if undefined entity references are found during parsing.
ignoreUndefinedEntities
Access
read-write
Returns
boolean
loadExternalFiles attribute
Macro: tdpref
If true, any external files referenced inside the XML will be loaded as required, for example to resolve DTDs or XInclude nodes.
loadExternalFiles
Access
read-write
Returns
boolean
namespaceResolution attribute
Macro: tdpref
How to resolve namespace tags when formatting the template. Value should be one of fTemplatePreferencesXML.ResolveNamespaces
namespaceResolution
Access
read-write
Returns
int
processXInclude attribute
Macro: tdpref
If true, any XInclude elements will be processed and added to the tree that gets built once parsing is complete.
processXInclude
Access
read-write
Returns
boolean
replaceUndefinedEntities attribute
Macro: tdpref
If true, any undefined entity references will be replaced with a text node containing the reference. Otherwise, the reference will be ignored.
replaceUndefinedEntities
Access
read-write
Returns
boolean
saveXMLErrors attribute
Macro: tdpref
If true, any errors generated during XML parsing (i.e. any tag of type fTag.TYPE_XML_ERROR) will be saved with the template.
saveXMLErrors
Access
read-write
Returns
boolean
stripWhitespaceNodes attribute
Macro: tdpref
If true, any text nodes in the tree that only contain whitespace will be deleted once parsing is complete.
stripWhitespaceNodes
Access
read-write
Returns
boolean
validateXML attribute
Macro: tdpref
If true, the XML being parsed will be validated using the DTD specified in the DOCTYPE.
validateXML
Access
read-write
Returns
boolean