source: icXML/icXML-devel/src/icxercesc/parsers/SAXParser.hpp

Last change on this file was 3564, checked in by cameron, 6 years ago

Changes to icxercesc files

File size: 74.4 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: SAXParser.hpp 932887 2010-04-11 13:04:59Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_SAXPARSER_HPP)
23#define XERCESC_INCLUDE_GUARD_SAXPARSER_HPP
24
25#include <xercesc/sax/Parser.hpp>
26#include <xercesc/internal/VecAttrListImpl.hpp>
27#include <icxercesc/framework/XMLDocumentHandler.hpp>
28#include <icxercesc/framework/XMLElementDecl.hpp>
29#include <xercesc/framework/XMLEntityHandler.hpp>
30#include <xercesc/framework/XMLErrorReporter.hpp>
31#include <icxercesc/framework/XMLBuffer.hpp>
32#include <xercesc/util/SecurityManager.hpp>
33#include <icxercesc/validators/common/Grammar.hpp>
34#include <xercesc/validators/DTD/DocTypeHandler.hpp>
35#include <icxmlc/XMLConfig.hpp>
36#ifdef TEST_NAMESPACE_RESOLVER
37#include <icxmlc/XMLNamespaceResolver.hpp>
38#endif
39
40XERCES_CPP_NAMESPACE_BEGIN
41
42
43class DocumentHandler;
44class EntityResolver;
45class XMLPScanToken;
46class XMLScanner;
47class XMLValidator;
48class GrammarResolver;
49class XMLGrammarPool;
50class XMLEntityResolver;
51class XMLResourceIdentifier;
52class PSVIHandler;
53class XMLDocumentDisseminator;
54class XMLParser;
55
56/**
57  * This class implements the SAX 'Parser' interface and should be
58  * used by applications wishing to parse the XML files using SAX.
59  * It allows the client program to install SAX handlers for event
60  * callbacks.
61  *
62  * <p>It can be used to instantiate a validating or non-validating
63  * parser, by setting a member flag.</p>
64  *
65  * @deprecated This interface has been replaced by the SAX2
66  *             interface, which includes Namespace support.
67  *             See SAX2XMLReader for more information.
68  *
69  * Note - XMLDocumentHandler calls, when used with SAXParser, will not provide correct namespace information. This is becaue the SAX parser does not support namespace aware processing.
70  *
71  *
72  */
73
74class PARSERS_EXPORT SAXParser :
75
76        public XMemory
77        , public Parser
78        , public XMLDocumentHandler
79        , public XMLErrorReporter
80        , public XMLEntityHandler
81        , public DocTypeHandler
82{
83    template<bool doPSVI> friend class SAXDocumentDisseminatorImpl;
84
85public :
86        // -----------------------------------------------------------------------
87        //  Class types
88        // -----------------------------------------------------------------------
89        /** ValScheme enum used in setValidationScheme
90          *    Val_Never:  Do not report validation errors.
91          *    Val_Always: The parser will always report validation errors.
92          *    Val_Auto:   The parser will report validation errors only if a grammar is specified.
93          *
94          * @see #setValidationScheme
95          */
96
97        enum ValSchemes
98        {
99                Val_Never
100                , Val_Always
101                , Val_Auto
102        };
103
104
105        // -----------------------------------------------------------------------
106        //  Constructors and Destructor
107        // -----------------------------------------------------------------------
108        /** @name Constructors and Destructor */
109        //@{
110        /** Constructor with an instance of validator class to use for
111          * validation.
112          * @param valToAdopt Pointer to the validator instance to use. The
113          *                   parser is responsible for freeing the memory.
114          * @param manager    Pointer to the memory manager to be used to
115          *                   allocate objects.
116          * @param gramPool   The collection of cached grammars.
117          */
118        SAXParser
119        (
120                  XMLValidator*   const valToAdopt = 0
121                , MemoryManager*  const manager = XMLPlatformUtils::fgMemoryManager
122                , XMLGrammarPool* const gramPool = 0
123        );
124
125    explicit SAXParser
126    (
127        const XMLCh *           scannerName
128        , XMLValidator*   const valToAdopt = 0
129        , MemoryManager*  const manager = XMLPlatformUtils::fgMemoryManager
130        , XMLGrammarPool* const gramPool = 0
131    );
132
133        /**
134          * Destructor
135          */
136        ~SAXParser();
137        //@}
138
139
140        // -----------------------------------------------------------------------
141        //  Getter Methods
142        // -----------------------------------------------------------------------
143        /** @name Getter methods */
144        //@{
145        /**
146          * This method returns the installed document handler. Suitable
147          * for 'lvalue' usages.
148          *
149          * @return The pointer to the installed document handler object.
150          */
151        DocumentHandler* getDocumentHandler();
152
153        /**
154          * This method returns the installed document handler. Suitable
155          * only for 'rvalue' usages.
156          *
157          * @return A const pointer to the installed document handler object.
158          */
159        const DocumentHandler* getDocumentHandler() const;
160
161        /**
162          * This method returns the installed entity resolver. Suitable
163          * for 'lvalue' usages.
164          *
165          * @return The pointer to the installed entity resolver object.
166          */
167        EntityResolver* getEntityResolver();
168
169        /**
170          * This method returns the installed entity resolver. Suitable
171          * for 'rvalue' usages.
172          *
173          * @return A const pointer to the installed entity resolver object.
174          */
175        const EntityResolver* getEntityResolver() const;
176
177        /**
178          * This method returns the installed entity resolver. Suitable
179          * for 'lvalue' usages.
180          *
181          * @return The pointer to the installed entity resolver object.
182          */
183        XMLEntityResolver* getXMLEntityResolver();
184
185        /**
186          * This method returns the installed entity resolver. Suitable
187          * for 'rvalue' usages.
188          *
189          * @return A const pointer to the installed entity resolver object.
190          */
191        const XMLEntityResolver* getXMLEntityResolver() const;
192
193        /**
194          * This method returns the installed error handler. Suitable
195          * for 'lvalue' usages.
196          *
197          * @return The pointer to the installed error handler object.
198          */
199        ErrorHandler* getErrorHandler();
200
201        /**
202          * This method returns the installed error handler. Suitable
203          * for 'rvalue' usages.
204          *
205          * @return A const pointer to the installed error handler object.
206          */
207        const ErrorHandler* getErrorHandler() const;
208
209        /**
210          * This method returns the installed PSVI handler. Suitable
211          * for 'lvalue' usages.
212          *
213          * @return The pointer to the installed PSVI handler object.
214          */
215        PSVIHandler* getPSVIHandler();
216
217        /**
218          * This method returns the installed PSVI handler. Suitable
219          * for 'rvalue' usages.
220          *
221          * @return A const pointer to the installed PSVI handler object.
222          */
223        const PSVIHandler* getPSVIHandler() const;
224
225        /**
226          * This method returns a reference to the parser's installed
227          * validator.
228          *
229          * @return A const reference to the installed validator object.
230          */
231        const XMLValidator& getValidator() const;
232
233        /**
234          * This method returns an enumerated value that indicates the current
235          * validation scheme set on this parser.
236          *
237          * @return The ValSchemes value current set on this parser.
238          * @see #setValidationScheme
239          */
240        ValSchemes getValidationScheme() const;
241
242        /** Get the 'do schema' flag
243          *
244          * This method returns the state of the parser's schema processing
245          * flag.
246          *
247          * @return true, if the parser is currently configured to
248          *         understand schema, false otherwise.
249          *
250          * @see #setDoSchema
251          */
252        bool getDoSchema() const;
253
254        /** Get the 'full schema constraint checking' flag
255          *
256          * This method returns the state of the parser's full schema constraint
257          * checking flag.
258          *
259          * @return true, if the parser is currently configured to
260          *         have full schema constraint checking, false otherwise.
261          *
262          * @see #setValidationSchemaFullChecking
263          */
264        bool getValidationSchemaFullChecking() const;
265
266        /** Get the 'identity constraint checking' flag
267          *
268          * This method returns the state of the parser's identity constraint
269          * checking flag.
270          *
271          * @return true, if the parser is currently configured to
272          *         have identity constraint checking, false otherwise.
273          *
274          * @see #setIdentityConstraintChecking
275          */
276        bool getIdentityConstraintChecking() const;
277
278        /** Get error count from the last parse operation.
279          *
280          * This method returns the error count from the last parse
281          * operation. Note that this count is actually stored in the
282          * scanner, so this method simply returns what the
283          * scanner reports.
284          *
285          * @return number of errors encountered during the latest
286          *                     parse operation.
287          */
288        int getErrorCount() const;
289
290        /**
291          * This method returns the state of the parser's namespace
292          * handling capability.
293          *
294          * @return true, if the parser is currently configured to
295          *         understand namespaces, false otherwise.
296          *
297          * @see #setDoNamespaces
298          */
299        bool getDoNamespaces() const;
300
301        /**
302          * This method returns the state of the parser's
303          * exit-on-First-Fatal-Error flag.
304          *
305          * @return true, if the parser is currently configured to
306          *         exit on the first fatal error, false otherwise.
307          *
308          * @see #setExitOnFirstFatalError
309          */
310        bool getExitOnFirstFatalError() const;
311
312        /**
313          * This method returns the state of the parser's
314          * validation-constraint-fatal flag.
315          *
316          * @return true, if the parser is currently configured to
317          *         set validation constraint errors as fatal, false
318          *         otherwise.
319          *
320          * @see #setValidationConstraintFatal
321          */
322        bool getValidationConstraintFatal() const;
323
324   /** Get the set of Namespace/SchemaLocation that is specified externally.
325          *
326          * This method returns the list of Namespace/SchemaLocation that was
327          * specified using setExternalSchemaLocation.
328          *
329          * The parser owns the returned string, and the memory allocated for
330          * the returned string will be destroyed when the parser is deleted.
331          *
332          * To ensure accessibility of the returned information after the parser
333          * is deleted, callers need to copy and store the returned information
334          * somewhere else.
335          *
336          * @return a pointer to the list of Namespace/SchemaLocation that was
337          *         specified externally.  The pointer spans the same life-time as
338          *         the parser.  A null pointer is returned if nothing
339          *         was specified externally.
340          *
341          * @see #setExternalSchemaLocation(const XMLCh* const)
342          */
343        XMLCh* getExternalSchemaLocation() const;
344
345   /** Get the noNamespace SchemaLocation that is specified externally.
346          *
347          * This method returns the no target namespace XML Schema Location
348          * that was specified using setExternalNoNamespaceSchemaLocation.
349          *
350          * The parser owns the returned string, and the memory allocated for
351          * the returned string will be destroyed when the parser is deleted.
352          *
353          * To ensure accessibility of the returned information after the parser
354          * is deleted, callers need to copy and store the returned information
355          * somewhere else.
356          *
357          * @return a pointer to the no target namespace Schema Location that was
358          *         specified externally.  The pointer spans the same life-time as
359          *         the parser.  A null pointer is returned if nothing
360          *         was specified externally.
361          *
362          * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
363          */
364        XMLCh* getExternalNoNamespaceSchemaLocation() const;
365
366   /** Get the SecurityManager instance attached to this parser.
367          *
368          * This method returns the security manager
369          * that was specified using setSecurityManager.
370          *
371          * The SecurityManager instance must have been specified by the application;
372          * this should not be deleted until after the parser has been deleted (or
373          * a new SecurityManager instance has been supplied to the parser).
374          *
375          * @return a pointer to the SecurityManager instance
376          *         specified externally.  A null pointer is returned if nothing
377          *         was specified externally.
378          *
379          * @see #setSecurityManager(SecurityManager* const)
380          */
381        SecurityManager* getSecurityManager() const;
382
383        /** Get the raw buffer low water mark for this parser.
384          *
385          * If the number of available bytes in the raw buffer is less than
386          * the low water mark the parser will attempt to read more data before
387          * continuing parsing. By default the value for this parameter is 100
388          * bytes. You may want to set this parameter to 0 if you would like
389          * the parser to parse the available data immediately without
390          * potentially blocking while waiting for more date.
391          *
392          * @return current low water mark
393          *
394          * @see #setSecurityManager
395          */
396        XMLSize_t getLowWaterMark() const;
397
398        /** Get the 'Loading External DTD' flag
399          *
400          * This method returns the state of the parser's loading external DTD
401          * flag.
402          *
403          * @return false, if the parser is currently configured to
404          *         ignore external DTD completely, true otherwise.
405          *
406          * @see #setLoadExternalDTD
407          * @see #getValidationScheme
408          */
409        bool getLoadExternalDTD() const;
410
411        /** Get the 'Loading Schema' flag
412          *
413          * This method returns the state of the parser's loading schema
414          * flag.
415          *
416          * @return true, if the parser is currently configured to
417          *         automatically load schemas that are not in the
418          *         grammar pool, false otherwise.
419          *
420          * @see #setLoadSchema
421          */
422        bool getLoadSchema() const;
423
424        /** Get the 'Grammar caching' flag
425          *
426          * This method returns the state of the parser's grammar caching when
427          * parsing an XML document.
428          *
429          * @return true, if the parser is currently configured to
430          *         cache grammars, false otherwise.
431          *
432          * @see #cacheGrammarFromParse
433          */
434        bool isCachingGrammarFromParse() const;
435
436        /** Get the 'Use cached grammar' flag
437          *
438          * This method returns the state of the parser's use of cached grammar
439          * when parsing an XML document.
440          *
441          * @return true, if the parser is currently configured to
442          *         use cached grammars, false otherwise.
443          *
444          * @see #useCachedGrammarInParse
445          */
446        bool isUsingCachedGrammarInParse() const;
447
448        /**
449          * Get the 'calculate src offset flag'
450          *
451          * This method returns the state of the parser's src offset calculation
452          * when parsing an XML document.
453          *
454          * @return true, if the parser is currently configured to
455          *         calculate src offsets, false otherwise.
456          *
457          * @see #setCalculateSrcOfs
458          */
459        bool getCalculateSrcOfs() const;
460
461        /**
462          * Get the 'force standard uri flag'
463          *
464          * This method returns the state if the parser forces standard uri
465          *
466          * @return true, if the parser is currently configured to
467          *         force standard uri, i.e. malformed uri will be rejected.
468          *
469          * @see #setStandardUriConformant
470          */
471        bool getStandardUriConformant() const;
472
473        /**
474         * Retrieve the grammar that is associated with the specified namespace key
475         *
476         * @param  nameSpaceKey Namespace key
477         * @return Grammar associated with the Namespace key.
478         */
479        Grammar* getGrammar(const XMLCh* const nameSpaceKey);
480
481        /**
482         * Retrieve the grammar where the root element is declared.
483         *
484         * @return Grammar where root element declared
485         */
486        Grammar* getRootGrammar();
487
488        /**
489         * Returns the string corresponding to a URI id from the URI string pool.
490         *
491         * @param uriId id of the string in the URI string pool.
492         * @return URI string corresponding to the URI id.
493         */
494        const XMLCh* getURIText(unsigned int uriId) const;
495
496        /**
497         * Returns the current src offset within the input source.
498         * To be used only while parsing is in progress.
499         *
500         * @return offset within the input source
501         */
502        XMLFilePos getSrcOffset() const;
503
504        /** Get the 'generate synthetic annotations' flag
505          *
506          * @return true, if the parser is currently configured to
507          *         generate synthetic annotations, false otherwise.
508          *         A synthetic XSAnnotation is created when a schema
509          *         component has non-schema attributes but has no
510          *         child annotations so that the non-schema attributes
511          *         can be recovered under PSVI.
512          *
513          * @see #setGenerateSyntheticAnnotations
514          */
515        bool getGenerateSyntheticAnnotations() const;
516
517        /** Get the 'validate annotations' flag
518          *
519          * @return true, if the parser is currently configured to
520          *         validate annotations, false otherwise.
521          *
522          * @see #setValidateAnnotations
523          */
524        bool getValidateAnnotations() const;
525
526        /** Get the 'ignore cached DTD grammar' flag
527          *
528          * @return true, if the parser is currently configured to
529          *         ignore cached DTD, false otherwise.
530          *
531          * @see #setIgnoreCachedDTD
532          */
533        bool getIgnoreCachedDTD() const;
534
535        /** Get the 'ignore annotations' flag
536          *
537          * @return true, if the parser is currently configured to
538          *         ignore annotations, false otherwise.
539          *
540          * @see #setIgnoreAnnotations
541          */
542        bool getIgnoreAnnotations() const;
543
544        /** Get the 'disable default entity resolution' flag
545          *
546          * @return true, if the parser is currently configured to
547          *         not perform default entity resolution, false otherwise.
548          *
549          * @see #setDisableDefaultEntityResolution
550          */
551        bool getDisableDefaultEntityResolution() const;
552
553        /** Get the 'skip DTD validation' flag
554          *
555          * @return true, if the parser is currently configured to
556          *         skip DTD validation, false otherwise.
557          *
558          * @see #setSkipDTDValidation
559          */
560        bool getSkipDTDValidation() const;
561
562        /** Get the 'handle multiple schema imports' flag
563          *
564          * @return true, if the parser is currently configured to
565          *         import multiple schemas with the same namespace, false otherwise.
566          *
567          * @see #setHandleMultipleImports
568          */
569        bool getHandleMultipleImports() const;
570        //@}
571
572
573        // -----------------------------------------------------------------------
574        //  Setter methods
575        // -----------------------------------------------------------------------
576
577        /** @name Setter methods */
578        //@{
579        /** set the 'generate synthetic annotations' flag
580          *
581          * @param newValue The value for specifying whether Synthetic Annotations
582          *        should be generated or not.
583          *        A synthetic XSAnnotation is created when a schema
584          *        component has non-schema attributes but has no
585          *        child annotations.
586          *
587          * @see #getGenerateSyntheticAnnotations
588          */
589        void setGenerateSyntheticAnnotations(const bool newValue);
590
591        /** set the 'validate annotations' flag
592          *
593          * @param newValue The value for specifying whether annotations
594          *        should be validate or not.
595          *
596          * @see #getValidateAnnotations
597          */
598        void setValidateAnnotations(const bool newValue);
599
600        /**
601          * This method allows users to enable or disable the parser's
602          * namespace processing. When set to true, parser starts enforcing
603          * all the constraints / rules specified by the NameSpace
604          * specification.
605          *
606          * <p>The parser's default state is: false.</p>
607          *
608          * @param newState The value specifying whether NameSpace rules should
609          *                 be enforced or not.
610          *
611          * @see #getDoNamespaces
612          */
613        void setDoNamespaces(const bool newState);
614
615        /**
616          * This method allows users to set the validation scheme to be used
617          * by this parser. The value is one of the ValSchemes enumerated values
618          * defined by this class:
619          *
620          * <br>  Val_Never  - turn off validation
621          * <br>  Val_Always - turn on validation
622          * <br>  Val_Auto   - turn on validation if any internal/external
623          *                  DTD subset have been seen
624          *
625          * <p>The parser's default state is: Val_Never.</p>
626          *
627          * @param newScheme The new validation scheme to use.
628          *
629          * @see #getValidationScheme
630          */
631        void setValidationScheme(const ValSchemes newScheme);
632
633        /** Set the 'schema support' flag
634          *
635          * This method allows users to enable or disable the parser's
636          * schema processing. When set to false, parser will not process
637          * any schema found.
638          *
639          * The parser's default state is: false.
640          *
641          * Note: If set to true, namespace processing must also be turned on.
642          *
643          * @param newState The value specifying whether schema support should
644          *                 be enforced or not.
645          *
646          * @see #getDoSchema
647          */
648        void setDoSchema(const bool newState);
649
650        /**
651          * This method allows the user to turn full Schema constraint checking on/off.
652          * Only takes effect if Schema validation is enabled.
653          * If turned off, partial constraint checking is done.
654          *
655          * Full schema constraint checking includes those checking that may
656          * be time-consuming or memory intensive. Currently, particle unique
657          * attribution constraint checking and particle derivation restriction checking
658          * are controlled by this option.
659          *
660          * The parser's default state is: false.
661          *
662          * @param schemaFullChecking True to turn on full schema constraint checking.
663          *
664          * @see #getValidationSchemaFullChecking
665          */
666        void setValidationSchemaFullChecking(const bool schemaFullChecking);
667
668        /**
669          * This method allows the user to turn identity constraint checking on/off.
670          * Only takes effect if Schema validation is enabled.
671          * If turned off, identity constraint checking is not done.
672          *
673          * The parser's default state is: true.
674          *
675          * @param identityConstraintChecking True to turn on identity constraint checking.
676          *
677          * @see #getIdentityConstraintChecking
678          */
679        void setIdentityConstraintChecking(const bool identityConstraintChecking);
680
681        /**
682          * This method allows users to set the parser's behaviour when it
683          * encounters the first fatal error. If set to true, the parser
684          * will exit at the first fatal error. If false, then it will
685          * report the error and continue processing.
686          *
687          * <p>The default value is 'true' and the parser exits on the
688          * first fatal error.</p>
689          *
690          * @param newState The value specifying whether the parser should
691          *                 continue or exit when it encounters the first
692          *                 fatal error.
693          *
694          * @see #getExitOnFirstFatalError
695          */
696        void setExitOnFirstFatalError(const bool newState);
697
698        /**
699          * This method allows users to set the parser's behaviour when it
700          * encounters a validation constraint error. If set to true, and the
701          * the parser will treat validation error as fatal and will exit depends on the
702          * state of "getExitOnFirstFatalError". If false, then it will
703          * report the error and continue processing.
704          *
705          * Note: setting this true does not mean the validation error will be printed with
706          * the word "Fatal Error".   It is still printed as "Error", but the parser
707          * will exit if "setExitOnFirstFatalError" is set to true.
708          *
709          * <p>The default value is 'false'.</p>
710          *
711          * @param newState If true, the parser will exit if "setExitOnFirstFatalError"
712          *                 is set to true.
713          *
714          * @see #getValidationConstraintFatal
715          * @see #setExitOnFirstFatalError
716          */
717        void setValidationConstraintFatal(const bool newState);
718
719        /**
720          * This method allows the user to specify a list of schemas to use.
721          * If the targetNamespace of a schema specified using this method matches
722          * the targetNamespace of a schema occurring in the instance document in
723          * the schemaLocation attribute, or if the targetNamespace matches the
724          * namespace attribute of the "import" element, the schema specified by the
725          * user using this method will be used (i.e., the schemaLocation attribute
726          * in the instance document or on the "import" element will be effectively ignored).
727          *
728          * If this method is called more than once, only the last one takes effect.
729          *
730          * The syntax is the same as for schemaLocation attributes in instance
731          * documents: e.g, "http://www.example.com file_name.xsd". The user can
732          * specify more than one XML Schema in the list.
733          *
734          * @param schemaLocation the list of schemas to use
735          *
736          * @see #getExternalSchemaLocation
737          */
738
739        void setExternalSchemaLocation(const XMLCh* const schemaLocation);
740
741        /**
742          * This method is same as setExternalSchemaLocation(const XMLCh* const).
743          * It takes native char string as parameter
744          *
745          * @param schemaLocation the list of schemas to use
746          *
747          * @see #setExternalSchemaLocation(const XMLCh* const)
748          */
749        void setExternalSchemaLocation(const char* const schemaLocation);
750
751        /**
752          * This method allows the user to specify the no target namespace XML
753          * Schema Location externally.  If specified, the instance document's
754          * noNamespaceSchemaLocation attribute will be effectively ignored.
755          *
756          * If this method is called more than once, only the last one takes effect.
757          *
758          * The syntax is the same as for the noNamespaceSchemaLocation attribute
759          * that may occur in an instance document: e.g."file_name.xsd".
760          *
761          * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
762          *
763          * @see #getExternalNoNamespaceSchemaLocation
764          */
765        void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
766
767        /**
768          * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
769          * It takes native char string as parameter
770          *
771          * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
772          *
773          * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
774          */
775        void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
776
777        /**
778          * This allows an application to set a SecurityManager on
779          * the parser; this object stores information that various
780          * components use to limit their consumption of system
781          * resources while processing documents.
782          *
783          * If this method is called more than once, only the last one takes effect.
784          * It may not be reset during a parse.
785          *
786          *
787          * @param securityManager  the SecurityManager instance to
788          * be used by this parser
789          *
790          * @see #getSecurityManager
791          */
792        void setSecurityManager(SecurityManager* const securityManager);
793
794        /** Set the raw buffer low water mark for this parser.
795          *
796          * If the number of available bytes in the raw buffer is less than
797          * the low water mark the parser will attempt to read more data before
798          * continuing parsing. By default the value for this parameter is 100
799          * bytes. You may want to set this parameter to 0 if you would like
800          * the parser to parse the available data immediately without
801          * potentially blocking while waiting for more date.
802          *
803          * @param lwm new low water mark
804          *
805          * @see #getSecurityManager
806          */
807        void setLowWaterMark(XMLSize_t lwm);
808
809        /** Set the 'Loading External DTD' flag
810          *
811          * This method allows users to enable or disable the loading of external DTD.
812          * When set to false, the parser will ignore any external DTD completely
813          * if the validationScheme is set to Val_Never.
814          *
815          * The parser's default state is: true.
816          *
817          * This flag is ignored if the validationScheme is set to Val_Always or Val_Auto.
818          *
819          * @param newState The value specifying whether external DTD should
820          *                 be loaded or not.
821          *
822          * @see #getLoadExternalDTD
823          * @see #setValidationScheme
824          */
825        void setLoadExternalDTD(const bool newState);
826
827        /** Set the 'Loading Schema' flag
828          *
829          * This method allows users to enable or disable the loading of schemas.
830          * When set to false, the parser not attempt to load schemas beyond
831          * querying the grammar pool for them.
832          *
833          * The parser's default state is: true.
834          *
835          * @param newState The value specifying whether schemas should
836          *                 be loaded if they're not found in the grammar
837          *                 pool.
838          *
839          * @see #getLoadSchema
840          * @see #setDoSchema
841          */
842        void setLoadSchema(const bool newState);
843
844        /** Set the 'Grammar caching' flag
845          *
846          * This method allows users to enable or disable caching of grammar when
847          * parsing XML documents. When set to true, the parser will cache the
848          * resulting grammar for use in subsequent parses.
849          *
850          * If the flag is set to true, the 'Use cached grammar' flag will also be
851          * set to true.
852          *
853          * The parser's default state is: false.
854          *
855          * @param newState The value specifying whether we should cache grammars
856          *                 or not.
857          *
858          * @see #isCachingGrammarFromParse
859          * @see #useCachedGrammarInParse
860          */
861        void cacheGrammarFromParse(const bool newState);
862
863        /** Set the 'Use cached grammar' flag
864          *
865          * This method allows users to enable or disable the use of cached
866          * grammars.  When set to true, the parser will use the cached grammar,
867          * instead of building the grammar from scratch, to validate XML
868          * documents.
869          *
870          * If the 'Grammar caching' flag is set to true, this method ignores the
871          * value passed in.
872          *
873          * The parser's default state is: false.
874          *
875          * @param newState The value specifying whether we should use the cached
876          *                 grammar or not.
877          *
878          * @see #isUsingCachedGrammarInParse
879          * @see #cacheGrammarFromParse
880          */
881        void useCachedGrammarInParse(const bool newState);
882
883        /** Enable/disable src offset calculation
884          *
885          * This method allows users to enable/disable src offset calculation.
886          * Disabling the calculation will improve performance.
887          *
888          * The parser's default state is: false.
889          *
890          * @param newState The value specifying whether we should enable or
891          *                 disable src offset calculation
892          *
893          * @see #getCalculateSrcOfs
894          */
895        void setCalculateSrcOfs(const bool newState);
896
897        /** Force standard uri
898          *
899          * This method allows users to tell the parser to force standard uri conformance.
900          *
901          * The parser's default state is: false.
902          *
903          * @param newState The value specifying whether the parser should reject malformed URI.
904          *
905          * @see #getStandardUriConformant
906          */
907        void setStandardUriConformant(const bool newState);
908
909        /** Set the scanner to use when scanning the XML document
910          *
911          * This method allows users to set the scanner to use
912          * when scanning a given XML document.
913          *
914          * @param scannerName The name of the desired scanner
915          */
916        void useScanner(const XMLCh* const scannerName);
917
918        /** Set maximum input buffer size
919          *
920          * This method allows users to limit the size of buffers used in parsing
921          * XML character data. The effect of setting this size is to limit the
922          * size of a ContentHandler::characters() call.
923          *
924          * The parser's default input buffer size is 1 megabyte.
925          *
926          * @param bufferSize The maximum input buffer size
927          */
928        void setInputBufferSize(const XMLSize_t bufferSize);
929
930        /** Set the 'ignore cached DTD grammar' flag
931          *
932          * This method gives users the option to ignore a cached DTD grammar, when
933          * an XML document contains both an internal and external DTD, and the use
934          * cached grammar from parse option is enabled. Currently, we do not allow
935          * using cached DTD grammar when an internal subset is present in the
936          * document. This option will only affect the behavior of the parser when
937          * an internal and external DTD both exist in a document (i.e. no effect
938          * if document has no internal subset).
939          *
940          * The parser's default state is false
941          *
942          * @param newValue The state to set
943          */
944        void setIgnoreCachedDTD(const bool newValue);
945
946        /** Set the 'ignore annotation' flag
947          *
948          * This method gives users the option to not generate XSAnnotations
949          * when "traversing" a schema.
950          *
951          * The parser's default state is false
952          *
953          * @param newValue The state to set
954          */
955        void setIgnoreAnnotations(const bool newValue);
956
957        /** Set the 'disable default entity resolution' flag
958          *
959          * This method gives users the option to not perform default entity
960          * resolution.  If the user's resolveEntity method returns NULL the
961          * parser will try to resolve the entity on its own.  When this option
962          * is set to true, the parser will not attempt to resolve the entity
963          * when the resolveEntity method returns NULL.
964          *
965          * The parser's default state is false
966          *
967          * @param newValue The state to set
968          *
969          * @see #EntityResolver
970          */
971        void setDisableDefaultEntityResolution(const bool newValue);
972
973        /** Set the 'skip DTD validation' flag
974          *
975          * This method gives users the option to skip DTD validation only when
976          * schema validation is on (i.e. when performing validation,  we will
977          * ignore the DTD, except for entities, when schema validation is enabled).
978          *
979          * NOTE: This option is ignored if schema validation is disabled.
980          *
981          * The parser's default state is false
982          *
983          * @param newValue The state to set
984          */
985        void setSkipDTDValidation(const bool newValue);
986
987        /** Set the 'handle multiple schema imports' flag
988          *
989          * This method gives users the ability to import multiple schemas that
990          * have the same namespace.
991          *
992          * NOTE: This option is ignored if schema validation is disabled.
993          *
994          * The parser's default state is false
995          *
996          * @param newValue The state to set
997          */
998        void setHandleMultipleImports(const bool newValue);
999        //@}
1000
1001
1002        // -----------------------------------------------------------------------
1003        //  Advanced document handler list maintenance methods
1004        // -----------------------------------------------------------------------
1005
1006        /** @name Advanced document handler list maintenance methods */
1007        //@{
1008        /**
1009          * This method installs the specified 'advanced' document callback
1010          * handler, thereby allowing the user to customize the processing,
1011          * if they choose to do so. Any number of advanced callback handlers
1012          * maybe installed.
1013          *
1014          * <p>The methods in the advanced callback interface represent
1015          * Xerces-C extensions. There is no specification for this interface.</p>
1016          *
1017          * Note - XMLDocumentHandler calls, when used with SAXParser, will not provide correct namespace information. This is becaue the SAX parser does not support namespace aware processing.
1018          *
1019          * @param toInstall A pointer to the users advanced callback handler.
1020          *
1021          * @see #removeAdvDocHandler
1022          */
1023        void installAdvDocHandler(XMLDocumentHandler* const toInstall);
1024
1025        /**
1026          * This method removes the 'advanced' document handler callback from
1027          * the underlying parser scanner. If no handler is installed, advanced
1028          * callbacks are not invoked by the scanner.
1029          * @param toRemove A pointer to the advanced callback handler which
1030          *                 should be removed.
1031          *
1032          * Note - XMLDocumentHandler calls, when used with SAXParser, will not provide correct namespace information. This is becaue the SAX parser does not support namespace aware processing.
1033          *
1034          * @see #installAdvDocHandler
1035          */
1036        bool removeAdvDocHandler(XMLDocumentHandler* const toRemove);
1037        //@}
1038
1039
1040        // -----------------------------------------------------------------------
1041        //  Progressive scan methods
1042        // -----------------------------------------------------------------------
1043
1044        /** @name Progressive scan methods */
1045        //@{
1046
1047        /** Begin a progressive parse operation
1048          *
1049          * This method is used to start a progressive parse on a XML file.
1050          * To continue parsing, subsequent calls must be to the parseNext
1051          * method.
1052          *
1053          * It scans through the prolog and returns a token to be used on
1054          * subsequent scanNext() calls. If the return value is true, then the
1055          * token is legal and ready for further use. If it returns false, then
1056          * the scan of the prolog failed and the token is not going to work on
1057          * subsequent scanNext() calls.
1058          *
1059          * @param systemId A pointer to a Unicode string representing the path
1060          *                 to the XML file to be parsed.
1061          * @param toFill   A token maintaing state information to maintain
1062          *                 internal consistency between invocation of 'parseNext'
1063          *                 calls.
1064          *
1065          * @return 'true', if successful in parsing the prolog. It indicates the
1066          *         user can go ahead with parsing the rest of the file. It
1067          *         returns 'false' to indicate that the parser could parse the
1068          *         prolog (which means the token will not be valid.)
1069          *
1070          * @see #parseNext
1071          * @see #parseFirst(char*,...)
1072          * @see #parseFirst(InputSource&,...)
1073          */
1074        bool parseFirst
1075        (
1076                const   XMLCh* const    systemId
1077                ,       XMLPScanToken&  toFill
1078        );
1079
1080        /** Begin a progressive parse operation
1081          *
1082          * This method is used to start a progressive parse on a XML file.
1083          * To continue parsing, subsequent calls must be to the parseNext
1084          * method.
1085          *
1086          * It scans through the prolog and returns a token to be used on
1087          * subsequent scanNext() calls. If the return value is true, then the
1088          * token is legal and ready for further use. If it returns false, then
1089          * the scan of the prolog failed and the token is not going to work on
1090          * subsequent scanNext() calls.
1091          *
1092          * @param systemId A pointer to a regular native string representing
1093          *                 the path to the XML file to be parsed.
1094          * @param toFill   A token maintaing state information to maintain
1095          *                 internal consistency between invocation of 'parseNext'
1096          *                 calls.
1097          *
1098          * @return 'true', if successful in parsing the prolog. It indicates the
1099          *         user can go ahead with parsing the rest of the file. It
1100          *         returns 'false' to indicate that the parser could not parse
1101          *         the prolog.
1102          *
1103          * @see #parseNext
1104          * @see #parseFirst(XMLCh*,...)
1105          * @see #parseFirst(InputSource&,...)
1106          */
1107        bool parseFirst
1108        (
1109                const   char* const     systemId
1110                ,       XMLPScanToken&  toFill
1111        );
1112
1113        /** Begin a progressive parse operation
1114          *
1115          * This method is used to start a progressive parse on a XML file.
1116          * To continue parsing, subsequent calls must be to the parseNext
1117          * method.
1118          *
1119          * It scans through the prolog and returns a token to be used on
1120          * subsequent scanNext() calls. If the return value is true, then the
1121          * token is legal and ready for further use. If it returns false, then
1122          * the scan of the prolog failed and the token is not going to work on
1123          * subsequent scanNext() calls.
1124          *
1125          * @param source   A const reference to the InputSource object which
1126          *                 points to the XML file to be parsed.
1127          * @param toFill   A token maintaing state information to maintain
1128          *                 internal consistency between invocation of 'parseNext'
1129          *                 calls.
1130          *
1131          * @return 'true', if successful in parsing the prolog. It indicates the
1132          *         user can go ahead with parsing the rest of the file. It
1133          *         returns 'false' to indicate that the parser could not parse
1134          *         the prolog.
1135          *
1136          * @see #parseNext
1137          * @see #parseFirst(XMLCh*,...)
1138          * @see #parseFirst(char*,...)
1139          */
1140        bool parseFirst
1141        (
1142                const   InputSource&    source
1143                ,       XMLPScanToken&  toFill
1144        );
1145
1146        /** Continue a progressive parse operation
1147          *
1148          * This method is used to continue with progressive parsing of
1149          * XML files started by a call to 'parseFirst' method.
1150          *
1151          * It parses the XML file and stops as soon as it comes across
1152          * a XML token (as defined in the XML specification). Relevant
1153          * callback handlers are invoked as required by the SAX
1154          * specification.
1155          *
1156          * @param token A token maintaing state information to maintain
1157          *              internal consistency between invocation of 'parseNext'
1158          *              calls.
1159          *
1160          * @return 'true', if successful in parsing the next XML token.
1161          *         It indicates the user can go ahead with parsing the rest
1162          *         of the file. It returns 'false' to indicate that the parser
1163          *         could not find next token as per the XML specification
1164          *         production rule.
1165          *
1166          * @see #parseFirst(XMLCh*,...)
1167          * @see #parseFirst(char*,...)
1168          * @see #parseFirst(InputSource&,...)
1169          */
1170        bool parseNext(XMLPScanToken& token);
1171
1172        /** Reset the parser after a progressive parse
1173          *
1174          * If a progressive parse loop exits before the end of the document
1175          * is reached, the parser has no way of knowing this. So it will leave
1176          * open any files or sockets or memory buffers that were in use at
1177          * the time that the parse loop exited.
1178          *
1179          * The next parse operation will cause these open files and such to
1180          * be closed, but the next parse operation might occur at some unknown
1181          * future point. To avoid this problem, you should reset the parser if
1182          * you exit the loop early.
1183          *
1184          * If you exited because of an error, then this cleanup will be done
1185          * for you. Its only when you exit the file prematurely of your own
1186          * accord, because you've found what you wanted in the file most
1187          * likely.
1188          *
1189          * @param token A token maintaing state information to maintain
1190          *              internal consistency between invocation of 'parseNext'
1191          *              calls.
1192          */
1193        void parseReset(XMLPScanToken& token);
1194
1195        //@}
1196
1197        // -----------------------------------------------------------------------
1198        //  Grammar preparsing interface
1199        // -----------------------------------------------------------------------
1200
1201        /** @name Implementation of Grammar preparsing interface's. */
1202        //@{
1203        /**
1204          * Preparse schema grammar (XML Schema, DTD, etc.) via an input source
1205          * object.
1206          *
1207          * This method invokes the preparsing process on a schema grammar XML
1208          * file specified by the SAX InputSource parameter. If the 'toCache' flag
1209          * is enabled, the parser will cache the grammars for re-use. If a grammar
1210          * key is found in the pool, no caching of any grammar will take place.
1211          *
1212          *
1213          * @param source A const reference to the SAX InputSource object which
1214          *               points to the schema grammar file to be preparsed.
1215          * @param grammarType The grammar type (Schema or DTD).
1216          * @param toCache If <code>true</code>, we cache the preparsed grammar,
1217          *                otherwise, no caching. Default is <code>false</code>.
1218          * @return The preparsed schema grammar object (SchemaGrammar or
1219          *         DTDGrammar). That grammar object is owned by the parser.
1220          *
1221          * @exception SAXException Any SAX exception, possibly
1222          *            wrapping another exception.
1223          * @exception XMLException An exception from the parser or client
1224          *            handler code.
1225          * @exception DOMException A DOM exception as per DOM spec.
1226          *
1227          * @see InputSource#InputSource
1228          */
1229        Grammar* loadGrammar(const InputSource& source,
1230                                                 const Grammar::GrammarType grammarType,
1231                                                 const bool toCache = false);
1232
1233        /**
1234          * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL
1235          *
1236          * This method invokes the preparsing process on a schema grammar XML
1237          * file specified by the file path parameter. If the 'toCache' flag
1238          * is enabled, the parser will cache the grammars for re-use. If a grammar
1239          * key is found in the pool, no caching of any grammar will take place.
1240          *
1241          *
1242          * @param systemId A const XMLCh pointer to the Unicode string which
1243          *                 contains the path to the XML grammar file to be
1244          *                 preparsed.
1245          * @param grammarType The grammar type (Schema or DTD).
1246          * @param toCache If <code>true</code>, we cache the preparsed grammar,
1247          *                otherwise, no caching. Default is <code>false</code>.
1248          * @return The preparsed schema grammar object (SchemaGrammar or
1249          *         DTDGrammar). That grammar object is owned by the parser.
1250          *
1251          * @exception SAXException Any SAX exception, possibly
1252          *            wrapping another exception.
1253          * @exception XMLException An exception from the parser or client
1254          *            handler code.
1255          * @exception DOMException A DOM exception as per DOM spec.
1256          */
1257        Grammar* loadGrammar(const XMLCh* const systemId,
1258                                                 const Grammar::GrammarType grammarType,
1259                                                 const bool toCache = false);
1260
1261        /**
1262          * Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL
1263          *
1264          * This method invokes the preparsing process on a schema grammar XML
1265          * file specified by the file path parameter. If the 'toCache' flag
1266          * is enabled, the parser will cache the grammars for re-use. If a grammar
1267          * key is found in the pool, no caching of any grammar will take place.
1268          *
1269          *
1270          * @param systemId A const char pointer to a native string which contains
1271          *                 the path to the XML grammar file to be preparsed.
1272          * @param grammarType The grammar type (Schema or DTD).
1273          * @param toCache If <code>true</code>, we cache the preparsed grammar,
1274          *                otherwise, no caching. Default is <code>false</code>.
1275          * @return The preparsed schema grammar object (SchemaGrammar or
1276          *         DTDGrammar). That grammar object is owned by the parser.
1277          *
1278          * @exception SAXException Any SAX exception, possibly
1279          *            wrapping another exception.
1280          * @exception XMLException An exception from the parser or client
1281          *            handler code.
1282          * @exception DOMException A DOM exception as per DOM spec.
1283          */
1284        Grammar* loadGrammar(const char* const systemId,
1285                                                 const Grammar::GrammarType grammarType,
1286                                                 const bool toCache = false);
1287
1288        /**
1289          * This method allows the user to reset the pool of cached grammars.
1290          */
1291        void resetCachedGrammarPool();
1292
1293        //@}
1294
1295
1296        // -----------------------------------------------------------------------
1297        //  Implementation of the SAX Parser interface
1298        // -----------------------------------------------------------------------
1299
1300        /** @name Implementation of SAX 1.0 Parser interface's. */
1301        //@{
1302        /**
1303          * This method invokes the parsing process on the XML file specified
1304          * by the InputSource parameter.
1305          *
1306          * @param source A const reference to the InputSource object which
1307          *               points to the XML file to be parsed.
1308          *
1309          * @see Parser#parse(InputSource)
1310          */
1311        virtual void parse(const InputSource& source);
1312
1313        /**
1314          * This method invokes the parsing process on the XML file specified by
1315          * the Unicode string parameter 'systemId'.
1316          *
1317          * @param systemId A const XMLCh pointer to the Unicode string which
1318          *                 contains the path to the XML file to be parsed.
1319          *
1320          * @see Parser#parse(XMLCh*)
1321          */
1322        virtual void parse(const XMLCh* const systemId);
1323
1324        /**
1325          * This method invokes the parsing process on the XML file specified by
1326          * the native char* string parameter 'systemId'.
1327          *
1328          * @param systemId A const char pointer to a native string which
1329          *                 contains the path to the XML file to be parsed.
1330          */
1331        virtual void parse(const char* const systemId);
1332
1333        /**
1334          * This method installs the user specified SAX Document Handler
1335          * callback function on parser.
1336          *
1337          * @param handler A pointer to the document handler to be called
1338          *                when the parser comes across 'document' events
1339          *                as per the SAX specification.
1340          *
1341          * @see Parser#parse(char*)
1342          */
1343        virtual void setDocumentHandler(DocumentHandler* const handler);
1344
1345        /**
1346          * This method installs the user specified DTD handler on the parser.
1347          *
1348          * @param handler A pointer to the DTD handler to be called
1349          *                when the parser comes across 'DTD' events
1350          *                as per the SAX specification.
1351          *
1352          * @see Parser#setDTDHandler
1353          */
1354        virtual void setDTDHandler(DTDHandler* const handler);
1355
1356        /**
1357          * This method installs the user specified error handler on
1358          * the parser.
1359          *
1360          * @param handler A pointer to the error handler to be called
1361          *                when the parser comes across 'error' events
1362          *                as per the SAX specification.
1363          *
1364          * @see Parser#setErrorHandler
1365          */
1366        virtual void setErrorHandler(ErrorHandler* const handler);
1367
1368        /**
1369          * This method installs the user specified PSVI handler on
1370          * the parser.
1371          *
1372          * @param handler A pointer to the PSVI handler to be called
1373          *                when the parser comes across 'PSVI' events
1374          *                as per the schema specification.
1375          *
1376          * @see Parser#setPSVIHandler
1377          */
1378        virtual void setPSVIHandler(PSVIHandler* const handler);
1379
1380        /**
1381          * This method installs the user specified entity resolver on the
1382          * parser. It allows applications to trap and redirect calls to
1383          * external entities.
1384          *
1385          * <i>Any previously set entity resolver is merely dropped, since the parser
1386          * does not own them.  If both setEntityResolver and setXMLEntityResolver
1387          * are called, then the last one is used.</i>
1388          *
1389          * @param resolver A pointer to the entity resolver to be called
1390          *                 when the parser comes across references to
1391          *                 entities in the XML file.
1392          *
1393          * @see Parser#setEntityResolver
1394          */
1395        virtual void setEntityResolver(EntityResolver* const resolver);
1396
1397        /**
1398          * This method installs the user specified entity resolver on the
1399          * parser. It allows applications to trap and redirect calls to
1400          * external entities.
1401          *
1402          * <i>Any previously set entity resolver is merely dropped, since the parser
1403          * does not own them.  If both setEntityResolver and setXMLEntityResolver
1404          * are called, then the last one is used.</i>
1405          *
1406          * @param resolver A pointer to the entity resolver to be called
1407          *                 when the parser comes across references to
1408          *                 entities in the XML file.
1409          *
1410          * @see Parser#setXMLEntityResolver
1411          */
1412        virtual void setXMLEntityResolver(XMLEntityResolver* const resolver);
1413
1414        //@}
1415
1416
1417        // -----------------------------------------------------------------------
1418        //  Implementation of the XMLDocumentHandler interface
1419        // -----------------------------------------------------------------------
1420
1421        /** @name Implementation of the XMLDocumentHandler Interface. */
1422        //@{
1423        /**
1424          * This method is used to report all the characters scanned
1425          * by the parser. The driver will invoke the 'characters'
1426          * method of the user installed SAX Document Handler.
1427          *
1428          * <p>If any advanced callback handlers are installed, the
1429          * corresponding 'docCharacters' method will also be invoked.</p>
1430          *
1431          * @param chars   A const pointer to a Unicode string representing the
1432          *                character data.
1433          * @param length  The length of the Unicode string returned in 'chars'.
1434          * @param cdataSection  A flag indicating if the characters represent
1435          *                      content from the CDATA section.
1436          * @see DocumentHandler#characters
1437          */
1438        virtual void docCharacters
1439        (
1440                const   XMLCh* const    chars
1441                , const XMLSize_t       length
1442                , const bool            cdataSection
1443        );
1444
1445        /**
1446          * This method is used to report any comments scanned by the parser.
1447          * This method is a no-op unless, unless an advanced callback handler
1448          * is installed, in which case the corresponding 'docComment' method
1449          * is invoked.
1450          *
1451          * @param comment A const pointer to a null terminated Unicode
1452          *                string representing the comment text.
1453          */
1454        virtual void docComment
1455        (
1456                const   XMLCh* const    comment
1457        );
1458
1459        /**
1460          * This method is used to report any PI scanned by the parser.
1461          *
1462          * <p>Any PI's occurring before any 'content' are not reported
1463          * to any SAX handler as per the specification. However, all
1464          * PI's within content are reported via the SAX Document Handler's
1465          * 'processingInstruction' method.
1466          *
1467          * <p>If any advanced callback handlers are installed, the
1468          * corresponding 'docPI' method will be invoked.</p>
1469          *
1470          * @param target A const pointer to a Unicode string representing the
1471          *               target of the PI declaration.
1472          * @param data   A const pointer to a Unicode string representing the
1473          *               data of the PI declaration. See the PI production rule
1474          *               in the XML specification for details.
1475          *
1476          * @see DocumentHandler#processingInstruction
1477          */
1478        virtual void docPI
1479        (
1480                const   XMLCh* const    target
1481                , const XMLCh* const    data
1482        );
1483
1484        /**
1485          * This method is used to indicate the end of root element
1486          * was just scanned by the parser. Corresponding 'endDocument'
1487          * method of the user installed SAX Document Handler will also
1488          * be invoked.
1489          *
1490          * <p>In addition, if any advanced callback handlers are installed,
1491          * the corresponding 'endDocument' method is invoked.</p>
1492          *
1493          * @see DocumentHandler#endDocument
1494          */
1495        virtual void endDocument();
1496
1497        /**
1498          * This method is used to indicate the end tag of an element.
1499          * The driver will invoke the corresponding 'endElement' method of
1500          * the SAX Document Handler interface.
1501          *
1502          * <p>If any advanced callback handlers are installed, the
1503          * corresponding 'endElement' method is also invoked.</p>
1504          *
1505          * @param elemDecl A const reference to the object containing element
1506          *                 declaration information.
1507          * @param urlId    An id referring to the namespace prefix, if
1508          *                 namespaces setting is switched on.
1509          * @param isRoot   A flag indicating whether this element was the
1510          *                 root element.
1511          * @param elemPrefix A const pointer to a Unicode string containing
1512          *                   the namespace prefix for this element. Applicable
1513          *                   only when namespace processing is enabled.
1514          * @see DocumentHandler#endElement
1515          */
1516        virtual void endElement
1517        (
1518                const   XMLElementDecl& elemDecl
1519                , const unsigned int    urlId
1520                , const bool            isRoot
1521                , const XMLCh* const    elemPrefix
1522        );
1523
1524        /**
1525          * This method is used to indicate that an end of an entity reference
1526          * was just scanned.
1527          *
1528          * <p>If any advanced callback handlers are installed, the
1529          * corresponding 'endEntityReference' method is invoked.</p>
1530          *
1531          * @param entDecl A const reference to the object containing the
1532          *                entity declaration information.
1533          */
1534        virtual void endEntityReference
1535        (
1536                const   XMLEntityDecl&  entDecl
1537        );
1538
1539        /**
1540          * This method is used to report all the whitespace characters,
1541          * which are determined to be 'ignorable'. This distinction
1542          * between characters is only made, if validation is enabled.
1543          * Corresponding 'ignorableWhitespace' method of the user installed
1544          * SAX Document Handler interface is called.
1545          *
1546          * <p>Any whitespace before content is not reported to the SAX
1547          * Document Handler method, as per the SAX specification.
1548          * However, if any advanced callback handlers are installed, the
1549          * corresponding 'ignorableWhitespace' method is invoked.</p>
1550          *
1551          * @param chars   A const pointer to a Unicode string representing the
1552          *                ignorable whitespace character data.
1553          * @param length  The length of the Unicode string 'chars'.
1554          * @param cdataSection  A flag indicating if the characters represent
1555          *                      content from the CDATA section.
1556          * @see DocumentHandler#ignorableWhitespace
1557          */
1558        virtual void ignorableWhitespace
1559        (
1560                const   XMLCh* const    chars
1561                , const XMLSize_t       length
1562                , const bool            cdataSection
1563        );
1564
1565        /**
1566          * This method allows the user installed Document Handler and
1567          * any advanced callback handlers to 'reset' themselves.
1568          */
1569        virtual void resetDocument();
1570
1571        /**
1572          * This method is used to report the start of the parsing process.
1573          * The corresponding user installed SAX Document Handler's method
1574          * 'startDocument' is invoked.
1575          *
1576          * <p>If any advanced callback handlers are installed, then the
1577          * corresponding 'startDocument' method is also called.</p>
1578          *
1579          * @see DocumentHandler#startDocument
1580          */
1581        virtual void startDocument();
1582
1583        /**
1584          * This method is used to report the start of an element. It is
1585          * called at the end of the element, by which time all attributes
1586          * specified are also parsed. The corresponding user installed
1587          * SAX Document Handler's method 'startElement' is invoked.
1588          *
1589          * <p>If any advanced callback handlers are installed, then the
1590          * corresponding 'startElement' method is also called.</p>
1591          *
1592          * @param elemDecl A const reference to the object containing element
1593          *                 declaration information.
1594          * @param urlId    An id referring to the namespace prefix, if
1595          *                 namespaces setting is switched on.
1596          * @param elemPrefix A const pointer to a Unicode string containing
1597          *                   the namespace prefix for this element. Applicable
1598          *                   only when namespace processing is enabled.
1599          * @param attrList  A const reference to the object containing the
1600          *                  list of attributes just scanned for this element.
1601          * @param attrCount A count of number of attributes in the list
1602          *                  specified by the parameter 'attrList'.
1603          * @param isEmpty  A flag indicating whether this is an empty element
1604          *                 or not.
1605          * @param isRoot   A flag indicating whether this element was the
1606          *                 root element.
1607          * @see DocumentHandler#startElement
1608          */
1609        virtual void startElement
1610        (
1611                const   XMLElementDecl&         elemDecl
1612                , const unsigned int            urlId
1613                , const XMLCh* const            elemPrefix
1614                , const RefVectorOf<XMLAttr>&   attrList
1615                , const XMLSize_t               attrCount
1616                , const bool                    isEmpty
1617                , const bool                    isRoot
1618        );
1619
1620        /**
1621          * This method is used to indicate the start of an entity reference.
1622          *
1623          * <p>If any advanced callback handlers are installed, the
1624          * corresponding 'endEntityReference' method is invoked.</p>
1625          *
1626          * @param entDecl A const reference to the object containing the
1627          *                entity declaration information.
1628          */
1629        virtual void startEntityReference
1630        (
1631                const   XMLEntityDecl&  entDecl
1632        );
1633
1634        /**
1635          * This method is used to report the XML decl scanned by the parser.
1636          * Refer to the XML specification to see the meaning of parameters.
1637          *
1638          * <b>This method is a no-op for this SAX driver
1639          * implementation.</b>
1640          *
1641          * @param versionStr A const pointer to a Unicode string representing
1642          *                   version string value.
1643          * @param encodingStr A const pointer to a Unicode string representing
1644          *                    the encoding string value.
1645          * @param standaloneStr A const pointer to a Unicode string
1646          *                      representing the standalone string value.
1647          * @param actualEncodingStr A const pointer to a Unicode string
1648          *                          representing the actual encoding string
1649          *                          value.
1650          */
1651        virtual void XMLDecl
1652        (
1653                const   XMLCh* const    versionStr
1654                , const XMLCh* const    encodingStr
1655                , const XMLCh* const    standaloneStr
1656                , const XMLCh* const    actualEncodingStr
1657        );
1658        //@}
1659
1660
1661        // -----------------------------------------------------------------------
1662        //  Implementation of the XMLErrorReporter interface
1663        // -----------------------------------------------------------------------
1664
1665        /** @name Implementation of the XMLErrorReporter Interface. */
1666        //@{
1667        /**
1668          * This method is used to report back errors found while parsing the
1669          * XML file. The driver will call the corresponding user installed
1670          * SAX Error Handler methods: 'fatal', 'error', 'warning' depending
1671          * on the severity of the error. This classification is defined by
1672          * the XML specification.
1673          *
1674          * @param errCode An integer code for the error.
1675          * @param msgDomain A const pointer to an Unicode string representing
1676          *                  the message domain to use.
1677          * @param errType An enumeration classifying the severity of the error.
1678          * @param errorText A const pointer to an Unicode string representing
1679          *                  the text of the error message.
1680          * @param systemId  A const pointer to an Unicode string representing
1681          *                  the system id of the XML file where this error
1682          *                  was discovered.
1683          * @param publicId  A const pointer to an Unicode string representing
1684          *                  the public id of the XML file where this error
1685          *                  was discovered.
1686          * @param lineNum   The line number where the error occurred.
1687          * @param colNum    The column number where the error occurred.
1688          * @see ErrorHandler
1689          */
1690        virtual void error
1691        (
1692                const   unsigned int                errCode
1693                , const XMLCh* const                msgDomain
1694                , const XMLErrorReporter::ErrTypes  errType
1695                , const XMLCh* const                errorText
1696                , const XMLCh* const                systemId
1697                , const XMLCh* const                publicId
1698                , const XMLFileLoc                  lineNum
1699                , const XMLFileLoc                  colNum
1700        );
1701
1702        /**
1703          * This method allows the user installed Error Handler
1704          * callback to 'reset' itself.
1705          *
1706          * <b>This method is a no-op for this SAX driver
1707          * implementation.</b>
1708          *
1709          */
1710        virtual void resetErrors();
1711        //@}
1712
1713
1714        // -----------------------------------------------------------------------
1715        //  Implementation of the XMLEntityHandler interface
1716        // -----------------------------------------------------------------------
1717
1718        /** @name Implementation of the XMLEntityHandler Interface. */
1719        //@{
1720        /**
1721          * This method is used to indicate the end of parsing of an external
1722          * entity file.
1723          *
1724          * <b>This method is a no-op for this SAX driver
1725          * implementation.</b>
1726          *
1727          * @param inputSource A const reference to the InputSource object
1728          *                    which points to the XML file being parsed.
1729          * @see InputSource
1730          */
1731        virtual void endInputSource(const InputSource& inputSource);
1732
1733        /**
1734          * This method allows an installed XMLEntityHandler to further
1735          * process any system id's of external entities encountered in
1736          * the XML file being parsed, such as redirection etc.
1737          *
1738          * <b>This method always returns 'false'
1739          * for this SAX driver implementation.</b>
1740          *
1741          * @param systemId  A const pointer to an Unicode string representing
1742          *                  the system id scanned by the parser.
1743          * @param toFill    A pointer to a buffer in which the application
1744          *                  processed system id is stored.
1745          * @return 'true', if any processing is done, 'false' otherwise.
1746          */
1747        virtual bool expandSystemId
1748        (
1749                const   XMLCh* const    systemId
1750                ,       XMLBuffer&      toFill
1751        );
1752
1753        /**
1754          * This method allows the installed XMLEntityHandler to reset
1755          * itself.
1756          *
1757          * <b>This method is a no-op for this SAX driver
1758          * implementation.</b>
1759          */
1760        virtual void resetEntities();
1761
1762        /** Resolve a public/system id
1763          *
1764          * This method allows a user installed entity handler to further
1765          * process any pointers to external entities. The applications can
1766          * implement 'redirection' via this callback.
1767          *
1768          * @param resourceIdentifier An object containing the type of
1769          *        resource to be resolved and the associated data members
1770          *        corresponding to this type.
1771          * @return The value returned by the user installed resolveEntity
1772          *         method or NULL otherwise to indicate no processing was done.
1773          *         The returned InputSource is owned by the parser which is
1774          *         responsible to clean up the memory.
1775          * @see XMLEntityHandler
1776          * @see XMLEntityResolver
1777          */
1778        virtual InputSource* resolveEntity
1779        (
1780                XMLResourceIdentifier* resourceIdentifier
1781        );
1782
1783        /**
1784          * This method is used to indicate the start of parsing an
1785          * external entity file.
1786          *
1787          * <b>This method is a no-op for this SAX driver
1788          * implementation.</b>
1789          *
1790          * @param inputSource A const reference to the InputSource object
1791          *                    which points to the external entity
1792          *                    being parsed.
1793          */
1794        virtual void startInputSource(const InputSource& inputSource);
1795        //@}
1796
1797
1798        // -----------------------------------------------------------------------
1799        //  Implementation of the Deprecated DocTypeHandler Interface
1800        // -----------------------------------------------------------------------
1801        /** @name Implementation of the deprecated DocTypeHandler Interface */
1802        //@{
1803        /**
1804          * This method is used to report an attribute definition.
1805          *
1806          * <b>This method is a no-op for this SAX
1807          * driver implementation.</b>
1808          *
1809          * @param elemDecl A const reference to the object containing information
1810          *                 about the element whose attribute definition was just
1811          *                 parsed.
1812          * @param attDef   A const reference to the object containing information
1813          *                 attribute definition.
1814          * @param ignore   The flag indicating whether this attribute definition
1815          *                 was ignored by the parser or not.
1816          */
1817        virtual void attDef
1818        (
1819                const   DTDElementDecl& elemDecl
1820                , const DTDAttDef&      attDef
1821                , const bool            ignore
1822        );
1823
1824        /**
1825          * This method is used to report a comment occurring within the DTD.
1826          *
1827          * <b>This method is a no-op for this SAX driver
1828          * implementation.</b>
1829          *
1830          * @param comment  A const pointer to a Unicode string representing the
1831          *                 text of the comment just parsed.
1832          */
1833        virtual void doctypeComment
1834        (
1835                const   XMLCh* const    comment
1836        );
1837
1838        /**
1839          * This method is used to report the DOCTYPE declaration.
1840          *
1841          * <b>This method is a no-op for this SAX driver
1842          * implementation.</b>
1843          *
1844          * @param elemDecl A const reference to the object containing information
1845          *                 about the root element definition declaration of the
1846          *                 XML document being parsed.
1847          * @param publicId A const pointer to a Unicode string representing the
1848          *                 public id of the DTD file.
1849          * @param systemId A const pointer to a Unicode string representing the
1850          *                 system id of the DTD file.
1851          * @param hasIntSubset A flag indicating if this XML file contains any
1852          *                     internal subset.
1853          * @param hasExtSubset A flag indicating if this XML file contains any
1854          *                     external subset. Default is false.
1855          */
1856        virtual void doctypeDecl
1857        (
1858                const   DTDElementDecl& elemDecl
1859                , const XMLCh* const    publicId
1860                , const XMLCh* const    systemId
1861                , const bool            hasIntSubset
1862                , const bool            hasExtSubset = false
1863        );
1864
1865        /**
1866          * This method is used to report any PI declarations
1867          * occurring inside the DTD definition block.
1868          *
1869          * <b>This method is a no-op for this SAX driver
1870          * implementation.</b>
1871          *
1872          * @param target A const pointer to a Unicode string representing the
1873          *               target of the PI declaration.
1874          * @param data   A const pointer to a Unicode string representing the
1875          *               data of the PI declaration. See the PI production rule
1876          *               in the XML specification for details.
1877          */
1878        virtual void doctypePI
1879        (
1880                const   XMLCh* const    target
1881                , const XMLCh* const    data
1882        );
1883
1884        /**
1885          * This method is used to report any whitespaces
1886          * occurring inside the DTD definition block.
1887          *
1888          * <b>This method is a no-op for this SAX driver
1889          * implementation.</b>
1890          *
1891          * @param chars  A const pointer to a Unicode string representing the
1892          *               whitespace characters.
1893          * @param length The length of the whitespace Unicode string.
1894          */
1895        virtual void doctypeWhitespace
1896        (
1897                const   XMLCh* const    chars
1898                , const XMLSize_t       length
1899        );
1900
1901        /**
1902          * This method is used to report an element declarations
1903          * successfully scanned by the parser.
1904          *
1905          * <b>This method is a no-op for this SAX driver
1906          * implementation.</b>
1907          *
1908          * @param decl   A const reference to the object containing element
1909          *               declaration information.
1910          * @param isIgnored The flag indicating whether this definition was
1911          *                  ignored by the parser or not.
1912          */
1913        virtual void elementDecl
1914        (
1915                const   DTDElementDecl& decl
1916                , const bool            isIgnored
1917        );
1918
1919        /**
1920          * This method is used to report the end of an attribute
1921          * list declaration for an element.
1922          *
1923          * <b>This method is a no-op for this SAX driver
1924          * implementation.</b>
1925          *
1926          * @param elemDecl A const reference to the object containing element
1927          *                 declaration information.
1928          */
1929        virtual void endAttList
1930        (
1931                const   DTDElementDecl& elemDecl
1932        );
1933
1934        /**
1935          * This method is used to report the end of the internal subset.
1936          *
1937          * <b>This method is a no-op for this SAX driver
1938          * implementation.</b>
1939          */
1940        virtual void endIntSubset();
1941
1942        /**
1943          * This method is used to report the end of the external subset.
1944          *
1945          * <b>This method is a no-op for this SAX driver
1946          * implementation.</b>
1947          */
1948        virtual void endExtSubset();
1949
1950        /**
1951          * This method is used to report any entity declarations.
1952          * For unparsed entities, this driver will invoke the
1953          * SAX DTDHandler::unparsedEntityDecl callback.
1954          *
1955          * @param entityDecl A const reference to the object containing
1956          *                   the entity declaration information.
1957          * @param isPEDecl  The flag indicating whether this was a
1958          *                  parameter entity declaration or not.
1959          * @param isIgnored The flag indicating whether this definition
1960          *                  was ignored by the parser or not.
1961          *
1962          * @see DTDHandler#unparsedEntityDecl
1963          */
1964        virtual void entityDecl
1965        (
1966                const   DTDEntityDecl&  entityDecl
1967                , const bool            isPEDecl
1968                , const bool            isIgnored
1969        );
1970
1971        /**
1972          * This method allows the user installed DTD handler to
1973          * reset itself.
1974          */
1975        virtual void resetDocType();
1976
1977        /**
1978          * This method is used to report any notation declarations.
1979          * If there is a user installed DTDHandler, then the driver will
1980          * invoke the SAX DTDHandler::notationDecl callback.
1981          *
1982          * @param notDecl A const reference to the object containing the notation
1983          *                declaration information.
1984          * @param isIgnored The flag indicating whether this definition was ignored
1985          *                  by the parser or not.
1986          *
1987          * @see DTDHandler#notationDecl
1988          */
1989        virtual void notationDecl
1990        (
1991                const   XMLNotationDecl&    notDecl
1992                , const bool                isIgnored
1993        );
1994
1995        /**
1996          * This method is used to indicate the start of an element's attribute
1997          * list declaration.
1998          *
1999          * <b>This method is a no-op for this SAX driver
2000          * implementation.</b>
2001          *
2002          * @param elemDecl A const reference to the object containing element
2003          *                 declaration information.
2004          */
2005        virtual void startAttList
2006        (
2007                const   DTDElementDecl& elemDecl
2008        );
2009
2010        /**
2011          * This method is used indicate the start of the internal subset.
2012          *
2013          * <b>This method is a no-op for this SAX driver
2014          * implementation.</b>
2015          */
2016        virtual void startIntSubset();
2017
2018        /**
2019          * This method is used indicate the start of the external subset.
2020          *
2021          * <b>This method is a no-op for this SAX driver
2022          * implementation.</b>
2023          */
2024        virtual void startExtSubset();
2025
2026        /**
2027          * This method is used to report the TextDecl. Refer to the XML
2028          * specification for the syntax of a TextDecl.
2029          *
2030          * <b>This method is a no-op for this SAX driver
2031          * implementation.</b>
2032          *
2033          * @param versionStr A const pointer to a Unicode string representing
2034          *                   the version number of the 'version' clause.
2035          * @param encodingStr A const pointer to a Unicode string representing
2036          *                    the encoding name of the 'encoding' clause.
2037          */
2038        virtual void TextDecl
2039        (
2040                const   XMLCh* const    versionStr
2041                , const XMLCh* const    encodingStr
2042        );
2043
2044        //@}
2045
2046protected :
2047        // -----------------------------------------------------------------------
2048        //  Protected Methods
2049        // -----------------------------------------------------------------------
2050        /**
2051          * This method returns a reference to the underlying scanner object.
2052          * It allows read only access to data maintained in the scanner.
2053          *
2054          * @return A const reference to the underlying scanner object.
2055          */
2056        const XMLScanner& getScanner() const;
2057
2058        /** Get the Grammar resolver
2059          *
2060          * This provides derived classes with access to the grammar resolver.
2061          */
2062        GrammarResolver* getGrammarResolver() const;
2063
2064    /** Called by the XMLParserImpl. This is a factory method to provide it with a templated version
2065      * of the XMLDocumentDisseminator; each of which is optimized for SAX, SAX2 or DOM, depending
2066      * on the parser being used.
2067      *
2068      */
2069    virtual XMLDocumentDisseminator * createDocumentDisseminator();
2070
2071private:
2072        // -----------------------------------------------------------------------
2073        //  Unimplemented constructors and operators
2074        // -----------------------------------------------------------------------
2075        SAXParser(const SAXParser&);
2076        SAXParser& operator=(const SAXParser&);
2077
2078        // -----------------------------------------------------------------------
2079        //  Initialize/Cleanup methods
2080        // -----------------------------------------------------------------------
2081        void initialize();
2082    void initialize(const XMLCh * const scannerName);
2083        void cleanUp();
2084        void resetInProgress();
2085
2086        // -----------------------------------------------------------------------
2087        //  Private data members
2088        //
2089        //  fAttrList
2090        //      A temporary implementation of the basic SAX attribute list
2091        //      interface. We use this one over and over on each startElement
2092        //      event to allow SAX-like access to the element attributes.
2093        //
2094        //  fDocHandler
2095        //      The installed SAX doc handler, if any. Null if none.
2096        //
2097        //  fDTDHandler
2098        //      The installed SAX DTD handler, if any. Null if none.
2099        //
2100        //  fElemDepth
2101        //      This is used to track the element nesting depth, so that we can
2102        //      know when we are inside content. This is so we can ignore char
2103        //      data outside of content.
2104        //
2105        //  fEntityResolver
2106        //      The installed SAX entity handler, if any. Null if none.
2107        //
2108        //  fErrorHandler
2109        //      The installed SAX error handler, if any. Null if none.
2110        //
2111        //  fPSVIHandler
2112        //      The installed PSVI handler, if any. Null if none.
2113        //
2114        //  fAdvDHCount
2115        //  fAdvDHList
2116        //  fAdvDHListSize
2117        //      This is an array of pointers to XMLDocumentHandlers, which is
2118        //      how we see installed advanced document handlers. There will
2119        //      usually not be very many at all, so a simple array is used
2120        //      instead of a collection, for performance. It will grow if needed,
2121        //      but that is unlikely.
2122        //
2123        //      The count is how many handlers are currently installed. The size
2124        //      is how big the array itself is (for expansion purposes.) When
2125        //      count == size, is time to expand.
2126        //
2127        //  fParseInProgress
2128        //      This flag is set once a parse starts. It is used to prevent
2129        //      multiple entrance or reentrance of the parser.
2130        //
2131        //  fScanner
2132        //      The scanner being used by this parser. It is created internally
2133        //      during construction.
2134        //
2135        //   fGrammarPool
2136        //      The grammar pool passed from external application (through derivatives).
2137        //      which could be 0, not owned.
2138        //
2139        // -----------------------------------------------------------------------
2140        bool                 fParseInProgress; 
2141        XMLSize_t            fAdvDHCount;
2142        XMLSize_t            fAdvDHListSize;   
2143        DocumentHandler*     fDocHandler;
2144        DTDHandler*          fDTDHandler;
2145        EntityResolver*      fEntityResolver;
2146        XMLEntityResolver*   fXMLEntityResolver;
2147        ErrorHandler*        fErrorHandler;
2148        PSVIHandler*         fPSVIHandler;
2149        XMLDocumentHandler** fAdvDHList;
2150        XMLScanner*          fScanner;
2151        GrammarResolver*     fGrammarResolver;
2152        XMLValidator*        fValidator;
2153        MemoryManager*       fMemoryManager;
2154        XMLGrammarPool*      fGrammarPool;
2155};
2156
2157// ---------------------------------------------------------------------------
2158//  SAXParser: Getter methods
2159// ---------------------------------------------------------------------------
2160inline DocumentHandler* SAXParser::getDocumentHandler()
2161{
2162        return fDocHandler;
2163}
2164
2165inline const DocumentHandler* SAXParser::getDocumentHandler() const
2166{
2167        return fDocHandler;
2168}
2169
2170inline EntityResolver* SAXParser::getEntityResolver()
2171{
2172        return fEntityResolver;
2173}
2174
2175inline XMLEntityResolver* SAXParser::getXMLEntityResolver()
2176{
2177        return fXMLEntityResolver;
2178}
2179
2180inline const XMLEntityResolver* SAXParser::getXMLEntityResolver() const
2181{
2182        return fXMLEntityResolver;
2183}
2184
2185inline const EntityResolver* SAXParser::getEntityResolver() const
2186{
2187        return fEntityResolver;
2188}
2189
2190inline ErrorHandler* SAXParser::getErrorHandler()
2191{
2192        return fErrorHandler;
2193}
2194
2195inline const ErrorHandler* SAXParser::getErrorHandler() const
2196{
2197        return fErrorHandler;
2198}
2199
2200inline PSVIHandler* SAXParser::getPSVIHandler()
2201{
2202        return fPSVIHandler;
2203}
2204
2205inline const PSVIHandler* SAXParser::getPSVIHandler() const
2206{
2207        return fPSVIHandler;
2208}
2209
2210inline const XMLScanner& SAXParser::getScanner() const
2211{
2212        return *fScanner;
2213}
2214
2215inline GrammarResolver* SAXParser::getGrammarResolver() const
2216{
2217        return fGrammarResolver;
2218}
2219
2220XERCES_CPP_NAMESPACE_END
2221
2222#endif
Note: See TracBrowser for help on using the repository browser.