22 #if !defined(XERCESC_INCLUDE_GUARD_SAXPARSER_HPP)
23 #define XERCESC_INCLUDE_GUARD_SAXPARSER_HPP
26 #include <xercesc/internal/VecAttrListImpl.hpp>
31 #include <xercesc/framework/XMLBuffer.hpp>
33 #include <xercesc/validators/common/Grammar.hpp>
34 #include <xercesc/validators/DTD/DocTypeHandler.hpp>
45 class GrammarResolver;
76 ,
public DocTypeHandler
225 ValSchemes getValidationScheme()
const;
237 bool getDoSchema()
const;
249 bool getValidationSchemaFullChecking()
const;
261 bool getIdentityConstraintChecking()
const;
273 int getErrorCount()
const;
284 bool getDoNamespaces()
const;
295 bool getExitOnFirstFatalError()
const;
307 bool getValidationConstraintFatal()
const;
328 XMLCh* getExternalSchemaLocation()
const;
349 XMLCh* getExternalNoNamespaceSchemaLocation()
const;
394 bool getLoadExternalDTD()
const;
407 bool getLoadSchema()
const;
419 bool isCachingGrammarFromParse()
const;
431 bool isUsingCachedGrammarInParse()
const;
444 bool getCalculateSrcOfs()
const;
456 bool getStandardUriConformant()
const;
464 Grammar* getGrammar(
const XMLCh*
const nameSpaceKey);
471 Grammar* getRootGrammar();
479 const XMLCh* getURIText(
unsigned int uriId)
const;
500 bool getGenerateSyntheticAnnotations()
const;
509 bool getValidateAnnotations()
const;
518 bool getIgnoreCachedDTD()
const;
527 bool getIgnoreAnnotations()
const;
536 bool getDisableDefaultEntityResolution()
const;
545 bool getSkipDTDValidation()
const;
554 bool getHandleMultipleImports()
const;
574 void setGenerateSyntheticAnnotations(
const bool newValue);
583 void setValidateAnnotations(
const bool newValue);
598 void setDoNamespaces(
const bool newState);
616 void setValidationScheme(
const ValSchemes newScheme);
633 void setDoSchema(
const bool newState);
651 void setValidationSchemaFullChecking(
const bool schemaFullChecking);
664 void setIdentityConstraintChecking(
const bool identityConstraintChecking);
681 void setExitOnFirstFatalError(
const bool newState);
702 void setValidationConstraintFatal(
const bool newState);
724 void setExternalSchemaLocation(
const XMLCh*
const schemaLocation);
734 void setExternalSchemaLocation(
const char*
const schemaLocation);
750 void setExternalNoNamespaceSchemaLocation(
const XMLCh*
const noNamespaceSchemaLocation);
760 void setExternalNoNamespaceSchemaLocation(
const char*
const noNamespaceSchemaLocation);
810 void setLoadExternalDTD(
const bool newState);
827 void setLoadSchema(
const bool newState);
846 void cacheGrammarFromParse(
const bool newState);
866 void useCachedGrammarInParse(
const bool newState);
880 void setCalculateSrcOfs(
const bool newState);
892 void setStandardUriConformant(
const bool newState);
901 void useScanner(
const XMLCh*
const scannerName);
913 void setInputBufferSize(
const XMLSize_t bufferSize);
929 void setIgnoreCachedDTD(
const bool newValue);
940 void setIgnoreAnnotations(
const bool newValue);
956 void setDisableDefaultEntityResolution(
const bool newValue);
970 void setSkipDTDValidation(
const bool newValue);
983 void setHandleMultipleImports(
const bool newValue);
1061 const XMLCh*
const systemId
1062 , XMLPScanToken& toFill
1094 const char*
const systemId
1095 , XMLPScanToken& toFill
1128 , XMLPScanToken& toFill
1155 bool parseNext(XMLPScanToken& token);
1178 void parseReset(XMLPScanToken& token);
1215 const Grammar::GrammarType grammarType,
1216 const bool toCache =
false);
1242 Grammar* loadGrammar(
const XMLCh*
const systemId,
1243 const Grammar::GrammarType grammarType,
1244 const bool toCache =
false);
1269 Grammar* loadGrammar(
const char*
const systemId,
1270 const Grammar::GrammarType grammarType,
1271 const bool toCache =
false);
1276 void resetCachedGrammarPool();
1307 virtual void parse(
const XMLCh*
const systemId);
1316 virtual void parse(
const char*
const systemId);
1363 virtual void setPSVIHandler(
PSVIHandler*
const handler);
1425 const XMLCh*
const chars
1427 ,
const bool cdataSection
1441 const XMLCh*
const comment
1465 const XMLCh*
const target
1466 ,
const XMLCh*
const data
1504 ,
const unsigned int urlId
1506 ,
const XMLCh*
const elemPrefix
1545 const XMLCh*
const chars
1547 ,
const bool cdataSection
1597 ,
const unsigned int urlId
1598 ,
const XMLCh*
const elemPrefix
1599 ,
const RefVectorOf<XMLAttr>& attrList
1601 ,
const bool isEmpty
1638 const XMLCh*
const versionStr
1639 ,
const XMLCh*
const encodingStr
1640 ,
const XMLCh*
const standaloneStr
1641 ,
const XMLCh*
const actualEncodingStr
1677 const unsigned int errCode
1678 ,
const XMLCh*
const msgDomain
1680 ,
const XMLCh*
const errorText
1681 ,
const XMLCh*
const systemId
1682 ,
const XMLCh*
const publicId
1734 const XMLCh*
const systemId
1804 const DTDElementDecl& elemDecl
1805 ,
const DTDAttDef& attDef
1818 virtual void doctypeComment
1820 const XMLCh*
const comment
1841 virtual void doctypeDecl
1843 const DTDElementDecl& elemDecl
1844 ,
const XMLCh*
const publicId
1845 ,
const XMLCh*
const systemId
1846 ,
const bool hasIntSubset
1847 ,
const bool hasExtSubset =
false
1863 virtual void doctypePI
1865 const XMLCh*
const target
1866 ,
const XMLCh*
const data
1880 virtual void doctypeWhitespace
1882 const XMLCh*
const chars
1898 virtual void elementDecl
1900 const DTDElementDecl& decl
1901 ,
const bool isIgnored
1914 virtual void endAttList
1916 const DTDElementDecl& elemDecl
1925 virtual void endIntSubset();
1933 virtual void endExtSubset();
1949 virtual void entityDecl
1951 const DTDEntityDecl& entityDecl
1952 ,
const bool isPEDecl
1953 ,
const bool isIgnored
1960 virtual void resetDocType();
1974 virtual void notationDecl
1977 ,
const bool isIgnored
1990 virtual void startAttList
1992 const DTDElementDecl& elemDecl
2001 virtual void startIntSubset();
2009 virtual void startExtSubset();
2023 virtual void TextDecl
2025 const XMLCh*
const versionStr
2026 ,
const XMLCh*
const encodingStr
2040 const XMLScanner& getScanner()
const;
2046 GrammarResolver* getGrammarResolver()
const;
2061 void resetInProgress();
2117 bool fParseInProgress;
2121 VecAttrListImpl fAttrList;
2129 XMLScanner* fScanner;
2130 GrammarResolver* fGrammarResolver;
2131 XMLStringPool* fURIStringPool;
2135 XMLBuffer fElemQNameBuf;
2154 return fEntityResolver;
2159 return fXMLEntityResolver;
2164 return fXMLEntityResolver;
2169 return fEntityResolver;
2174 return fErrorHandler;
2179 return fErrorHandler;
2184 return fPSVIHandler;
2189 return fPSVIHandler;
2199 return fGrammarResolver;
virtual void setEntityResolver(EntityResolver *const resolver)=0
Allow an application to register a custom entity resolver.
virtual void startEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when the scanner hits an entity reference.
Receive notification of general document events.
Definition: DocumentHandler.hpp:60
XMLUInt64 XMLFilePos
Definition: Xerces_autoconf_config.borland.hpp:111
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
virtual void error(const unsigned int errCode, const XMLCh *const errDomain, const ErrTypes type, const XMLCh *const errorText, const XMLCh *const systemId, const XMLCh *const publicId, const XMLFileLoc lineNum, const XMLFileLoc colNum)=0
Called to report errors from the scanner or validator.
virtual void endEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when a referenced entity's content ends.
virtual void resetEntities()=0
This method allows the entity handler to reset itself, so that it can be used again.
DocumentHandler * getDocumentHandler()
This method returns the installed document handler.
Definition: SAXParser.hpp:2142
virtual void parse(const InputSource &source)=0
Parse an XML document.
virtual void endInputSource(const InputSource &inputSource)=0
This method get called after the scanner has finished reading from the given input source while proce...
This abstract class defines a callback mechanism for the scanner.
Definition: XMLErrorReporter.hpp:42
Receive notification of basic DTD-related events.
Definition: DTDHandler.hpp:59
virtual void docComment(const XMLCh *const comment)=0
Receive notification of comments in the XML content being parsed.
virtual void setDTDHandler(DTDHandler *const handler)=0
Allow an application to register a DTD event handler.
#define PARSERS_EXPORT
Definition: XercesDefs.hpp:168
XMLUInt64 XMLFileLoc
Definition: Xerces_autoconf_config.borland.hpp:116
Definition: XMLGrammarPool.hpp:43
virtual void startElement(const XMLElementDecl &elemDecl, const unsigned int uriId, const XMLCh *const prefixName, const RefVectorOf< XMLAttr > &attrList, const XMLSize_t attrCount, const bool isEmpty, const bool isRoot)=0
Receive notification of a new start tag.
virtual void resetDocument()=0
Reset the document handler's state, if required.
virtual void resetErrors()=0
Called before a new parse event to allow the handler to reset.
const XMLScanner & getScanner() const
This method returns a reference to the underlying scanner object.
Definition: SAXParser.hpp:2192
Basic interface for resolving entities.
Definition: EntityResolver.hpp:86
This class represents the core information about a notation declaration that all validators must at l...
Definition: XMLNotationDecl.hpp:41
XMLEntityResolver * getXMLEntityResolver()
This method returns the installed entity resolver.
Definition: SAXParser.hpp:2157
virtual bool expandSystemId(const XMLCh *const systemId, XMLBuffer &toFill)=0
This method allows the passes the scanned systemId to the entity handler, thereby giving it a chance ...
Basic interface for SAX error handlers.
Definition: ErrorHandler.hpp:60
virtual void setErrorHandler(ErrorHandler *const handler)=0
Allow an application to register an error event handler.
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)=0
Receive notification of ignorable whitespace in element content.
ErrTypes
Definition: XMLErrorReporter.hpp:48
ValSchemes
ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.
Definition: SAXParser.hpp:90
virtual void setDocumentHandler(DocumentHandler *const handler)=0
Allow an application to register a document event handler.
This abstract class provides the interface for the scanner to return PSVI information to the applicat...
Definition: PSVIHandler.hpp:38
virtual void startDocument()=0
Receive notification of the start of a new document.
This abstract class provides the interface for the scanner to return XML document information up to t...
Definition: XMLDocumentHandler.hpp:42
Configurable memory manager.
Definition: MemoryManager.hpp:39
This class defines the core information of an element declaration.
Definition: XMLElementDecl.hpp:51
SIZE_T XMLSize_t
Definition: Xerces_autoconf_config.borland.hpp:86
virtual void docCharacters(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)=0
Receive notification of character data.
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
virtual void endElement(const XMLElementDecl &elemDecl, const unsigned int uriId, const bool isRoot, const XMLCh *const prefixName=0)=0
Receive notification of the end of an element.
Definition: XMLResourceIdentifier.hpp:95
virtual void startInputSource(const InputSource &inputSource)=0
This method will be called before the scanner starts reading from an input source while processing ex...
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
GrammarResolver * getGrammarResolver() const
Get the Grammar resolver.
Definition: SAXParser.hpp:2197
This abstract class provides the interface for all validators.
Definition: XMLValidator.hpp:52
PSVIHandler * getPSVIHandler()
This method returns the installed PSVI handler.
Definition: SAXParser.hpp:2182
This abstract class is a callback mechanism for the scanner.
Definition: XMLEntityHandler.hpp:43
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
Allow application to force the parser to behave in a security-conscious way.
Definition: SecurityManager.hpp:51
This class implements the SAX 'Parser' interface and should be used by applications wishing to parse ...
Definition: SAXParser.hpp:69
virtual void endDocument()=0
Receive notification after the scanner has parsed the end of the document.
virtual void XMLDecl(const XMLCh *const versionStr, const XMLCh *const encodingStr, const XMLCh *const standaloneStr, const XMLCh *const autoEncodingStr)=0
Receive notification of an XML declaration.
This class defines that core information that defines an XML entity, no matter what validator is used...
Definition: XMLEntityDecl.hpp:50
virtual void docPI(const XMLCh *const target, const XMLCh *const data)=0
Receive notification of PI's parsed in the XML content.
ErrorHandler * getErrorHandler()
This method returns the installed error handler.
Definition: SAXParser.hpp:2172
virtual InputSource * resolveEntity(XMLResourceIdentifier *resourceIdentifier)=0
This method allows the entity handler to provide customized application specific entity resolution...
EntityResolver * getEntityResolver()
This method returns the installed entity resolver.
Definition: SAXParser.hpp:2152
Basic interface for SAX (Simple API for XML) parsers.
Definition: Parser.hpp:60
Revised interface for resolving entities.
Definition: XMLEntityResolver.hpp:99