- prefix
- The prefix to declare, or the empty string to indicate the default element namespace. This may never have the value "xml" or "xmlns".
- uri
- The Namespace URI to associate with the prefix.
Documentation for this section has not yet been entered.
Declare a Namespace prefix. All prefixes must be declared before they are referenced. For example, a SAX driver (parser) would scan an element's attributes in two passes: first for namespace declarations, then a second pass using NamespaceSupport.ProcessName(string, System.String[], System.String[]) to interpret prefixes against (potentially redefined) prefixes.
This method declares a prefix in the current Namespace context; the prefix will remain in force until this context is popped, unless it is shadowed in a descendant context.
To declare the default element Namespace, use the empty string as the prefix.
Note that you must not declare a prefix after you've pushed and popped another Namespace context, or treated the declarations phase as complete by processing a prefixed name.
Note that there is an asymmetry in this library: NamespaceSupport.GetPrefix(string) will not return the "" prefix, even if you have declared a default element namespace. To check for a default namespace, you have to look it up explicitly using NamespaceSupport.GetURI(string). This asymmetry exists to make it easier to look up prefixes for attribute names, where the default prefix is not allowed.