This abstract class provides the interface for all validators
![]() | addOrFindNSId ( const XMLCh* const uriText ) The derived class should look for the passed URI (case sensitive) in its URI pool |
![]() | checkContent ( const unsigned int elemId, const unsigned int* childIds, const unsigned int childCount ) The derived class should look up its declaration of the passed element from its element pool |
![]() | checkRootElement ( const unsigned int elemId ) For those validators that contrain the possible root elements of a document to only particular elements, they should use this call to validate that the passed root element id is a legal root element |
![]() | emitError (const XML4CValid::Codes toEmit) This call is a convenience by which validators can emit errors |
![]() | faultInAttr ( XMLAttr& toFill, const XMLAttDef& attDef ) const The derived class should fault in the passed XMLAttr value |
![]() | findElemDecl ( const unsigned int uriId, const XMLCh* const baseName, const XMLCh* const qName, const LookupOpts options, bool& wasAdded ) const The derived class should look up an element in its element declaration pool and return a pointer to it |
![]() | findElemId ( const unsigned int uriId, const XMLCh* const baseName, const XMLCh* const qName ) const The derived class should find the indicate element in its element declaration pool |
![]() | findEntityDecl ( const XMLCh* const entName, const bool isPE ) This method is identical to the previous one, except that it is non- const |
![]() | findEntityDecl ( const XMLCh* const entName, const bool isPE ) const The derived class should look the passed entity declaration name in its entity pool and return a pointer to the declaration object |
![]() | findNotationDecl ( const XMLCh* const notName ) const The derived class should look up the passed notation name in its notation decl pool |
![]() | findNotationDecl ( const XMLCh* const notName ) This method is identical to the previous method except that it is non- const |
![]() | findNSId ( const XMLCh* const nsName ) const The derived class should look up the passed namespace name (prefix) in its namespace name pool and return the id |
![]() | getElemDecl ( const unsigned int elemId ) This method is identical to the previous method, except that it is a non-const version |
![]() | getElemDecl ( const unsigned int elemId ) const The derived class should return the element from its element decl pool which has the indicated element id |
![]() | getEmptyNamespaceId () const When an attribute name has no prefix, unlike elements, it is not mapped to the global namespace |
![]() | getGlobalNamespaceId () const When namespaces are enabled, any elements whose names have no prefix are mapped to a global namespace |
![]() | getUnknownNamespaceId () const When a prefix is found that has not been mapped, an error is issued |
![]() | getURIText ( const unsigned int uriId, XMLBuffer& uriBufToFill ) const The derived class should find the passed URI id in its URI pool and copy the text of that URI into the passed buffer |
![]() | getXMLNamespaceId () const The prefix 'xml' is a magic prefix, defined by the XML spec and requiring no prior definition |
![]() | getXMLNSNamespaceId () const The prefix 'xmlns' is a magic prefix, defined by the namespace spec and requiring no prior definition |
![]() | handlesDTD () const This method allows the scanner to ask the validator if it handles DTDs or not |
![]() | postParseValidation () This method is called by the scanner after the parse has completed |
![]() | requiresNamespaces () const The derived class should return a boolean that indicates whether it requires namespace processing or not |
![]() | reset () This method is called by the scanner before a new document is about to start |
![]() | scanDTD (const bool reuseValidator) This method is called by the scanner when it is time for the validator to parse the DTD |
![]() | setErrorReporter ( XMLErrorReporter* const errorReporter ) This method is called to set an error reporter on the validator via which it will report any errors it sees during parsing or validation |
![]() | setScannerInfo ( XMLScanner* const owningScanner, ReaderMgr* const readerMgr, XMLBufferMgr* const bufMgr ) |
![]() | validateAttrValue ( const XMLAttDef& attDef, const XMLCh* const attrValue ) The derived class should apply any rules to the passed attribute value that are above and beyond those defined by XML 1 |
This abstract class provides the interface for all validators. This is the simple amount of API that all validators must honor, in order for the scanner to use them to do validation. All validators will actually contain much more functionality than is accessible via this common API, but that functionality requires that you know what type of validator you are dealing with. Basically, at this level, the primary concern is to be able to query core information about elements and attributes. Adding decls to the validator requires that you go through the derived interface because they all have their own decl types. At this level, we can return information via the base decl classes, from which each validator derives its own decl classes.
unsigned int getEmptyNamespaceId() const
unsigned int getGlobalNamespaceId() const
unsigned int getUnknownNamespaceId() const
unsigned int getXMLNamespaceId() const
unsigned int getXMLNSNamespaceId() const
Setter methods
void setScannerInfo( XMLScanner* const owningScanner, ReaderMgr* const readerMgr, XMLBufferMgr* const bufMgr )
readerMgr - This is a pointer to the reader manager that is
being used by the scanner.
bufMgr - This is the buffer manager of the scanner. This
is provided as a convenience so that the validator
doesn't have to create its own buffer manager
during the parse process. void setErrorReporter( XMLErrorReporter* const errorReporter )
Virtual validator interface
virtual int addOrFindNSId( const XMLCh* const uriText )
virtual int checkContent( const unsigned int elemId, const unsigned int* childIds, const unsigned int childCount )
childIds - An array of element ids which represent the elements
found within the parent element, i.e. the content
to be validated.
childCount - The number of elements in the childIds array. It can
be zero if the element had none. virtual bool checkRootElement( const unsigned int elemId )
virtual void faultInAttr( XMLAttr& toFill, const XMLAttDef& attDef ) const
virtual const XMLElementDecl* findElemDecl( const unsigned int uriId, const XMLCh* const baseName, const XMLCh* const qName, const LookupOpts options, bool& wasAdded ) const
virtual const XMLEntityDecl* findEntityDecl( const XMLCh* const entName, const bool isPE ) const
isPE - Indicates whether the name represents a parameter
entity or a general entity. The validator should
look at the correct pool for the entity type. virtual XMLEntityDecl* findEntityDecl( const XMLCh* const entName, const bool isPE )
isPE - Indicates whether the name represents a parameter
entity or a general entity. The validator should
look at the correct pool for the entity type. virtual unsigned int findElemId( const unsigned int uriId, const XMLCh* const baseName, const XMLCh* const qName ) const
virtual const XMLNotationDecl* findNotationDecl( const XMLCh* const notName ) const
virtual XMLNotationDecl* findNotationDecl( const XMLCh* const notName )
virtual unsigned int findNSId( const XMLCh* const nsName ) const
virtual const XMLElementDecl* getElemDecl( const unsigned int elemId ) const
virtual XMLElementDecl* getElemDecl( const unsigned int elemId )
virtual bool getURIText( const unsigned int uriId, XMLBuffer& uriBufToFill ) const
virtual void postParseValidation()
virtual void reset()
virtual bool requiresNamespaces() const
virtual void validateAttrValue( const XMLAttDef& attDef, const XMLCh* const attrValue )
Virtual DTD handler interface
virtual bool handlesDTD() const
virtual void scanDTD(const bool reuseValidator)
Error emittor methods
void emitError(const XML4CValid::Codes toEmit)
textX - Up to four replacement parameters. They can be provided
as either XMLCh strings, or local code page strings which
will be transcoded internally.
alphabetic index hierarchy of classes
Xerces-C XML Parser for C++ Version 1.1 |
|
generated by doc++