Home > Class Reference > ENSLIB namespace > %XML.Namespaces

%XML.Namespaces

class %XML.Namespaces extends %Library.RegisteredObject

%XML.Namespace manages the XML namespaces for an XML document.

Property Inventory

Method Inventory

Properties

property AttributeQualified as %Boolean [ InitialExpression = 0 ];
If true, the XML document is the the form specified by attributeFormDefault="qualified".
Property methods: AttributeQualifiedDisplayToLogical(), AttributeQualifiedGet(), AttributeQualifiedIsValid(), AttributeQualifiedLogicalToDisplay(), AttributeQualifiedNormalize(), AttributeQualifiedSet()
property CurrentNamespace as %String;
The namespace for the current node.
Property methods: CurrentNamespaceDisplayToLogical(), CurrentNamespaceGet(), CurrentNamespaceIsValid(), CurrentNamespaceLogicalToDisplay(), CurrentNamespaceLogicalToOdbc(), CurrentNamespaceNormalize(), CurrentNamespaceSet()
property DefaultDefined as %String;
The default namespace that the XML document has defined or "" if none.
Property methods: DefaultDefinedDisplayToLogical(), DefaultDefinedGet(), DefaultDefinedIsValid(), DefaultDefinedLogicalToDisplay(), DefaultDefinedLogicalToOdbc(), DefaultDefinedNormalize(), DefaultDefinedSet()
property DefaultNamespace as %String;
The default namespace to use when no namespace is specified for the current namespace. The namespace "" is treated as equivalent to an XML document with no namespace.
Property methods: DefaultNamespaceDisplayToLogical(), DefaultNamespaceGet(), DefaultNamespaceIsValid(), DefaultNamespaceLogicalToDisplay(), DefaultNamespaceLogicalToOdbc(), DefaultNamespaceNormalize(), DefaultNamespaceSet()
property DefaultPrefix as %String [ MultiDimensional ];
DefaultPrefix(namespace)=prefix is an array of default prefixes to be used for adding namespaces when no prefix is defined.
Property methods: DefaultPrefixDisplayToLogical(), DefaultPrefixGet(), DefaultPrefixIsValid(), DefaultPrefixLogicalToDisplay(), DefaultPrefixLogicalToOdbc(), DefaultPrefixNormalize(), DefaultPrefixSet()
property DefaultXmlns as %String;
DefaultXmlns allows optional specification of the XML namespace to use as the default XML namespace when SuppressXmlns is false.
Property methods: DefaultXmlnsDisplayToLogical(), DefaultXmlnsGet(), DefaultXmlnsIsValid(), DefaultXmlnsLogicalToDisplay(), DefaultXmlnsLogicalToOdbc(), DefaultXmlnsNormalize(), DefaultXmlnsSet()
property ElementQualified as %Boolean [ InitialExpression = 0 ];
If true, the XML document is the the form specified by elementFormDefault="qualified". This is the default value to use if elementQualfied not specified in PushNodeForExport.
Property methods: ElementQualifiedDisplayToLogical(), ElementQualifiedGet(), ElementQualifiedIsValid(), ElementQualifiedLogicalToDisplay(), ElementQualifiedNormalize(), ElementQualifiedSet()
property OutputTypeAttribute as %Boolean [ InitialExpression = 0 ];
OutputTypeAttribute allows the user to force the inclusion of the xsi:type attribute for each element of object output.
Property methods: OutputTypeAttributeDisplayToLogical(), OutputTypeAttributeGet(), OutputTypeAttributeIsValid(), OutputTypeAttributeLogicalToDisplay(), OutputTypeAttributeNormalize(), OutputTypeAttributeSet()
property SaveDefaultDefined as %String;
Save default namespace when making temporary change before calling XMLExportInternal in order to support form="unqualified"
Property methods: SaveDefaultDefinedDisplayToLogical(), SaveDefaultDefinedGet(), SaveDefaultDefinedIsValid(), SaveDefaultDefinedLogicalToDisplay(), SaveDefaultDefinedLogicalToOdbc(), SaveDefaultDefinedNormalize(), SaveDefaultDefinedSet()
property SuppressXmlns as %Boolean [ InitialExpression = 0 ];
SuppressXmlns allows optionally suppression of the use of xmlns= to set default XML namespace when ElementQualified is false. If SuppressXmlns is true then a prefix is used for each tag rather than default namespace with xmlns=.
Property methods: SuppressXmlnsDisplayToLogical(), SuppressXmlnsGet(), SuppressXmlnsIsValid(), SuppressXmlnsLogicalToDisplay(), SuppressXmlnsNormalize(), SuppressXmlnsSet()

Methods

method AddInstanceNamespace(prefix As %String) as %Status
Add a the XML Schema instance namespace definition to the current level. PopNode() will remove this definition. The next PushNode...() will cause the attributes to be created for adding this namespace to the XML document.
prefix is the optional preferred prefix for this namespace. If no prefix is specified, a unique prefix will be computed.
method AddNamespace(namespace As %String, prefix As %String, schemaLocation As %String = "", allowMultiplePrefixes As %Boolean = 0) as %Status
Add a namespace definition to the current level. PopNode() will remove this definition. The next PushNode...() will cause the attributes to be created for adding this namespace to the XML document.

prefix is the optional preferred prefix for this namespace. If no prefix is specified, a unique prefix will be computed.

A schemaLocation attribute value for the first definition of this namespace may also specified.

If allowMultiplePrefixes is true then multiple prefixes may be defined for the same namespace. The default is false which will override the previously defined prefix for the same namespace.
method AddSOAP12Namespace(soapPrefix As %String, schemaPrefix As %String, xsiPrefix As %String) as %Status
Add the SOAP 1.2 encoding namespace, the XML schema namespace and the XML Schema instance namespace definitions to the current level. PopNode() will remove these definitions. The next PushNode...() will cause the attributes to be created for adding these namespaces to the XML document.
soapPrefix, schemaPrefixPrefix and xsiPrefix are the optional preferred prefix for these namespaces. If no prefix is specified, a unique prefix will be computed.
method AddSOAPNamespace(soapPrefix As %String, schemaPrefix As %String, xsiPrefix As %String) as %Status
Add the SOAP 1.1 encoding namespace, the XML schema namespace and the XML Schema instance namespace definitions to the current level. PopNode() will remove these definitions. The next PushNode...() will cause the attributes to be created for adding these namespaces to the XML document.
soapPrefix, schemaPrefixPrefix and xsiPrefix are the optional preferred prefix for these namespaces. If no prefix is specified, a unique prefix will be computed.
method AddSchemaNamespace(prefix As %String) as %Status
Add a the XML Schema namespace definition to the current level. PopNode() will remove this definition. The next PushNode...() will cause the attributes to be created for adding this namespace to the XML document.
prefix is the optional preferred prefix for this namespace. If no prefix is specified, a unique prefix will be computed.
method DefineAllNamespacePrefixes(prefixRequired As %Boolean = 1)
Make prefix definition for all newly added namespaces.
method DefineNamespacePrefix(namespace As %String, prefixRequired As %Boolean = 1, prefix As %String)
Make prefix definition for a new namespace at the current level. Optionally force the prefix to be used by specifying 3rd argument.
method GetNamespace(prefix As %String) as %String
Get the namespace for the specified prefix at the current stack level. "" is returned if the prefix is not defined.
metho