XBinder C# Runtime Library  2.7
Public Member Functions | List of all members
com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl 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 void popPrefix (System.String prefix)
 Remove a prefix to namespace mapping from the stack. Restore any previous namespace that the prefix mapped to. More...
 
virtual void pushPrefix (System.String namespaceURI, System.String prefix)
 Map the given prefix to the given namespace. More...
 
virtual System.String pushUniquePrefix (System.String namespaceURI, System.String preferredPrefix)
 Push a unique prefix for the given namespace. More...
 
virtual System.String getDefaultNamespaceURI ()
 Return the default namespace (the namespace DefaultNamespacePrefix is mapped to). This may be XBXmlNamespaceContext.NullNamespaceURI. More...
 
virtual System.String getExistingPrefix (System.String namespaceURI)
 Return a non-empty prefix (not XBXmlNamespaceContext.DefaultNamespacePrefix) for the given namespace URI. More...
 
virtual System.String getNamespaceURI (System.String prefix)
 Return the namespace URI that the given prefix is mapped to. Return XBXmlNamespaceContext.NullNamespaceURI if it is not mapped to any URI More...
 
virtual System.String getPrefix (System.String namespaceURI)
 Return a prefix for the given namespace URI. If one or more prefixes other than XBXmlNamespaceContext.DefaultNamespacePrefix 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 (System.String namespaceURI)
 Return true if the given namespace is currently the default namespace (ie, XBXmlNamespaceContext.DefaultNamespacePrefix is mapped to this URI) 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 XBXmlNamespaceContext.DefaultNamespacePrefix. By default, the default namespace is XBXmlNamespaceContext.NullNamespaceURI.

XBXmlNamespaceContext.NullNamespaceURI can only have a single prefix: XBXmlNamespaceContext.DefaultNamespacePrefix.

Member Function Documentation

◆ getDefaultNamespaceURI()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.getDefaultNamespaceURI ( )
virtual

Return the default namespace (the namespace DefaultNamespacePrefix is mapped to). This may be XBXmlNamespaceContext.NullNamespaceURI.

◆ getExistingPrefix()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.getExistingPrefix ( System.String  namespaceURI)
virtual

Return a non-empty prefix (not XBXmlNamespaceContext.DefaultNamespacePrefix) 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
namespaceURI
Returns

◆ getNamespaceURI()

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

Return the namespace URI that the given prefix is mapped to. Return XBXmlNamespaceContext.NullNamespaceURI if it is not mapped to any URI

Parameters
prefix

◆ getPrefix()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.getPrefix ( System.String  namespaceURI)
virtual

Return a prefix for the given namespace URI. If one or more prefixes other than XBXmlNamespaceContext.DefaultNamespacePrefix 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
namespaceURI
Returns

◆ isDefaultNamespaceURI()

virtual bool com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.isDefaultNamespaceURI ( System.String  namespaceURI)
virtual

Return true if the given namespace is currently the default namespace (ie, XBXmlNamespaceContext.DefaultNamespacePrefix is mapped to this URI)

Parameters
namespaceURI
Returns

◆ popPrefix()

virtual void com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.popPrefix ( System.String  prefix)
virtual

Remove a prefix to namespace mapping from the stack. Restore any previous namespace that the prefix mapped to.

It is an error if you attempt to pop a prefix more times than it has been pushed.

◆ pushPrefix()

virtual void com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.pushPrefix ( System.String  namespaceURI,
System.String  prefix 
)
virtual

Map the given prefix to the given namespace.

Parameters
namespaceURIMay not be null. May be empty only if prefix is not empty.
prefixMay not be null. Use empty string for default namespace.

◆ pushUniquePrefix()

virtual System.String com.objsys.xbinder.runtime.XBXmlNamespaceContextImpl.pushUniquePrefix ( System.String  namespaceURI,
System.String  preferredPrefix 
)
virtual

Push a unique prefix for the given namespace.

Parameters
preferredPrefixA prefix that would be preferred, if available.
Returns
the unique prefix that was generated and mapped to the namespace