source: icXML/icXML-devel/src/xercesc/parsers/SAX2XMLFilterImpl.hpp @ 2736

Last change on this file since 2736 was 2722, checked in by cameron, 7 years ago

Original Xerces files with import mods for icxercesc

File size: 54.1 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: SAX2XMLFilterImpl.hpp 932887 2010-04-11 13:04:59Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_SAX2XMLFILTERIMPL_HPP)
23#define XERCESC_INCLUDE_GUARD_SAX2XMLFILTERIMPL_HPP
24
25#include <xercesc/sax2/SAX2XMLFilter.hpp>
26#include <xercesc/sax/EntityResolver.hpp>
27#include <xercesc/sax/DTDHandler.hpp>
28#include <xercesc/sax2/ContentHandler.hpp>
29#include <xercesc/sax/ErrorHandler.hpp>
30
31XERCES_CPP_NAMESPACE_BEGIN
32
33/**
34  * This class implements the SAX2 'XMLFilterImpl' interface and should be
35  * used by applications as the base class for their SAX2 filters.
36  * This implementation simply forwards every call to the parent object.
37  *
38  */
39
40class PARSERS_EXPORT SAX2XMLFilterImpl :
41    public SAX2XMLFilter
42    , public EntityResolver
43    , public DTDHandler
44    , public ContentHandler
45    , public ErrorHandler
46{
47public :
48    // -----------------------------------------------------------------------
49    //  Constructors and Destructor
50    // -----------------------------------------------------------------------
51    /** @name Constructors and Destructor */
52    //@{
53    /** The default constructor */
54        SAX2XMLFilterImpl(SAX2XMLReader* parent);
55
56    /** The destructor */
57        ~SAX2XMLFilterImpl() ;
58   //@}
59
60    //-----------------------------------------------------------------------
61    // Implementation of SAX2XMLReader Interface
62    //-----------------------------------------------------------------------
63    //-----------------------------------------------------------------------
64    // The XMLReader interface
65    //-----------------------------------------------------------------------
66    /** @name Implementation of SAX 2.0 XMLReader interface's. */
67    //@{
68
69    /**
70      * This method returns the installed content handler.
71      *
72      * @return A pointer to the installed content handler object.
73      */
74    virtual ContentHandler* getContentHandler() const ;
75
76    /**
77      * This method returns the installed DTD handler.
78      *
79      * @return A pointer to the installed DTD handler object.
80      */
81    virtual DTDHandler* getDTDHandler() const ;
82
83    /**
84      * This method returns the installed entity resolver.
85      *
86      * @return A pointer to the installed entity resolver object.
87      */
88    virtual EntityResolver* getEntityResolver() const ;
89
90    /**
91      * This method returns the installed error handler.
92      *
93      * @return A pointer to the installed error handler object.
94      */
95    virtual ErrorHandler* getErrorHandler() const ;
96
97        /**
98     * Query the current state of any feature in a SAX2 XMLReader.
99          *
100          * @param name The unique identifier (URI) of the feature being set.
101          * @return The current state of the feature.
102     * @exception SAXNotRecognizedException If the requested feature is not known.
103          */
104        virtual bool getFeature(const XMLCh* const name) const ;
105
106        /**
107     * Query the current value of a property in a SAX2 XMLReader.
108     *
109     * The parser owns the returned pointer.  The memory allocated for
110     * the returned pointer will be destroyed when the parser is deleted.
111     *
112     * To ensure accessibility of the returned information after the parser
113     * is deleted, callers need to copy and store the returned information
114     * somewhere else; otherwise you may get unexpected result.  Since the returned
115     * pointer is a generic void pointer, see the SAX2 Programming Guide to learn
116     * exactly what type of property value each property returns for replication.
117     *
118     * @param name The unique identifier (URI) of the property being set.
119     * @return     The current value of the property.  The pointer spans the same
120     *             life-time as the parser.  A null pointer is returned if nothing
121     *             was specified externally.
122     * @exception  SAXNotRecognizedException If the requested property is not known.
123     */
124        virtual void* getProperty(const XMLCh* const name) const ;
125
126  /**
127    * Allow an application to register a document event handler.
128    *
129    * If the application does not register a document handler, all
130    * document events reported by the SAX parser will be silently
131    * ignored (this is the default behaviour implemented by
132    * HandlerBase).
133    *
134    * Applications may register a new or different handler in the
135    * middle of a parse, and the SAX parser must begin using the new
136    * handler immediately.
137    *
138    * @param handler The document handler.
139    * @see DocumentHandler#DocumentHandler
140    * @see HandlerBase#HandlerBase
141    */
142    virtual void setContentHandler(ContentHandler* const handler) ;
143
144  /**
145    * Allow an application to register a DTD event handler.
146    *
147    * If the application does not register a DTD handler, all DTD
148    * events reported by the SAX parser will be silently ignored (this
149    * is the default behaviour implemented by HandlerBase).
150    *
151    * Applications may register a new or different handler in the middle
152    * of a parse, and the SAX parser must begin using the new handler
153    * immediately.
154    *
155    * @param handler The DTD handler.
156    * @see DTDHandler#DTDHandler
157    * @see HandlerBase#HandlerBase
158    */
159    virtual void setDTDHandler(DTDHandler* const handler) ;
160
161  /**
162    * Allow an application to register a custom entity resolver.
163    *
164    * If the application does not register an entity resolver, the
165    * SAX parser will resolve system identifiers and open connections
166    * to entities itself (this is the default behaviour implemented in
167    * DefaultHandler).
168    *
169    * Applications may register a new or different entity resolver
170    * in the middle of a parse, and the SAX parser must begin using
171    * the new resolver immediately.
172    *
173    * @param resolver The object for resolving entities.
174    * @see EntityResolver#EntityResolver
175    * @see DefaultHandler#DefaultHandler
176    */
177    virtual void setEntityResolver(EntityResolver* const resolver) ;
178
179  /**
180    * Allow an application to register an error event handler.
181    *
182    * If the application does not register an error event handler,
183    * all error events reported by the SAX parser will be silently
184    * ignored, except for fatalError, which will throw a SAXException
185    * (this is the default behaviour implemented by HandlerBase).
186    *
187    * Applications may register a new or different handler in the
188    * middle of a parse, and the SAX parser must begin using the new
189    * handler immediately.
190    *
191    * @param handler The error handler.
192    * @see ErrorHandler#ErrorHandler
193    * @see SAXException#SAXException
194    * @see HandlerBase#HandlerBase
195    */
196    virtual void setErrorHandler(ErrorHandler* const handler) ;
197
198  /**
199    * Set the state of any feature in a SAX2 XMLReader.
200    * Supported features in SAX2 for xerces-c are:
201    * <br>(See the SAX2 Programming Guide for detail description).
202    *
203    * <br>http://xml.org/sax/features/validation (default: true)
204    * <br>http://xml.org/sax/features/namespaces (default: true)
205    * <br>http://xml.org/sax/features/namespace-prefixes (default: false)
206    * <br>http://apache.org/xml/features/validation/dynamic (default: false)
207    * <br>http://apache.org/xml/features/validation/reuse-grammar (default: false)
208    * <br>http://apache.org/xml/features/validation/schema (default: true)
209    * <br>http://apache.org/xml/features/validation/schema-full-checking (default: false)
210    * <br>http://apache.org/xml/features/validating/load-schema (default: true)
211    * <br>http://apache.org/xml/features/nonvalidating/load-external-dtd (default: true)
212    * <br>http://apache.org/xml/features/continue-after-fatal-error (default: false)
213    * <br>http://apache.org/xml/features/validation-error-as-fatal (default: false)
214    *
215    * @param name The unique identifier (URI) of the feature.
216    * @param value The requested state of the feature (true or false).
217    * @exception SAXNotRecognizedException If the requested feature is not known.
218    * @exception SAXNotSupportedException Feature modification is not supported during parse
219    *
220    */
221        virtual void setFeature(const XMLCh* const name, const bool value) ;
222
223  /**
224    * Set the value of any property in a SAX2 XMLReader.
225    * Supported properties in SAX2 for xerces-c are:
226    * <br>(See the SAX2 Programming Guide for detail description).
227    *
228    * <br>http://apache.org/xml/properties/schema/external-schemaLocation
229    * <br>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation.
230    *
231    * It takes a void pointer as the property value.  Application is required to initialize this void
232    * pointer to a correct type.  See the SAX2 Programming Guide
233    * to learn exactly what type of property value each property expects for processing.
234    * Passing a void pointer that was initialized with a wrong type will lead to unexpected result.
235    * If the same property is set more than once, the last one takes effect.
236    *
237    * @param name The unique identifier (URI) of the property being set.
238    * @param value The requested value for the property.  See
239    *            the SAX2 Programming Guide to learn
240    *            exactly what type of property value each property expects for processing.
241    *            Passing a void pointer that was initialized with a wrong type will lead
242    *            to unexpected result.
243    * @exception SAXNotRecognizedException If the requested property is not known.
244    * @exception SAXNotSupportedException Property modification is not supported during parse
245    */
246        virtual void setProperty(const XMLCh* const name, void* value) ;
247
248  /**
249    * Parse an XML document.
250    *
251    * The application can use this method to instruct the SAX parser
252    * to begin parsing an XML document from any valid input
253    * source (a character stream, a byte stream, or a URI).
254    *
255    * Applications may not invoke this method while a parse is in
256    * progress (they should create a new Parser instead for each
257    * additional XML document).  Once a parse is complete, an
258    * application may reuse the same Parser object, possibly with a
259    * different input source.
260    *
261    * @param source The input source for the top-level of the
262    *               XML document.
263    * @exception SAXException Any SAX exception, possibly
264    *            wrapping another exception.
265    * @exception XMLException An exception from the parser or client
266    *            handler code.
267    * @see InputSource#InputSource
268    * @see #setEntityResolver
269    * @see #setDTDHandler
270    * @see #setDocumentHandler
271    * @see #setErrorHandler
272    */
273    virtual void parse
274    (
275        const   InputSource&    source
276    ) ;
277
278  /**
279    * Parse an XML document from a system identifier (URI).
280    *
281    * This method is a shortcut for the common case of reading a
282    * document from a system identifier.  It is the exact equivalent
283    * of the following:
284    *
285    * parse(new URLInputSource(systemId));
286    *
287    * If the system identifier is a URL, it must be fully resolved
288    * by the application before it is passed to the parser.
289    *
290    * @param systemId The system identifier (URI).
291    * @exception SAXException Any SAX exception, possibly
292    *            wrapping another exception.
293    * @exception XMLException An exception from the parser or client
294    *            handler code.
295    * @see #parse(InputSource)
296    */
297    virtual void parse
298    (
299        const   XMLCh* const    systemId
300    ) ;
301
302  /**
303    * Parse an XML document from a system identifier (URI).
304    *
305    * This method is a shortcut for the common case of reading a
306    * document from a system identifier.  It is the exact equivalent
307    * of the following:
308    *
309    * parse(new URLInputSource(systemId));
310    *
311    * If the system identifier is a URL, it must be fully resolved
312    * by the application before it is passed to the parser.
313    *
314    * @param systemId The system identifier (URI).
315    * @exception SAXException Any SAX exception, possibly
316    *            wrapping another exception.
317    * @exception XMLException An exception from the parser or client
318    *            handler code.
319    * @see #parse(InputSource)
320    */
321    virtual void parse
322    (
323        const   char* const     systemId
324    ) ;
325
326    //@}
327
328    // -----------------------------------------------------------------------
329    //  SAX 2.0-ext
330    // -----------------------------------------------------------------------
331    /** @name SAX 2.0-ext */
332    //@{
333    /**
334      * This method returns the installed declaration handler.
335      *
336      * @return A pointer to the installed declaration handler object.
337      */
338    virtual DeclHandler* getDeclarationHandler() const ;
339
340        /**
341      * This method returns the installed lexical handler.
342      *
343      * @return A pointer to the installed lexical handler object.
344      */
345    virtual LexicalHandler* getLexicalHandler() const ;
346
347   /**
348    * Allow an application to register a declaration event handler.
349    *
350    * If the application does not register a declaration handler,
351    * all events reported by the SAX parser will be silently
352    * ignored. (this is the default behaviour implemented by DefaultHandler).
353    *
354    * Applications may register a new or different handler in the
355    * middle of a parse, and the SAX parser must begin using the new
356    * handler immediately.
357    *
358    * @param handler The DTD declaration handler.
359    * @see DeclHandler#DeclHandler
360    * @see SAXException#SAXException
361    * @see DefaultHandler#DefaultHandler
362    */
363    virtual void setDeclarationHandler(DeclHandler* const handler) ;
364
365   /**
366    * Allow an application to register a lexical event handler.
367    *
368    * If the application does not register a lexical handler,
369    * all events reported by the SAX parser will be silently
370    * ignored. (this is the default behaviour implemented by HandlerBase).
371    *
372    * Applications may register a new or different handler in the
373    * middle of a parse, and the SAX parser must begin using the new
374    * handler immediately.
375    *
376    * @param handler The error handler.
377    * @see LexicalHandler#LexicalHandler
378    * @see SAXException#SAXException
379    * @see HandlerBase#HandlerBase
380    */
381    virtual void setLexicalHandler(LexicalHandler* const handler) ;
382
383    //@}
384
385    // -----------------------------------------------------------------------
386    //  Getter Methods
387    // -----------------------------------------------------------------------
388    /** @name Getter Methods (Xerces-C specific) */
389    //@{
390    /**
391          * This method is used to get the current validator.
392          *
393          * <b>SAX2XMLReader assumes responsibility for the validator.  It will be
394          * deleted when the XMLReader is destroyed.</b>
395          *
396          * @return A pointer to the validator.  An application should not deleted
397          * the object returned.
398          *
399          */
400        virtual XMLValidator* getValidator() const ;
401
402    /** Get error count from the last parse operation.
403      *
404      * This method returns the error count from the last parse
405      * operation. Note that this count is actually stored in the
406      * scanner, so this method simply returns what the
407      * scanner reports.
408      *
409      * @return number of errors encountered during the latest
410      *                 parse operation.
411      */
412    virtual XMLSize_t getErrorCount() const ;
413
414    /**
415      * This method returns the state of the parser's
416      * exit-on-First-Fatal-Error flag.
417      *
418      * <p>Or you can query the feature "http://apache.org/xml/features/continue-after-fatal-error"
419      * which indicates the opposite state.</p>
420      *
421      * @return true, if the parser is currently configured to
422      *         exit on the first fatal error, false otherwise.
423      *
424      * @see #setExitOnFirstFatalError
425      * @see #getFeature
426      */
427    virtual bool getExitOnFirstFatalError() const ;
428
429    /**
430      * This method returns the state of the parser's
431      * validation-constraint-fatal flag.
432      *
433      * <p>Or you can query the feature "http://apache.org/xml/features/validation-error-as-fatal"
434      * which means the same thing.
435      *
436      * @return true, if the parser is currently configured to
437      *         set validation constraint errors as fatal, false
438      *         otherwise.
439      *
440      * @see #setValidationContraintFatal
441      * @see #getFeature
442      */
443    virtual bool getValidationConstraintFatal() const ;
444
445    /**
446      * Retrieve the grammar that is associated with the specified namespace key
447      *
448      * @param  nameSpaceKey Namespace key
449      * @return Grammar associated with the Namespace key.
450      */
451    virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey);
452
453    /**
454      * Retrieve the grammar where the root element is declared.
455      *
456      * @return Grammar where root element declared
457      */
458    virtual Grammar* getRootGrammar();
459
460    /**
461      * Returns the string corresponding to a URI id from the URI string pool.
462      *
463      * @param uriId id of the string in the URI string pool.
464      * @return URI string corresponding to the URI id.
465      */
466    virtual const XMLCh* getURIText(unsigned int uriId) const;
467
468    /**
469      * Returns the current src offset within the input source.
470      * To be used only while parsing is in progress.
471      *
472      * @return offset within the input source
473      */
474    virtual XMLFilePos getSrcOffset() const;
475
476    //@}
477
478    // -----------------------------------------------------------------------
479    //  Setter Methods
480    // -----------------------------------------------------------------------
481    /** @name Setter Methods (Xerces-C specific) */
482    //@{
483    /**
484          * This method is used to set a validator.
485          *
486          * <b>SAX2XMLReader assumes responsibility for the validator.  It will be
487          * deleted when the XMLReader is destroyed.</b>
488          *
489          * @param valueToAdopt A pointer to the validator that the reader should use.
490          *
491          */
492        virtual void setValidator(XMLValidator* valueToAdopt) ;
493
494    /**
495      * This method allows users to set the parser's behaviour when it
496      * encounters the first fatal error. If set to true, the parser
497      * will exit at the first fatal error. If false, then it will
498      * report the error and continue processing.
499      *
500      * <p>The default value is 'true' and the parser exits on the
501      * first fatal error.</p>
502      *
503      * <p>Or you can set the feature "http://apache.org/xml/features/continue-after-fatal-error"
504      * which has the opposite behaviour.</p>
505      *
506      * <p>If both the feature above and this function are used, the latter takes effect.</p>
507      *
508      * @param newState The value specifying whether the parser should
509      *                 continue or exit when it encounters the first
510      *                 fatal error.
511      *
512      * @see #getExitOnFirstFatalError
513      * @see #setFeature
514      */
515    virtual void setExitOnFirstFatalError(const bool newState) ;
516
517    /**
518      * This method allows users to set the parser's behaviour when it
519      * encounters a validation constraint error. If set to true, and the
520      * the parser will treat validation error as fatal and will exit depends on the
521      * state of "getExitOnFirstFatalError". If false, then it will
522      * report the error and continue processing.
523      *
524      * Note: setting this true does not mean the validation error will be printed with
525      * the word "Fatal Error".   It is still printed as "Error", but the parser
526      * will exit if "setExitOnFirstFatalError" is set to true.
527      *
528      * <p>The default value is 'false'.</p>
529      *
530      * <p>Or you can set the feature "http://apache.org/xml/features/validation-error-as-fatal"
531      * which means the same thing.</p>
532      *
533      * <p>If both the feature above and this function are used, the latter takes effect.</p>
534      *
535      * @param newState If true, the parser will exit if "setExitOnFirstFatalError"
536      *                 is set to true.
537      *
538      * @see #getValidationConstraintFatal
539      * @see #setExitOnFirstFatalError
540      * @see #setFeature
541      */
542    virtual void setValidationConstraintFatal(const bool newState) ;
543    //@}
544
545
546    // -----------------------------------------------------------------------
547    //  Progressive scan methods
548    // -----------------------------------------------------------------------
549
550    /** @name Progressive scan methods */
551    //@{
552
553    /** Begin a progressive parse operation
554      *
555      * This method is used to start a progressive parse on a XML file.
556      * To continue parsing, subsequent calls must be to the parseNext
557      * method.
558      *
559      * It scans through the prolog and returns a token to be used on
560      * subsequent scanNext() calls. If the return value is true, then the
561      * token is legal and ready for further use. If it returns false, then
562      * the scan of the prolog failed and the token is not going to work on
563      * subsequent scanNext() calls.
564      *
565      * @param systemId A pointer to a Unicode string representing the path
566      *                 to the XML file to be parsed.
567      * @param toFill   A token maintaing state information to maintain
568      *                 internal consistency between invocation of 'parseNext'
569      *                 calls.
570      *
571      * @return 'true', if successful in parsing the prolog. It indicates the
572      *         user can go ahead with parsing the rest of the file. It
573      *         returns 'false' to indicate that the parser could parse the
574      *         prolog (which means the token will not be valid.)
575      *
576      * @see #parseNext
577      * @see #parseFirst(char*,...)
578      * @see #parseFirst(InputSource&,...)
579      */
580    virtual bool parseFirst
581    (
582        const   XMLCh* const    systemId
583        ,       XMLPScanToken&  toFill
584    ) ;
585
586    /** Begin a progressive parse operation
587      *
588      * This method is used to start a progressive parse on a XML file.
589      * To continue parsing, subsequent calls must be to the parseNext
590      * method.
591      *
592      * It scans through the prolog and returns a token to be used on
593      * subsequent scanNext() calls. If the return value is true, then the
594      * token is legal and ready for further use. If it returns false, then
595      * the scan of the prolog failed and the token is not going to work on
596      * subsequent scanNext() calls.
597      *
598      * @param systemId A pointer to a regular native string representing
599      *                 the path to the XML file to be parsed.
600      * @param toFill   A token maintaing state information to maintain
601      *                 internal consistency between invocation of 'parseNext'
602      *                 calls.
603      *
604      * @return 'true', if successful in parsing the prolog. It indicates the
605      *         user can go ahead with parsing the rest of the file. It
606      *         returns 'false' to indicate that the parser could not parse
607      *         the prolog.
608      *
609      * @see #parseNext
610      * @see #parseFirst(XMLCh*,...)
611      * @see #parseFirst(InputSource&,...)
612      */
613    virtual bool parseFirst
614    (
615        const   char* const     systemId
616        ,       XMLPScanToken&  toFill
617    ) ;
618
619    /** Begin a progressive parse operation
620      *
621      * This method is used to start a progressive parse on a XML file.
622      * To continue parsing, subsequent calls must be to the parseNext
623      * method.
624      *
625      * It scans through the prolog and returns a token to be used on
626      * subsequent scanNext() calls. If the return value is true, then the
627      * token is legal and ready for further use. If it returns false, then
628      * the scan of the prolog failed and the token is not going to work on
629      * subsequent scanNext() calls.
630      *
631      * @param source   A const reference to the InputSource object which
632      *                 points to the XML file to be parsed.
633      * @param toFill   A token maintaing state information to maintain
634      *                 internal consistency between invocation of 'parseNext'
635      *                 calls.
636      *
637      * @return 'true', if successful in parsing the prolog. It indicates the
638      *         user can go ahead with parsing the rest of the file. It
639      *         returns 'false' to indicate that the parser could not parse
640      *         the prolog.
641      *
642      * @see #parseNext
643      * @see #parseFirst(XMLCh*,...)
644      * @see #parseFirst(char*,...)
645      */
646    virtual bool parseFirst
647    (
648        const   InputSource&    source
649        ,       XMLPScanToken&  toFill
650    ) ;
651
652    /** Continue a progressive parse operation
653      *
654      * This method is used to continue with progressive parsing of
655      * XML files started by a call to 'parseFirst' method.
656      *
657      * It parses the XML file and stops as soon as it comes across
658      * a XML token (as defined in the XML specification). Relevant
659      * callback handlers are invoked as required by the SAX
660      * specification.
661      *
662      * @param token A token maintaing state information to maintain
663      *              internal consistency between invocation of 'parseNext'
664      *              calls.
665      *
666      * @return 'true', if successful in parsing the next XML token.
667      *         It indicates the user can go ahead with parsing the rest
668      *         of the file. It returns 'false' to indicate that the parser
669      *         could not find next token as per the XML specification
670      *         production rule.
671      *
672      * @see #parseFirst(XMLCh*,...)
673      * @see #parseFirst(char*,...)
674      * @see #parseFirst(InputSource&,...)
675      */
676    virtual bool parseNext(XMLPScanToken& token) ;
677
678    /** Reset the parser after a progressive parse
679      *
680      * If a progressive parse loop exits before the end of the document
681      * is reached, the parser has no way of knowing this. So it will leave
682      * open any files or sockets or memory buffers that were in use at
683      * the time that the parse loop exited.
684      *
685      * The next parse operation will cause these open files and such to
686      * be closed, but the next parse operation might occur at some unknown
687      * future point. To avoid this problem, you should reset the parser if
688      * you exit the loop early.
689      *
690      * If you exited because of an error, then this cleanup will be done
691      * for you. Its only when you exit the file prematurely of your own
692      * accord, because you've found what you wanted in the file most
693      * likely.
694      *
695      * @param token A token maintaing state information to maintain
696      *              internal consistency between invocation of 'parseNext'
697      *              calls.
698      */
699    virtual void parseReset(XMLPScanToken& token) ;
700
701    //@}
702
703    // -----------------------------------------------------------------------
704    //  Implementation of the grammar preparsing interface
705    // -----------------------------------------------------------------------
706
707    /** @name Implementation of Grammar preparsing interface's. */
708    //@{
709    /**
710      * Preparse schema grammar (XML Schema, DTD, etc.) via an input source
711      * object.
712      *
713      * This method invokes the preparsing process on a schema grammar XML
714      * file specified by the SAX InputSource parameter. If the 'toCache' flag
715      * is enabled, the parser will cache the grammars for re-use. If a grammar
716      * key is found in the pool, no caching of any grammar will take place.
717      *
718      *
719      * @param source A const reference to the SAX InputSource object which
720      *               points to the schema grammar file to be preparsed.
721      * @param grammarType The grammar type (Schema or DTD).
722      * @param toCache If <code>true</code>, we cache the preparsed grammar,
723      *                otherwise, no caching. Default is <code>false</code>.
724      * @return The preparsed schema grammar object (SchemaGrammar or
725      *         DTDGrammar). That grammar object is owned by the parser.
726      *
727      * @exception SAXException Any SAX exception, possibly
728      *            wrapping another exception.
729      * @exception XMLException An exception from the parser or client
730      *            handler code.
731      * @exception DOMException A DOM exception as per DOM spec.
732      *
733      * @see InputSource#InputSource
734      */
735    virtual Grammar* loadGrammar(const InputSource& source,
736                                 const Grammar::GrammarType grammarType,
737                                 const bool toCache = false);
738
739    /**
740      * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL
741      *
742      * This method invokes the preparsing process on a schema grammar XML
743      * file specified by the file path parameter. If the 'toCache' flag
744      * is enabled, the parser will cache the grammars for re-use. If a grammar
745      * key is found in the pool, no caching of any grammar will take place.
746      *
747      *
748      * @param systemId A const XMLCh pointer to the Unicode string which
749      *                 contains the path to the XML grammar file to be
750      *                 preparsed.
751      * @param grammarType The grammar type (Schema or DTD).
752      * @param toCache If <code>true</code>, we cache the preparsed grammar,
753      *                otherwise, no caching. Default is <code>false</code>.
754      * @return The preparsed schema grammar object (SchemaGrammar or
755      *         DTDGrammar). That grammar object is owned by the parser.
756      *
757      * @exception SAXException Any SAX exception, possibly
758      *            wrapping another exception.
759      * @exception XMLException An exception from the parser or client
760      *            handler code.
761      * @exception DOMException A DOM exception as per DOM spec.
762      */
763    virtual Grammar* loadGrammar(const XMLCh* const systemId,
764                                 const Grammar::GrammarType grammarType,
765                                 const bool toCache = false);
766
767    /**
768      * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL
769      *
770      * This method invokes the preparsing process on a schema grammar XML
771      * file specified by the file path parameter. If the 'toCache' flag
772      * is enabled, the parser will cache the grammars for re-use. If a grammar
773      * key is found in the pool, no caching of any grammar will take place.
774      *
775      *
776      * @param systemId A const char pointer to a native string which contains
777      *                 the path to the XML grammar file to be preparsed.
778      * @param grammarType The grammar type (Schema or DTD).
779      * @param toCache If <code>true</code>, we cache the preparsed grammar,
780      *                otherwise, no caching. Default is <code>false</code>.
781      * @return The preparsed schema grammar object (SchemaGrammar or
782      *         DTDGrammar). That grammar object is owned by the parser.
783      *
784      * @exception SAXException Any SAX exception, possibly
785      *            wrapping another exception.
786      * @exception XMLException An exception from the parser or client
787      *            handler code.
788      * @exception DOMException A DOM exception as per DOM spec.
789      */
790    virtual Grammar* loadGrammar(const char* const systemId,
791                                 const Grammar::GrammarType grammarType,
792                                 const bool toCache = false);
793
794    /**
795      * Clear the cached grammar pool
796      */
797    virtual void resetCachedGrammarPool();
798
799    /** Set maximum input buffer size
800      *
801      * This method allows users to limit the size of buffers used in parsing
802      * XML character data. The effect of setting this size is to limit the
803      * size of a ContentHandler::characters() call.
804      *
805      * The parser's default input buffer size is 1 megabyte.
806      *
807      * @param bufferSize The maximum input buffer size
808      */
809    void setInputBufferSize(const XMLSize_t bufferSize);
810
811    //@}
812
813
814    // -----------------------------------------------------------------------
815    //  Advanced document handler list maintenance methods
816    // -----------------------------------------------------------------------
817
818    /** @name Advanced document handler list maintenance methods */
819    //@{
820    /**
821      * This method installs the specified 'advanced' document callback
822      * handler, thereby allowing the user to customize the processing,
823      * if they choose to do so. Any number of advanced callback handlers
824      * maybe installed.
825      *
826      * <p>The methods in the advanced callback interface represent
827      * Xerces-C extensions. There is no specification for this interface.</p>
828      *
829      * @param toInstall A pointer to the users advanced callback handler.
830      *
831      * @see #removeAdvDocHandler
832      */
833    virtual void installAdvDocHandler(XMLDocumentHandler* const toInstall) ;
834
835    /**
836      * This method removes the 'advanced' document handler callback from
837      * the underlying parser scanner. If no handler is installed, advanced
838      * callbacks are not invoked by the scanner.
839      * @param toRemove A pointer to the advanced callback handler which
840      *                 should be removed.
841      *
842      * @see #installAdvDocHandler
843      */
844    virtual bool removeAdvDocHandler(XMLDocumentHandler* const toRemove) ;
845    //@}
846
847
848    // -----------------------------------------------------------------------
849    //  The XMLFilter interface
850    // -----------------------------------------------------------------------
851
852    /** @name Implementation of SAX 2.0 XMLFilter interface's. */
853    //@{
854    /**
855      * This method returns the parent XMLReader object.
856      *
857      * @return A pointer to the parent XMLReader object.
858      */
859    virtual SAX2XMLReader* getParent() const;
860
861    /**
862      * Sets the parent XMLReader object; parse requests will be forwarded to this
863      * object, and callback notifications coming from it will be postprocessed
864      *
865      * @param parent The new XMLReader parent.
866      * @see SAX2XMLReader#SAX2XMLReader
867      */
868    virtual void setParent(SAX2XMLReader* parent);
869    //@}
870
871    // -----------------------------------------------------------------------
872    //  Implementation of the EntityResolver interface
873    // -----------------------------------------------------------------------
874    /** @name The EntityResolver interface */
875    //@{
876
877  /**
878    * Allow the application to resolve external entities.
879    *
880    * <p>The Parser will call this method before opening any external
881    * entity except the top-level document entity (including the
882    * external DTD subset, external entities referenced within the
883    * DTD, and external entities referenced within the document
884    * element): the application may request that the parser resolve
885    * the entity itself, that it use an alternative URI, or that it
886    * use an entirely different input source.</p>
887    *
888    * <p>Application writers can use this method to redirect external
889    * system identifiers to secure and/or local URIs, to look up
890    * public identifiers in a catalogue, or to read an entity from a
891    * database or other input source (including, for example, a dialog
892    * box).</p>
893    *
894    * <p>If the system identifier is a URL, the SAX parser must
895    * resolve it fully before reporting it to the application.</p>
896    *
897    * @param publicId The public identifier of the external entity
898    *        being referenced, or null if none was supplied.
899    * @param systemId The system identifier of the external entity
900    *        being referenced.
901    * @return An InputSource object describing the new input source,
902    *         or null to request that the parser open a regular
903    *         URI connection to the system identifier.
904    *         The returned InputSource is owned by the parser which is
905    *         responsible to clean up the memory.
906    * @exception SAXException Any SAX exception, possibly
907    *            wrapping another exception.
908    * @exception IOException An IO exception,
909    *            possibly the result of creating a new InputStream
910    *            or Reader for the InputSource.
911    * @see InputSource#InputSource
912    */
913    virtual InputSource* resolveEntity
914    (
915        const   XMLCh* const    publicId
916        , const XMLCh* const    systemId
917    );
918
919    //@}
920
921    // -----------------------------------------------------------------------
922    //  Implementation of the DTDHandler interface
923    // -----------------------------------------------------------------------
924    /** @name The DTD handler interface */
925    //@{
926  /**
927    * Receive notification of a notation declaration event.
928    *
929    * <p>It is up to the application to record the notation for later
930    * reference, if necessary.</p>
931    *
932    * <p>If a system identifier is present, and it is a URL, the SAX
933    * parser must resolve it fully before passing it to the
934    * application.</p>
935    *
936    * @param name The notation name.
937    * @param publicId The notation's public identifier, or null if
938    *        none was given.
939    * @param systemId The notation's system identifier, or null if
940    *        none was given.
941    * @exception SAXException Any SAX exception, possibly
942    *            wrapping another exception.
943    * @see #unparsedEntityDecl
944    * @see AttributeList#AttributeList
945    */
946        virtual void notationDecl
947    (
948        const   XMLCh* const    name
949        , const XMLCh* const    publicId
950        , const XMLCh* const    systemId
951    );
952
953  /**
954    * Receive notification of an unparsed entity declaration event.
955    *
956    * <p>Note that the notation name corresponds to a notation
957    * reported by the notationDecl() event.  It is up to the
958    * application to record the entity for later reference, if
959    * necessary.</p>
960    *
961    * <p>If the system identifier is a URL, the parser must resolve it
962    * fully before passing it to the application.</p>
963    *
964    * @exception SAXException Any SAX exception, possibly
965    *            wrapping another exception.
966    * @param name The unparsed entity's name.
967    * @param publicId The entity's public identifier, or null if none
968    *        was given.
969    * @param systemId The entity's system identifier (it must always
970    *        have one).
971    * @param notationName The name of the associated notation.
972    * @see #notationDecl
973    * @see AttributeList#AttributeList
974    */
975    virtual void unparsedEntityDecl
976    (
977        const   XMLCh* const    name
978        , const XMLCh* const    publicId
979        , const XMLCh* const    systemId
980        , const XMLCh* const    notationName
981    );
982
983    /**
984    * Reset the DocType object on its reuse
985    *
986    * <p>This method helps in reseting the DTD object implementation
987    * defaults each time the DTD is begun.</p>
988    *
989    */
990    virtual void resetDocType();
991
992    //@}
993
994    // -----------------------------------------------------------------------
995    //  Implementation of the ContentHandler interface
996    // -----------------------------------------------------------------------
997    /** @name The virtual document handler interface */
998
999    //@{
1000   /**
1001    * Receive notification of character data.
1002    *
1003    * <p>The Parser will call this method to report each chunk of
1004    * character data.  SAX parsers may return all contiguous character
1005    * data in a single chunk, or they may split it into several
1006    * chunks; however, all of the characters in any single event
1007    * must come from the same external entity, so that the Locator
1008    * provides useful information.</p>
1009    *
1010    * <p>The application must not attempt to read from the array
1011    * outside of the specified range.</p>
1012    *
1013    * <p>Note that some parsers will report whitespace using the
1014    * ignorableWhitespace() method rather than this one (validating
1015    * parsers must do so).</p>
1016    *
1017    * @param chars The characters from the XML document.
1018    * @param length The number of characters to read from the array.
1019    * @exception SAXException Any SAX exception, possibly
1020    *            wrapping another exception.
1021    * @see #ignorableWhitespace
1022    * @see Locator#Locator
1023    */
1024    virtual void characters
1025    (
1026        const   XMLCh* const    chars
1027        , const XMLSize_t       length
1028    );
1029
1030  /**
1031    * Receive notification of the end of a document.
1032    *
1033    * <p>The SAX parser will invoke this method only once, and it will
1034    * be the last method invoked during the parse.  The parser shall
1035    * not invoke this method until it has either abandoned parsing
1036    * (because of an unrecoverable error) or reached the end of
1037    * input.</p>
1038    *
1039    * @exception SAXException Any SAX exception, possibly
1040    *            wrapping another exception.
1041    */
1042    virtual void endDocument ();
1043
1044  /**
1045    * Receive notification of the end of an element.
1046    *
1047    * <p>The SAX parser will invoke this method at the end of every
1048    * element in the XML document; there will be a corresponding
1049    * startElement() event for every endElement() event (even when the
1050    * element is empty).</p>
1051    *
1052    * @param uri The URI of the associated namespace for this element
1053        * @param localname The local part of the element name
1054        * @param qname The QName of this element
1055    * @exception SAXException Any SAX exception, possibly
1056    *            wrapping another exception.
1057    */
1058    virtual void endElement
1059        (
1060                const XMLCh* const uri,
1061                const XMLCh* const localname,
1062                const XMLCh* const qname
1063        );
1064
1065  /**
1066    * Receive notification of ignorable whitespace in element content.
1067    *
1068    * <p>Validating Parsers must use this method to report each chunk
1069    * of ignorable whitespace (see the W3C XML 1.0 recommendation,
1070    * section 2.10): non-validating parsers may also use this method
1071    * if they are capable of parsing and using content models.</p>
1072    *
1073    * <p>SAX parsers may return all contiguous whitespace in a single
1074    * chunk, or they may split it into several chunks; however, all of
1075    * the characters in any single event must come from the same
1076    * external entity, so that the Locator provides useful
1077    * information.</p>
1078    *
1079    * <p>The application must not attempt to read from the array
1080    * outside of the specified range.</p>
1081    *
1082    * @param chars The characters from the XML document.
1083    * @param length The number of characters to read from the array.
1084    * @exception SAXException Any SAX exception, possibly
1085    *            wrapping another exception.
1086    * @see #characters
1087    */
1088    virtual void ignorableWhitespace
1089    (
1090        const   XMLCh* const    chars
1091        , const XMLSize_t       length
1092    );
1093
1094  /**
1095    * Receive notification of a processing instruction.
1096    *
1097    * <p>The Parser will invoke this method once for each processing
1098    * instruction found: note that processing instructions may occur
1099    * before or after the main document element.</p>
1100    *
1101    * <p>A SAX parser should never report an XML declaration (XML 1.0,
1102    * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
1103    * using this method.</p>
1104    *
1105    * @param target The processing instruction target.
1106    * @param data The processing instruction data, or null if
1107    *        none was supplied.
1108    * @exception SAXException Any SAX exception, possibly
1109    *            wrapping another exception.
1110    */
1111    virtual void processingInstruction
1112    (
1113        const   XMLCh* const    target
1114        , const XMLCh* const    data
1115    );
1116
1117  /**
1118    * Receive an object for locating the origin of SAX document events.
1119    *
1120    * SAX parsers are strongly encouraged (though not absolutely
1121    * required) to supply a locator: if it does so, it must supply
1122    * the locator to the application by invoking this method before
1123    * invoking any of the other methods in the DocumentHandler
1124    * interface.
1125    *
1126    * The locator allows the application to determine the end
1127    * position of any document-related event, even if the parser is
1128    * not reporting an error.  Typically, the application will
1129    * use this information for reporting its own errors (such as
1130    * character content that does not match an application's
1131    * business rules). The information returned by the locator
1132    * is probably not sufficient for use with a search engine.
1133    *
1134    * Note that the locator will return correct information only
1135    * during the invocation of the events in this interface. The
1136    * application should not attempt to use it at any other time.
1137    *
1138    * @param locator An object that can return the location of
1139    *                any SAX document event. The object is only
1140    *                'on loan' to the client code and they are not
1141    *                to attempt to delete or modify it in any way!
1142    *
1143    * @see Locator#Locator
1144    */
1145    virtual void setDocumentLocator(const Locator* const locator);
1146
1147  /**
1148    * Receive notification of the beginning of a document.
1149    *
1150    * <p>The SAX parser will invoke this method only once, before any
1151    * other methods in this interface or in DTDHandler (except for
1152    * setDocumentLocator).</p>
1153    *
1154    * @exception SAXException Any SAX exception, possibly
1155    *            wrapping another exception.
1156    */
1157    virtual void startDocument();
1158
1159  /**
1160    * Receive notification of the beginning of an element.
1161    *
1162    * <p>The Parser will invoke this method at the beginning of every
1163    * element in the XML document; there will be a corresponding
1164    * endElement() event for every startElement() event (even when the
1165    * element is empty). All of the element's content will be
1166    * reported, in order, before the corresponding endElement()
1167    * event.</p>
1168    *
1169    * <p>Note that the attribute list provided will
1170    * contain only attributes with explicit values (specified or
1171    * defaulted): #IMPLIED attributes will be omitted.</p>
1172    *
1173    * @param uri The URI of the associated namespace for this element
1174        * @param localname The local part of the element name
1175        * @param qname The QName of this element
1176    * @param attrs The attributes attached to the element, if any.
1177    * @exception SAXException Any SAX exception, possibly
1178    *            wrapping another exception.
1179    * @see #endElement
1180    * @see Attributes#Attributes
1181    */
1182    virtual void startElement
1183    (
1184        const   XMLCh* const    uri,
1185        const   XMLCh* const    localname,
1186        const   XMLCh* const    qname,
1187        const   Attributes&     attrs
1188    );
1189
1190  /**
1191    * Receive notification of the start of an namespace prefix mapping.
1192    *
1193    * <p>By default, do nothing.  Application writers may override this
1194    * method in a subclass to take specific actions at the start of
1195    * each namespace prefix mapping.</p>
1196    *
1197    * @param prefix The namespace prefix used
1198    * @param uri The namespace URI used.
1199    * @exception SAXException Any SAX exception, possibly
1200    *            wrapping another exception.
1201    */
1202        virtual void startPrefixMapping
1203        (
1204                const   XMLCh* const    prefix,
1205                const   XMLCh* const    uri
1206        );
1207
1208  /**
1209    * Receive notification of the end of an namespace prefix mapping.
1210    *
1211    * <p>By default, do nothing.  Application writers may override this
1212    * method in a subclass to take specific actions at the end of
1213    * each namespace prefix mapping.</p>
1214    *
1215    * @param prefix The namespace prefix used
1216    * @exception SAXException Any SAX exception, possibly
1217    *            wrapping another exception.
1218    */
1219        virtual void endPrefixMapping
1220        (
1221                const   XMLCh* const    prefix
1222        );
1223
1224  /**
1225    * Receive notification of a skipped entity
1226    *
1227    * <p>The parser will invoke this method once for each entity
1228        * skipped.  All processors may skip external entities,
1229        * depending on the values of the features:<br>
1230        * http://xml.org/sax/features/external-general-entities<br>
1231        * http://xml.org/sax/features/external-parameter-entities</p>
1232        *
1233        * <p>Note: Xerces (specifically) never skips any entities, regardless
1234        * of the above features.  This function is never called in the
1235        * Xerces implementation of SAX2.</p>
1236    *
1237        * <p>Introduced with SAX2</p>
1238        *
1239    * @param name The name of the skipped entity.  If it is a parameter entity,
1240        * the name will begin with %, and if it is the external DTD subset,
1241        * it will be the string [dtd].
1242    * @exception SAXException Any SAX exception, possibly
1243    *            wrapping another exception.
1244    */
1245        virtual void skippedEntity
1246        (
1247                const   XMLCh* const    name
1248        );
1249
1250    //@}
1251
1252    // -----------------------------------------------------------------------
1253    //  Implementation of the ErrorHandler interface
1254    // -----------------------------------------------------------------------
1255    /** @name The error handler interface */
1256    //@{
1257   /**
1258    * Receive notification of a warning.
1259    *
1260    * <p>SAX parsers will use this method to report conditions that
1261    * are not errors or fatal errors as defined by the XML 1.0
1262    * recommendation.  The default behaviour is to take no action.</p>
1263    *
1264    * <p>The SAX parser must continue to provide normal parsing events
1265    * after invoking this method: it should still be possible for the
1266    * application to process the document through to the end.</p>
1267    *
1268    * @param exc The warning information encapsulated in a
1269    *            SAX parse exception.
1270    * @exception SAXException Any SAX exception, possibly
1271    *            wrapping another exception.
1272    * @see SAXParseException#SAXParseException
1273    */
1274    virtual void warning(const SAXParseException& exc);
1275
1276  /**
1277    * Receive notification of a recoverable error.
1278    *
1279    * <p>This corresponds to the definition of "error" in section 1.2
1280    * of the W3C XML 1.0 Recommendation.  For example, a validating
1281    * parser would use this callback to report the violation of a
1282    * validity constraint.  The default behaviour is to take no
1283    * action.</p>
1284    *
1285    * <p>The SAX parser must continue to provide normal parsing events
1286    * after invoking this method: it should still be possible for the
1287    * application to process the document through to the end.  If the
1288    * application cannot do so, then the parser should report a fatal
1289    * error even if the XML 1.0 recommendation does not require it to
1290    * do so.</p>
1291    *
1292    * @param exc The error information encapsulated in a
1293    *            SAX parse exception.
1294    * @exception SAXException Any SAX exception, possibly
1295    *            wrapping another exception.
1296    * @see SAXParseException#SAXParseException
1297    */
1298    virtual void error(const SAXParseException& exc);
1299
1300  /**
1301    * Receive notification of a non-recoverable error.
1302    *
1303    * <p>This corresponds to the definition of "fatal error" in
1304    * section 1.2 of the W3C XML 1.0 Recommendation.  For example, a
1305    * parser would use this callback to report the violation of a
1306    * well-formedness constraint.</p>
1307    *
1308    * <p>The application must assume that the document is unusable
1309    * after the parser has invoked this method, and should continue
1310    * (if at all) only for the sake of collecting addition error
1311    * messages: in fact, SAX parsers are free to stop reporting any
1312    * other events once this method has been invoked.</p>
1313    *
1314    * @param exc The error information encapsulated in a
1315    *            SAX parse exception.
1316    * @exception SAXException Any SAX exception, possibly
1317    *            wrapping another exception.
1318    * @see SAXParseException#SAXParseException
1319    */
1320    virtual void fatalError(const SAXParseException& exc);
1321
1322    /**
1323    * Reset the Error handler object on its reuse
1324    *
1325    * <p>This method helps in reseting the Error handler object
1326    * implementation defaults each time the Error handler is begun.</p>
1327    *
1328    */
1329    virtual void resetErrors();
1330
1331    //@}
1332
1333
1334private :
1335    // -----------------------------------------------------------------------
1336    //  Unimplemented constructors and operators
1337    // -----------------------------------------------------------------------
1338    SAX2XMLFilterImpl(const SAX2XMLFilterImpl&);
1339    SAX2XMLFilterImpl& operator=(const SAX2XMLFilterImpl&);
1340
1341    // -----------------------------------------------------------------------
1342    //  Private data members
1343    //
1344    //  fParentReader
1345    //      The object that we are filtering
1346    //
1347    //  fDocHandler
1348    //      The installed SAX content handler, if any. Null if none.
1349    //
1350    //  fDTDHandler
1351    //      The installed SAX DTD handler, if any. Null if none.
1352    //
1353    //  fEntityResolver
1354    //      The installed SAX entity handler, if any. Null if none.
1355    //
1356    //  fErrorHandler
1357    //      The installed SAX error handler, if any. Null if none.
1358    //
1359    // -----------------------------------------------------------------------
1360    SAX2XMLReader*              fParentReader;
1361    ContentHandler*                     fDocHandler;
1362    DTDHandler*                 fDTDHandler;
1363    EntityResolver*             fEntityResolver;
1364    ErrorHandler*               fErrorHandler;
1365};
1366
1367
1368// ---------------------------------------------------------------------------
1369//  SAX2XMLReader: Getter methods
1370// ---------------------------------------------------------------------------
1371inline SAX2XMLReader* SAX2XMLFilterImpl::getParent() const
1372{
1373    return fParentReader;
1374}
1375
1376inline ContentHandler* SAX2XMLFilterImpl::getContentHandler() const
1377{
1378    return fDocHandler;
1379}
1380
1381inline DTDHandler* SAX2XMLFilterImpl::getDTDHandler() const
1382{
1383        return fDTDHandler;
1384}
1385
1386inline EntityResolver* SAX2XMLFilterImpl::getEntityResolver() const
1387{
1388        return fEntityResolver;
1389}
1390
1391inline ErrorHandler* SAX2XMLFilterImpl::getErrorHandler() const
1392{
1393        return fErrorHandler;
1394}
1395
1396inline LexicalHandler* SAX2XMLFilterImpl::getLexicalHandler() const
1397{
1398   return 0;
1399}
1400
1401inline DeclHandler* SAX2XMLFilterImpl::getDeclarationHandler() const
1402{
1403   return 0;
1404}
1405
1406inline void SAX2XMLFilterImpl::setContentHandler(ContentHandler* const handler)
1407{
1408        fDocHandler = handler;
1409}
1410
1411inline void SAX2XMLFilterImpl::setDTDHandler(DTDHandler* const handler)
1412{
1413    fDTDHandler = handler;
1414}
1415
1416inline void SAX2XMLFilterImpl::setErrorHandler(ErrorHandler* const handler)
1417{
1418    fErrorHandler = handler;
1419}
1420
1421inline void SAX2XMLFilterImpl::setEntityResolver(EntityResolver* const resolver)
1422{
1423    fEntityResolver = resolver;
1424}
1425
1426inline void SAX2XMLFilterImpl::setLexicalHandler(LexicalHandler* const /*handler*/)
1427{
1428}
1429
1430inline void SAX2XMLFilterImpl::setDeclarationHandler(DeclHandler* const /*handler*/)
1431{
1432}
1433
1434inline void SAX2XMLFilterImpl::installAdvDocHandler(XMLDocumentHandler* const /*toInstall*/)
1435{
1436}
1437
1438inline bool SAX2XMLFilterImpl::removeAdvDocHandler(XMLDocumentHandler* const /*toRemove*/)
1439{
1440    return false;
1441}
1442
1443XERCES_CPP_NAMESPACE_END
1444
1445#endif
Note: See TracBrowser for help on using the repository browser.