Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%XML] >  [Namespaces]
Private  Storage   

class %XML.Namespaces extends %RegisteredObject

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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
21 29


Summary

Properties
AttributeQualified CurrentNamespace DefaultDefined DefaultNamespace
DefaultPrefix DefaultXmlns ElementQualified OutputTypeAttribute
SaveDefaultDefined SuppressXmlns

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
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 CurrentNamespace as %String;
The namespace for the current node.
• property DefaultDefined as %String;
The default namespace that the XML document has defined or "" if none.
• 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 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 DefaultXmlns as %String;
DefaultXmlns allows optional specification of the XML namespace to use as the default XML namespace when SuppressXmlns is false.
• 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 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 SaveDefaultDefined as %String;
Save default namespace when making temporary change before calling XMLExportInternal in order to support form="unqualified"
• 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=.

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.
• method GetNamespacePrefix(namespace As %String, ByRef attrs) as %String
• method GetNewPrefix(prefix As %String, bTemp As %Boolean = 0) as %String
Get a new unique prefix.
• classmethod GetNextClass(namespace As %String, class As %String) as %String
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.
• method GetNextDefinedNamespace(namespace As %String) as %String
Get the next namespace
• classmethod GetNextNamespace(namespace As %String) as %String
GetNextNamespace returns the next XML namespace in name order. A return of "", indicates no more XML namespaces to list.
• method GetPrefix(namespace As %String) as %String
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.
• method PushNode(namespace As %String = "") as %Status
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.
• method Reset()
Reset myself


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.