This class defines the information about an attribute that will come out of the scanner during parsing
This class defines the information about an attribute that will come out of the scanner during parsing. This information does not depend upon the type of validator because it is not tied to any scheme/DTD type info. Its just the raw XML 1.0 information that will be reported about an attribute in the startElement() callback method of the XMLDocumentHandler class. Hence it is not intended to be extended or derived from. Its designed to be used as is. The 'specified' field of this class indicates whether the attribute was actually present or whether it was faulted in because it had a fixed or default value. The code receiving this information can ask its validator for more info about the attribute, i.e. get its declaration from the DTD/Schema info.
XMLAttr( const unsigned int uriId, const XMLCh* const attrName, const XMLCh* const attrPrefix, const XMLCh* const attrValue, const XMLAttDef::AttTypes type = XMLAttDef::CData, const bool specified = true )
attrName - The base name of the attribute, i.e. the part
after any prefix.
attrPrefix - The prefix, if any, of this attribute's name. If
this is empty, then uriID is meaningless as well.
attrValue - The value string of the attribute, which should
be fully normalized by XML rules!
type - The type of the attribute. This will indicate
the type of normalization done and constrains
the value content. Make sure that the value
set meets the constraints!
specified - Indicates whether the attribute was explicitly
specified or not. If not, then it was faulted
in from a FIXED or DEFAULT value.
Getter methods
const XMLCh* getName() const
const XMLCh* getPrefix() const
const XMLCh* getQName() const
bool getSpecified() const
XMLAttDef::AttTypes getType() const
const XMLCh* getValue() const
unsigned int getURIId() const
Setter methods
void set( const unsigned int uriId, const XMLCh* const attrName, const XMLCh* const attrPrefix, const XMLCh* const attrValue, const XMLAttDef::AttTypes type = XMLAttDef::CData )
attrName - The base name of the attribute, i.e. the part
after any prefix.
attrPrefix - The prefix, if any, of this attribute's name. If
this is empty, then uriID is meaningless as well.
attrValue - The value string of the attribute, which should
be fully normalized by XML rules according to the
attribute type.
type - The type of the attribute. This will indicate
the type of normalization done and constrains
the value content. Make sure that the value
set meets the constraints!
specified - Indicates whether the attribute was explicitly
specified or not. If not, then it was faulted
in from a FIXED or DEFAULT value. void setName( const unsigned int uriId, const XMLCh* const attrName, const XMLCh* const attrPrefix )
attrName - The base name of the attribute, i.e. the part
after any prefix.
attrPrefix - The prefix, if any, of this attribute's name. If
this is empty, then uriID is meaningless as well. void setSpecified(const bool newValue)
void setType(const XMLAttDef::AttTypes newType)
void setValue(const XMLCh* const newValue)
void setURIId(const unsigned int uriId)
alphabetic index hierarchy of classes
Xerces-C XML Parser for C++ Version 1.1 |
|
generated by doc++