Generates a string representation of the full XML name specified with the Namespace URI and Local Name according to the specified form.
Parameters:
form
Specify the form of the result XML name returned by the function.The parameter may accept one of the three possible string values:
"qualified"
The XML name will be represented aswhere the namespace prefix is found according to the XML document context(s) explicitly or implicitly specified in the function parameters.prefix:localName
"unqualified"
The XML name will be represented only by its Local Name part."full"
The XML name will be represented as the stringIf the passed parameter value is not the one of those above, an error will be raised.{namespaceURI}localName
When the parameter
'form'
is not specified, the default XML name representation form will be used, which is set withsetXMLNameForm()
function. This allows setting the form only once for all subsequenttoXMLName()
calls without passing it each time as the function parameter. As thetoXMLName()
function is used very frequently, this simplifies programming and improves performance.
namespaceURI
localName
Specifies the Namespace URI and Local Name to be converted to the XML name string.
qName
Alternatively, specifies both Namespace URI and Local Name at once (viaqName.namespaceURI
andqName.localName
properties).(For more details about
QName
type, see below.)Note: When this parameter is
null
, the function returns empty string.
contextElement
Specifies the element that determines the XML document context (i.e. position on the XML document's tree) against which a new namespace prefix is to be resolved.Note: This parameter will be used only when generating the qualified form.
contextElements
Specifies an array or enumeration of elements that determine different XML document contexts.The function starts from the first element and uses it to resolve the namespace prefix.
If the element's context does not define the necessary namespace URI/prefix binding, the function tries the next element from the array/enumeration and repeats so until the binding found or the last element reached.
Note: This parameter will be used only when generating the qualified form.
Note: When the qualified form is to be generated and
neither 'contextElement'
nor 'contextElements'
parameter is specified, the generator context element will be used by default.
Returns:
A string representation of the XML name.
See Also:
setXMLNameForm(), getXMLNameForm()
${include ../../../refs/qname_type_heading.htm}
${include ../../../gom/QName/doc.htm}