Namespace (XmlDoc property): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%currentXmlNamespaceSetting</th> | <tr><th>%currentXmlNamespaceSetting</th> | ||
<td>The <var>XmlNamespaceSetting</var> enumeration value of <var class="term">doc</var>'s <var>Namespace</var> property. Valid values are < | <td>The <var>XmlNamespaceSetting</var> enumeration value of <var class="term">doc</var>'s <var>Namespace</var> property. Valid values are <var>On</var>, <var>Ignore</var>, and <var>None</var>, as described below.</td></tr> | ||
<tr><th>doc</th> | <tr><th>doc</th> | ||
<td>An <var>XmlDoc</var> object expression.</td></tr> | <td>An <var>XmlDoc</var> object expression.</td></tr> |
Revision as of 21:35, 1 June 2011
(Dis)allow or disable prefix handling (XmlDoc class)
Namespace determines namespace handling in the XmlDoc, with the mapping of QName (qualified name) prefixes to namespace URIs.
Syntax
%currentXmlNamespaceSetting = doc:Namespace doc:Namespace = newXmlNamespaceSetting
Syntax terms
%currentXmlNamespaceSetting | The XmlNamespaceSetting enumeration value of doc's Namespace property. Valid values are On, Ignore, and None, as described below. |
---|---|
doc | An XmlDoc object expression. |
newXmlNamespaceSetting | The XmlNamespaceSetting enumeration value to assign to doc's Namespace property. |
XmlNamespaceSetting enumeration
The values of the Namespace property are of type Enumeration XmlNamespaceSetting; these values and their meanings are shown below:
On | This is the initial value of the Namespace property. With this setting, the requirements imposed by the XML Namespaces Recommendation are followed by Janus SOAP. That is, wherever a prefix occurs in the name of an element or attribute in the document, a namespace declaration must be in effect for that prefix. |
---|---|
Ignore | With this setting, namespaces are not handled in any way by Janus SOAP; specifically:
|
None | With this setting, namespaces are not allowed in a document; specifically:
|
Usage notes
- The Namespace property may not be changed if an XmlDoc contains an Element node.
- Every name in the document is treated as a character string, which may include a colon.
- A namespace declaration during deserialization is simply treated as an attribute, whose name begins with the characters "xmlns".
- The request is cancelled if the URI argument is passed by an Element- or Attribute-adding method like AddElement, AddAttribute, InsertElementBefore, and so on.
Examples
The following example obtains the string value of the Namespace property:
%str = doc:namespace:toString
Request-Cancellation Errors (for set method)s
- XmlDoc contains an Element node.