Finds the namespace URI associated with the specified prefix in the specified XML document context(s).
Parameters:
prefix
The prefix by which the corresponding namespace URI is to be found.Note: When the specified prefix is an empty string, it will be treated as a reference to the default namespace assigned to the given XML document context. (By default, that default namespace is a global one, whose URI is empty string.)
contextElement
Specifies the element that determines the XML document context (i.e. position on the XML document's tree) against which the namespace URI is to be resolved.In particular, that is done as the following. With each element in the XML document, a certain number of namespace URI/prefix bindings may be associated. The function looks for the binding that defines the specified prefix. If such a binding is found the function returns its namespace URI.
contextElements
Specifies the enumeration of elements that determine different XML document contexts.The function starts from the first element and uses it to resolve the namespace URI (as described at
contextElement
parameter).If the element's context does not define a binding for the specified prefix, the function tries the next element from the enumeration and repeats so until the binding found or the last element reached.
Note: When neither contextElement
nor contextElements
parameter is specified, the generator context element will be used by default.
Returns:
The found namespace URI or an empty string, if no binding for the given prefix can be found.
See Also:
findPrefixByNS()