%XML.Namespaces
class %XML.Namespaces extends %Library.RegisteredObject
%XML.Namespace manages the XML namespaces for an XML document.Property Inventory
- AttributeQualified
- CurrentNamespace
- DefaultDefined
- DefaultNamespace
- DefaultPrefix
- DefaultXmlns
- ElementQualified
- OutputTypeAttribute
- SaveDefaultDefined
- SuppressXmlns
Method Inventory
- AddInstanceNamespace()
- AddNamespace()
- AddSOAP12Namespace()
- AddSOAPNamespace()
- AddSchemaNamespace()
- DefineAllNamespacePrefixes()
- DefineNamespacePrefix()
- GetNamespace()
- GetNamespacePrefix()
- GetNewPrefix()
- GetNextClass()
- GetNextDefinedNamespace()
- GetNextNamespace()
- GetPrefix()
- PopNode()
- PushNode()
- Reset()
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()
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
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.
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.
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.
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.
soapPrefix, schemaPrefixPrefix and xsiPrefix are the optional preferred prefix for these namespaces. If no prefix is specified, a unique prefix will be computed.
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.
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.
Get the namespace for the specified prefix at the current stack level.
"" is returned if the prefix is not defined.
Get a new unique prefix.
GetNextClass returns the next class in the XML namespace in class name order.
A return of "", indicates no more classes to list.
Note that namespace="" indicates classes without an XML namespace defined.
Get the next namespace
GetNextNamespace returns the next XML namespace in name order.
A return of "", indicates no more XML namespaces to list.
Get the prefix for the specified namespace at the current stack level.
"" is returned if the namespace is not defined.
method PopNode()
Pop the namespace information for the last node pushed.
Push a new current namespace onto the stack of active namespaces.
namespace is the XML namespace for the elements of the node that is being created. This method does not actually create the node. It just does the required namespace handling. If this namespace has not yet been added, it will also be added with a default prefix. The default namespace will be the namespace for the node if "" is specified.
namespace is the XML namespace for the elements of the node that is being created. This method does not actually create the node. It just does the required namespace handling. If this namespace has not yet been added, it will also be added with a default prefix. The default namespace will be the namespace for the node if "" is specified.
method Reset()
Reset myself
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()