📄 sax2xmlreaderimpl.hpp
字号:
* about the element whose attribute definition was just * parsed. * @param attDef A const reference to the object containing information * attribute definition. * @param ignore The flag indicating whether this attribute definition * was ignored by the parser or not. */ virtual void attDef ( const DTDElementDecl& elemDecl , const DTDAttDef& attDef , const bool ignoring ); /** * This method is used to report a comment occurring within the DTD. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param comment A const pointer to a Unicode string representing the * text of the comment just parsed. */ virtual void doctypeComment ( const XMLCh* const comment ); /** * This method is used to report the DOCTYPE declaration. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param elemDecl A const reference to the object containing information * about the root element definition declaration of the * XML document being parsed. * @param publicId A const pointer to a Unicode string representing the * public id of the DTD file. * @param systemId A const pointer to a Unicode string representing the * system id of the DTD file. * @param hasIntSubset A flag indicating if this XML file contains any * internal subset. * @param hasExtSubset A flag indicating if this XML file contains any * external subset. Default is false. */ virtual void doctypeDecl ( const DTDElementDecl& elemDecl , const XMLCh* const publicId , const XMLCh* const systemId , const bool hasIntSubset , const bool hasExtSubset = false ); /** * This method is used to report any PI declarations * occurring inside the DTD definition block. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param target A const pointer to a Unicode string representing the * target of the PI declaration. * @param data A const pointer to a Unicode string representing the * data of the PI declaration. See the PI production rule * in the XML specification for details. */ virtual void doctypePI ( const XMLCh* const target , const XMLCh* const data ); /** * This method is used to report any whitespaces * occurring inside the DTD definition block. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param chars A const pointer to a Unicode string representing the * whitespace characters. * @param length The length of the whitespace Unicode string. */ virtual void doctypeWhitespace ( const XMLCh* const chars , const unsigned int length ); /** * This method is used to report an element declarations * successfully scanned by the parser. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param decl A const reference to the object containing element * declaration information. * @param isIgnored The flag indicating whether this definition was * ignored by the parser or not. */ virtual void elementDecl ( const DTDElementDecl& decl , const bool isIgnored ); /** * This method is used to report the end of an attribute * list declaration for an element. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param elemDecl A const reference to the object containing element * declaration information. */ virtual void endAttList ( const DTDElementDecl& elemDecl ); /** * This method is used to report the end of the internal subset. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> */ virtual void endIntSubset(); /** * This method is used to report the end of the external subset. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> */ virtual void endExtSubset(); /** * This method is used to report any entity declarations. * For unparsed entities, this driver will invoke the * SAX DTDHandler::unparsedEntityDecl callback. * * @param entityDecl A const reference to the object containing * the entity declaration information. * @param isPEDecl The flag indicating whether this was a * parameter entity declaration or not. * @param isIgnored The flag indicating whether this definition * was ignored by the parser or not. * * @see DTDHandler#unparsedEntityDecl */ virtual void entityDecl ( const DTDEntityDecl& entityDecl , const bool isPEDecl , const bool isIgnored ); /** * This method allows the user installed DTD handler to * reset itself. */ virtual void resetDocType(); /** * This method is used to report any notation declarations. * If there is a user installed DTDHandler, then the driver will * invoke the SAX DTDHandler::notationDecl callback. * * @param notDecl A const reference to the object containing the notation * declaration information. * @param isIgnored The flag indicating whether this definition was ignored * by the parser or not. * * @see DTDHandler#notationDecl */ virtual void notationDecl ( const XMLNotationDecl& notDecl , const bool isIgnored ); /** * This method is used to indicate the start of an element's attribute * list declaration. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param elemDecl A const reference to the object containing element * declaration information. */ virtual void startAttList ( const DTDElementDecl& elemDecl ); /** * This method is used indicate the start of the internal subset. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> */ virtual void startIntSubset(); /** * This method is used indicate the start of the external subset. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> */ virtual void startExtSubset(); /** * This method is used to report the TextDecl. Refer to the XML * specification for the syntax of a TextDecl. * * <b><font color="#FF0000">This method is a no-op for this SAX driver * implementation.</font></b> * * @param versionStr A const pointer to a Unicode string representing * the version number of the 'version' clause. * @param encodingStr A const pointer to a Unicode string representing * the encoding name of the 'encoding' clause. */ virtual void TextDecl ( const XMLCh* const versionStr , const XMLCh* const encodingStr ); //@}private : // ----------------------------------------------------------------------- // Unimplemented constructors and operators // ----------------------------------------------------------------------- SAX2XMLReaderImpl(const SAX2XMLReaderImpl&); SAX2XMLReaderImpl& operator=(const SAX2XMLReaderImpl&); // ----------------------------------------------------------------------- // Initialize/Cleanup methods // ----------------------------------------------------------------------- void initialize(); void cleanUp(); void resetInProgress(); // ----------------------------------------------------------------------- // Private data members // // fAttrList // A temporary implementation of the basic SAX2 Attributes // interface. We use this one over and over on each startElement // event to allow SAX-like access to the element attributes. // // fDocHandler // The installed SAX content handler, if any. Null if none. // // fnamespacePrefix // Indicates whether the namespace-prefix feature is on or off. // // fautoValidation // Indicates whether automatic validation is on or off // // fValidation // Indicates whether the 'validation' core features is on or off // // fReuseGrammar // Tells the parser whether it should reuse the grammar or not. // If true, there cannot be any internal subset. // // fPrefixesStorage // the namespace prefixes will be allocated from this pool // // fPrefixes // A Stack of the current namespace prefixes that need calls to // endPrefixMapping // // fPrefixCounts // A Stack of the number of prefixes that need endPrefixMapping // calls for that element // // fDTDHandler // The installed SAX DTD handler, if any. Null if none. // // fElemDepth // This is used to track the element nesting depth, so that we can // know when we are inside content. This is so we can ignore char // data outside of content. // // fEntityResolver // The installed SAX entity handler, if any. Null if none. // // fErrorHandler // The installed SAX error handler, if any. Null if none. // // fLexicalHandler // The installed SAX lexical handler, if any. Null if none. // // fDecllHandler // The installed SAX declaration handler, if any. Null if none. // // fAdvDHCount // fAdvDHList // fAdvDHListSize // This is an array of pointers to XMLDocumentHandlers, which is // how we see installed advanced document handlers. There will // usually not be very many at all, so a simple array is used // instead of a collection, for performance. It will grow if needed, // but that is unlikely. // // The count is how many handlers are currently installed. The size // is how big the array itself is (for expansion purposes.) When // count == size, is time to expand. // // fParseInProgress // This flag is set once a parse starts. It is used to prevent // multiple entrance or reentrance of the parser. // // fScanner // The scanner being used by this parser. It is created internally // during construction. // // fHasExternalSubset // Indicate if the document has external DTD subset. // // fGrammarPool // The grammar pool passed from external application (through derivatives). //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -