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

Common base class for XBAttribute and XBAttributeQName. More...

Inheritance diagram for com.objsys.xbinder.runtime.XBAttributeBase:
com.objsys.xbinder.runtime.XBAttribute com.objsys.xbinder.runtime.XBAttributeQName

Public Member Functions

 XBAttributeBase (System.String name, System.String nsUri, System.String prefix)
 
virtual void assignNamespacePrefixes (XBNamespaceResolver resolver)
 Assign the attribute's namespace a prefix to use during encoding. Also, assign a prefix to any ns's embedded in the value, such as for values of type xsd:QName. More...
 
virtual bool requireEmptyDefaultNs ()
 Returns true if this attribute requires an empty default namespace. Normal attributes return false. Attributes with QName for their value may return true, as the QName's resolution takes into consideration the default namespace. More...
 

Static Public Member Functions

static void printAttributes (IList< XBAttributeBase > attrs, TextWriter writer, string varName, int level)
 Print a list of attributes to the given TextWriter More...
 

Properties

virtual System.String Name [get, set]
 
abstract System.String Value [get, set]
 
virtual System.String NsUri [get, set]
 
virtual System.String Prefix [get, set]
 

Detailed Description

Common base class for XBAttribute and XBAttributeQName.

Importantly, the base class defines assignNamespacePrefixes, which allows for assigning a prefix to embedded namespaces during encoding, especially important to XBAttributeQName.

Member Function Documentation

◆ assignNamespacePrefixes()

virtual void com.objsys.xbinder.runtime.XBAttributeBase.assignNamespacePrefixes ( XBNamespaceResolver  resolver)
virtual

Assign the attribute's namespace a prefix to use during encoding. Also, assign a prefix to any ns's embedded in the value, such as for values of type xsd:QName.

The implementation in this class simply assigns a prefix for the attribute's ns, using the current prefix as the suggested value.

Parameters
resolver

Reimplemented in com.objsys.xbinder.runtime.XBAttributeQName.

◆ printAttributes()

static void com.objsys.xbinder.runtime.XBAttributeBase.printAttributes ( IList< XBAttributeBase attrs,
TextWriter  writer,
string  varName,
int  level 
)
static

Print a list of attributes to the given TextWriter

Parameters
attrsThe attributes to be printed
writerThe text writer to use
varNameName of variable holding the list (shown in output)
levelControls the level of indentation

◆ requireEmptyDefaultNs()

virtual bool com.objsys.xbinder.runtime.XBAttributeBase.requireEmptyDefaultNs ( )
virtual

Returns true if this attribute requires an empty default namespace. Normal attributes return false. Attributes with QName for their value may return true, as the QName's resolution takes into consideration the default namespace.

Returns

Reimplemented in com.objsys.xbinder.runtime.XBAttributeQName.