⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sax2xmlfilterimpl.hpp

📁 经典开源游戏glest的源代码
💻 HPP
📖 第 1 页 / 共 4 页
字号:
      *         DTDGrammar). That grammar object is owned by the parser.      *      * @exception SAXException Any SAX exception, possibly      *            wrapping another exception.      * @exception XMLException An exception from the parser or client      *            handler code.      * @exception DOMException A DOM exception as per DOM spec.      *      * @see InputSource#InputSource      */    virtual Grammar* loadGrammar(const InputSource& source,                                 const short grammarType,                                 const bool toCache = false);    /**      * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL      *      * This method invokes the preparsing process on a schema grammar XML      * file specified by the file path parameter. If the 'toCache' flag      * is enabled, the parser will cache the grammars for re-use. If a grammar      * key is found in the pool, no caching of any grammar will take place.      *      * <p><b>"Experimental - subject to change"</b></p>      *      * @param systemId A const XMLCh pointer to the Unicode string which      *                 contains the path to the XML grammar file to be      *                 preparsed.      * @param grammarType The grammar type (Schema or DTD).      * @param toCache If <code>true</code>, we cache the preparsed grammar,      *                otherwise, no chaching. Default is <code>false</code>.      * @return The preparsed schema grammar object (SchemaGrammar or      *         DTDGrammar). That grammar object is owned by the parser.      *      * @exception SAXException Any SAX exception, possibly      *            wrapping another exception.      * @exception XMLException An exception from the parser or client      *            handler code.      * @exception DOMException A DOM exception as per DOM spec.      */    virtual Grammar* loadGrammar(const XMLCh* const systemId,                                 const short grammarType,                                 const bool toCache = false);    /**      * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL      *      * This method invokes the preparsing process on a schema grammar XML      * file specified by the file path parameter. If the 'toCache' flag      * is enabled, the parser will cache the grammars for re-use. If a grammar      * key is found in the pool, no caching of any grammar will take place.      *      * <p><b>"Experimental - subject to change"</b></p>      *      * @param systemId A const char pointer to a native string which contains      *                 the path to the XML grammar file to be preparsed.      * @param grammarType The grammar type (Schema or DTD).      * @param toCache If <code>true</code>, we cache the preparsed grammar,      *                otherwise, no chaching. Default is <code>false</code>.      * @return The preparsed schema grammar object (SchemaGrammar or      *         DTDGrammar). That grammar object is owned by the parser.      *      * @exception SAXException Any SAX exception, possibly      *            wrapping another exception.      * @exception XMLException An exception from the parser or client      *            handler code.      * @exception DOMException A DOM exception as per DOM spec.      */    virtual Grammar* loadGrammar(const char* const systemId,                                 const short grammarType,                                 const bool toCache = false);    /**      * Clear the cached grammar pool      */    virtual void resetCachedGrammarPool();    /** Set maximum input buffer size      *      * This method allows users to limit the size of buffers used in parsing      * XML character data. The effect of setting this size is to limit the      * size of a ContentHandler::characters() call.      *      * The parser's default input buffer size is 1 megabyte.      *      * @param bufferSize The maximum input buffer size      */    void setInputBufferSize(const size_t bufferSize);    //@}    // -----------------------------------------------------------------------    //  Advanced document handler list maintenance methods    // -----------------------------------------------------------------------    /** @name Advanced document handler list maintenance methods */    //@{    /**      * This method installs the specified 'advanced' document callback      * handler, thereby allowing the user to customize the processing,      * if they choose to do so. Any number of advanced callback handlers      * maybe installed.      *      * <p>The methods in the advanced callback interface represent      * Xerces-C extensions. There is no specification for this interface.</p>      *      * @param toInstall A pointer to the users advanced callback handler.      *      * @see #removeAdvDocHandler      */    virtual void installAdvDocHandler(XMLDocumentHandler* const toInstall) ;    /**      * This method removes the 'advanced' document handler callback from      * the underlying parser scanner. If no handler is installed, advanced      * callbacks are not invoked by the scanner.      * @param toRemove A pointer to the advanced callback handler which      *                 should be removed.      *      * @see #installAdvDocHandler      */    virtual bool removeAdvDocHandler(XMLDocumentHandler* const toRemove) ;    //@}    // -----------------------------------------------------------------------    //  The XMLFilter interface    // -----------------------------------------------------------------------    /** @name Implementation of SAX 2.0 XMLFilter interface's. */    //@{    /**      * This method returns the parent XMLReader object.      *      * @return A pointer to the parent XMLReader object.      */    virtual SAX2XMLReader* getParent() const;    /**      * Sets the parent XMLReader object; parse requests will be forwarded to this      * object, and callback notifications coming from it will be postprocessed      *      * @param parent The new XMLReader parent.      * @see SAX2XMLReader#SAX2XMLReader      */    virtual void setParent(SAX2XMLReader* parent);    //@}    // -----------------------------------------------------------------------    //  Implementation of the EntityResolver interface    // -----------------------------------------------------------------------    /** @name The EntityResolver interface */    //@{  /**    * Allow the application to resolve external entities.    *    * <p>The Parser will call this method before opening any external    * entity except the top-level document entity (including the    * external DTD subset, external entities referenced within the    * DTD, and external entities referenced within the document    * element): the application may request that the parser resolve    * the entity itself, that it use an alternative URI, or that it    * use an entirely different input source.</p>    *    * <p>Application writers can use this method to redirect external    * system identifiers to secure and/or local URIs, to look up    * public identifiers in a catalogue, or to read an entity from a    * database or other input source (including, for example, a dialog    * box).</p>    *    * <p>If the system identifier is a URL, the SAX parser must    * resolve it fully before reporting it to the application.</p>    *    * @param publicId The public identifier of the external entity    *        being referenced, or null if none was supplied.    * @param systemId The system identifier of the external entity    *        being referenced.    * @return An InputSource object describing the new input source,    *         or null to request that the parser open a regular    *         URI connection to the system identifier.    *         The returned InputSource is owned by the parser which is    *         responsible to clean up the memory.    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    * @exception IOException An IO exception,    *            possibly the result of creating a new InputStream    *            or Reader for the InputSource.    * @see InputSource#InputSource    */    virtual InputSource* resolveEntity    (        const   XMLCh* const    publicId        , const XMLCh* const    systemId    );    //@}    // -----------------------------------------------------------------------    //  Implementation of the DTDHandler interface    // -----------------------------------------------------------------------    /** @name The DTD handler interface */    //@{  /**    * Receive notification of a notation declaration event.    *    * <p>It is up to the application to record the notation for later    * reference, if necessary.</p>    *    * <p>If a system identifier is present, and it is a URL, the SAX    * parser must resolve it fully before passing it to the    * application.</p>    *    * @param name The notation name.    * @param publicId The notation's public identifier, or null if    *        none was given.    * @param systemId The notation's system identifier, or null if    *        none was given.    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    * @see #unparsedEntityDecl    * @see AttributeList#AttributeList    */	virtual void notationDecl    (        const   XMLCh* const    name        , const XMLCh* const    publicId        , const XMLCh* const    systemId    );  /**    * Receive notification of an unparsed entity declaration event.    *    * <p>Note that the notation name corresponds to a notation    * reported by the notationDecl() event.  It is up to the    * application to record the entity for later reference, if    * necessary.</p>    *    * <p>If the system identifier is a URL, the parser must resolve it    * fully before passing it to the application.</p>    *    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    * @param name The unparsed entity's name.    * @param publicId The entity's public identifier, or null if none    *        was given.    * @param systemId The entity's system identifier (it must always    *        have one).    * @param notationName The name of the associated notation.    * @see #notationDecl    * @see AttributeList#AttributeList    */    virtual void unparsedEntityDecl    (        const   XMLCh* const    name        , const XMLCh* const    publicId        , const XMLCh* const    systemId        , const XMLCh* const    notationName    );    /**    * Reset the DocType object on its reuse    *    * <p>This method helps in reseting the DTD object implementational    * defaults each time the DTD is begun.</p>    *    */    virtual void resetDocType();    //@}    // -----------------------------------------------------------------------    //  Implementation of the ContentHandler interface    // -----------------------------------------------------------------------    /** @name The virtual document handler interface */    //@{   /**    * Receive notification of character data.    *    * <p>The Parser will call this method to report each chunk of    * character data.  SAX parsers may return all contiguous character    * data in a single chunk, or they may split it into several    * chunks; however, all of the characters in any single event    * must come from the same external entity, so that the Locator    * provides useful information.</p>    *    * <p>The application must not attempt to read from the array    * outside of the specified range.</p>    *    * <p>Note that some parsers will report whitespace using the    * ignorableWhitespace() method rather than this one (validating    * parsers must do so).</p>    *    * @param chars The characters from the XML document.    * @param length The number of characters to read from the array.    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    * @see #ignorableWhitespace    * @see Locator#Locator    */    virtual void characters    (        const   XMLCh* const    chars        , const unsigned int    length    );  /**    * Receive notification of the end of a document.    *    * <p>The SAX parser will invoke this method only once, and it will    * be the last method invoked during the parse.  The parser shall    * not invoke this method until it has either abandoned parsing    * (because of an unrecoverable error) or reached the end of    * input.</p>    *    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    */    virtual void endDocument ();  /**    * Receive notification of the end of an element.    *    * <p>The SAX parser will invoke this method at the end of every    * element in the XML document; there will be a corresponding    * startElement() event for every endElement() event (even when the    * element is empty).</p>    *    * @param uri The URI of the asscioated namespace for this element	* @param localname The local part of the element name	* @param qname The QName of this element    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.    */    virtual void endElement	(		const XMLCh* const uri,		const XMLCh* const localname,		const XMLCh* const qname	);  /**    * Receive notification of ignorable whitespace in element content.    *    * <p>Validating Parsers must use this method to report each chunk    * of ignorable whitespace (see the W3C XML 1.0 recommendation,    * section 2.10): non-validating parsers may also use this method    * if they are capable of parsing and using content models.</p>    *    * <p>SAX parsers may return all contiguous whitespace in a single    * chunk, or they may split it into several chunks; however, all of    * the characters in any single event must come from the same    * external entity, so that the Locator provides useful    * information.</p>    *    * <p>The application must not attempt to read from the array    * outside of the specified range.</p>    *    * @param chars The characters from the XML document.    * @param length The number of characters to read from the array.    * @exception SAXException Any SAX exception, possibly    *            wrapping another exception.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -