XBinder C# Runtime Library  2.8
Public Member Functions | List of all members
com.objsys.xbinder.runtime.XBXmlNamespaceContext Class Reference

Represents a mapping between namespaces and prefixes. A prefix may map only to a single namespace. A namespace may be bound to multiple prefixes. More...

Public Member Functions

virtual System.String addNamespace (System.String namespaceURI, System.String prefix)
 Add (or replace) a namespace mapping. If prefix was previously mapped, the previous value is returned. Otherwise, an indicator of an empty namespace URI is returned. More...
 
virtual string addUniquePrefix (string namespaceURI)
 Map a unique prefix for the given namespace. More...
 
virtual string getDefaultNamespaceURI ()
 Returns the namespace that the default namespace prefix is mapped to. More...
 
virtual string getExistingPrefix (string namespaceURI)
 Returns a non-empty prefix (not the default namespace prefix) for the given namespace URI. If one or more such prefixes are mapped to the URI, one of them will be returned. Otherwise, null is returned. More...
 
virtual System.String getNamespaceURI (System.String prefix)
 Return the namespace URI that the given prefix is mapped to. Returns an indicator of an empty namespace URI if it is not mapped to any URI. More...
 
virtual string getPrefix (string namespaceURI)
 Return a prefix for the given namespace URI. If one or more prefixes other than the default namespace prefix is mapped to the URI, one of these will be returned. Otherwise, a generated prefix will be automatically mapped to the URI and returned. More...
 
virtual bool isDefaultNamespaceURI (string namespaceURI)
 Returns true if the given namespace is the default namespace (i.e., the default namespace prefix is mapped to the specified namespace URI). More...
 
virtual ICollection< string > prefixes ()
 Returns an ICollection of all mapped prefixes More...
 

Detailed Description

Represents a mapping between namespaces and prefixes. A prefix may map only to a single namespace. A namespace may be bound to multiple prefixes.

The default namespace is mapped by prefix DefaultNamespacePrefix. By default, the default namespace is NullNameSpaceURI.

<author> Kevin/Doug

</author>

Member Function Documentation

◆ addNamespace()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContext.addNamespace ( System.String  namespaceURI,
System.String  prefix 
)
virtual

Add (or replace) a namespace mapping. If prefix was previously mapped, the previous value is returned. Otherwise, an indicator of an empty namespace URI is returned.

Parameters
namespaceURI
prefix

◆ addUniquePrefix()

virtual string com.objsys.xbinder.runtime.XBXmlNamespaceContext.addUniquePrefix ( string  namespaceURI)
virtual

Map a unique prefix for the given namespace.

Returns
the unique prefix that was generated and mapped to the namespace

◆ getDefaultNamespaceURI()

virtual string com.objsys.xbinder.runtime.XBXmlNamespaceContext.getDefaultNamespaceURI ( )
virtual

Returns the namespace that the default namespace prefix is mapped to.

Returns
The URI for the namespace that the default namespace is mapped to.

◆ getExistingPrefix()

virtual string com.objsys.xbinder.runtime.XBXmlNamespaceContext.getExistingPrefix ( string  namespaceURI)
virtual

Returns a non-empty prefix (not the default namespace prefix) for the given namespace URI. If one or more such prefixes are mapped to the URI, one of them will be returned. Otherwise, null is returned.

Parameters
namespaceURIThe URI for which a prefix is to be returned.
Returns
A prefix corresponding to the specified namespace URI.

◆ getNamespaceURI()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContext.getNamespaceURI ( System.String  prefix)
virtual

Return the namespace URI that the given prefix is mapped to. Returns an indicator of an empty namespace URI if it is not mapped to any URI.

Parameters
prefix

◆ getPrefix()

virtual string com.objsys.xbinder.runtime.XBXmlNamespaceContext.getPrefix ( string  namespaceURI)
virtual

Return a prefix for the given namespace URI. If one or more prefixes other than the default namespace prefix is mapped to the URI, one of these will be returned. Otherwise, a generated prefix will be automatically mapped to the URI and returned.

Parameters
namespaceURIThe URI for which a prefix is desired
Returns
A prefix corresponding to the specified namespace URI

◆ isDefaultNamespaceURI()

virtual bool com.objsys.xbinder.runtime.XBXmlNamespaceContext.isDefaultNamespaceURI ( string  namespaceURI)
virtual

Returns true if the given namespace is the default namespace (i.e., the default namespace prefix is mapped to the specified namespace URI).

Parameters
namespaceURIThe namespace URI to examine.
Returns
True if the given URI is the default namespace URI.

◆ prefixes()

virtual ICollection<string> com.objsys.xbinder.runtime.XBXmlNamespaceContext.prefixes ( )
virtual

Returns an ICollection of all mapped prefixes

Returns