22 #if !defined(XERCESC_INCLUDE_GUARD_ABSTRACTDOMPARSER_HPP)
23 #define XERCESC_INCLUDE_GUARD_ABSTRACTDOMPARSER_HPP
30 #include <xercesc/util/ValueStackOf.hpp>
31 #include <xercesc/validators/DTD/DocTypeHandler.hpp>
33 #include <xercesc/validators/DTD/DTDElementDecl.hpp>
34 #include <xercesc/framework/XMLBufferMgr.hpp>
42 class DOMDocumentImpl;
43 class DOMDocumentTypeImpl;
46 class GrammarResolver;
60 ,
public DocTypeHandler
167 ValSchemes getValidationScheme()
const;
179 bool getDoSchema()
const;
191 bool getValidationSchemaFullChecking()
const;
203 bool getIdentityConstraintChecking()
const;
228 bool getDoNamespaces()
const;
242 bool getExitOnFirstFatalError()
const;
254 bool getValidationConstraintFatal()
const;
265 bool getCreateEntityReferenceNodes()
const;
277 bool getIncludeIgnorableWhitespace()
const;
298 XMLCh* getExternalSchemaLocation()
const;
319 XMLCh* getExternalNoNamespaceSchemaLocation()
const;
351 const XMLSize_t& getLowWaterMark()
const;
364 bool getLoadExternalDTD()
const;
377 bool getLoadSchema()
const;
387 bool getCreateCommentNodes()
const;
400 bool getCalculateSrcOfs()
const;
412 bool getStandardUriConformant()
const;
439 bool getCreateSchemaInfo()
const;
450 bool getDoXInclude()
const;
463 bool getGenerateSyntheticAnnotations()
const;
472 bool getValidateAnnotations()
const;
481 bool getIgnoreAnnotations()
const;
490 bool getDisableDefaultEntityResolution()
const;
499 bool getSkipDTDValidation()
const;
508 bool getHandleMultipleImports()
const;
529 void setGenerateSyntheticAnnotations(
const bool newValue);
538 void setValidateAnnotations(
const bool newValue);
554 void setDoNamespaces(
const bool newState);
572 void setExitOnFirstFatalError(
const bool newState);
593 void setValidationConstraintFatal(
const bool newState);
613 void setCreateEntityReferenceNodes(
const bool create);
636 void setIncludeIgnorableWhitespace(
const bool include);
654 void setValidationScheme(
const ValSchemes newScheme);
671 void setDoSchema(
const bool newState);
689 void setValidationSchemaFullChecking(
const bool schemaFullChecking);
704 void setIdentityConstraintChecking(
const bool newState);
726 void setExternalSchemaLocation(
const XMLCh*
const schemaLocation);
736 void setExternalSchemaLocation(
const char*
const schemaLocation);
752 void setExternalNoNamespaceSchemaLocation(
const XMLCh*
const noNamespaceSchemaLocation);
762 void setExternalNoNamespaceSchemaLocation(
const char*
const noNamespaceSchemaLocation);
812 void setLoadExternalDTD(
const bool newState);
829 void setLoadSchema(
const bool newState);
841 void setCreateCommentNodes(
const bool create);
855 void setCalculateSrcOfs(
const bool newState);
867 void setStandardUriConformant(
const bool newState);
876 void useScanner(
const XMLCh*
const scannerName);
885 void useImplementation(
const XMLCh*
const implementationFeatures);
895 virtual void setPSVIHandler(
PSVIHandler*
const handler);
906 void setCreateSchemaInfo(
const bool newState);
917 void setDoXInclude(
const bool newState);
928 void setIgnoreAnnotations(
const bool newValue);
944 void setDisableDefaultEntityResolution(
const bool newValue);
958 void setSkipDTDValidation(
const bool newValue);
971 void setHandleMultipleImports(
const bool newValue);
1015 void parse(
const XMLCh*
const systemId);
1032 void parse(
const char*
const systemId);
1062 const XMLCh*
const systemId
1063 , XMLPScanToken& toFill
1095 const char*
const systemId
1096 , XMLPScanToken& toFill
1129 , XMLPScanToken& toFill
1154 bool parseNext(XMLPScanToken& token);
1181 void parseReset(XMLPScanToken& token);
1204 const XMLCh*
const localName
1205 ,
const XMLCh*
const uri
1211 const XMLCh*
const localName
1212 ,
const XMLCh*
const uri
1228 const XMLCh*
const localName
1229 ,
const XMLCh*
const uri
1255 const XMLCh*
const chars
1257 ,
const bool cdataSection
1270 const XMLCh*
const comment
1287 const XMLCh*
const target
1288 ,
const XMLCh*
const data
1316 ,
const unsigned int urlId
1318 ,
const XMLCh*
const elemPrefix
1354 const XMLCh*
const chars
1356 ,
const bool cdataSection
1403 ,
const unsigned int urlId
1404 ,
const XMLCh*
const elemPrefix
1405 ,
const RefVectorOf<XMLAttr>& attrList
1407 ,
const bool isEmpty
1445 const XMLCh*
const versionStr
1446 ,
const XMLCh*
const encodingStr
1447 ,
const XMLCh*
const standaloneStr
1448 ,
const XMLCh*
const actualEncStr
1461 const DTDElementDecl& elemDecl
1462 ,
const DTDAttDef& attDef
1463 ,
const bool ignoring
1466 virtual void doctypeComment
1468 const XMLCh*
const comment
1471 virtual void doctypeDecl
1473 const DTDElementDecl& elemDecl
1474 ,
const XMLCh*
const publicId
1475 ,
const XMLCh*
const systemId
1476 ,
const bool hasIntSubset
1477 ,
const bool hasExtSubset =
false
1480 virtual void doctypePI
1482 const XMLCh*
const target
1483 ,
const XMLCh*
const data
1486 virtual void doctypeWhitespace
1488 const XMLCh*
const chars
1492 virtual void elementDecl
1494 const DTDElementDecl& decl
1495 ,
const bool isIgnored
1498 virtual void endAttList
1500 const DTDElementDecl& elemDecl
1503 virtual void endIntSubset();
1505 virtual void endExtSubset();
1507 virtual void entityDecl
1509 const DTDEntityDecl& entityDecl
1510 ,
const bool isPEDecl
1511 ,
const bool isIgnored
1514 virtual void resetDocType();
1516 virtual void notationDecl
1519 ,
const bool isIgnored
1522 virtual void startAttList
1524 const DTDElementDecl& elemDecl
1527 virtual void startIntSubset();
1529 virtual void startExtSubset();
1531 virtual void TextDecl
1533 const XMLCh*
const versionStr
1534 ,
const XMLCh*
const encodingStr
1548 const XMLCh* elemPrefix,
1549 const XMLCh* localName,
1550 const XMLCh* qName);
1553 virtual DOMAttr* createAttrNS (
const XMLCh* namespaceURI,
1554 const XMLCh* elemPrefix,
1555 const XMLCh* localName,
1556 const XMLCh* qName);
1608 XMLScanner* getScanner()
const;
1614 GrammarResolver* getGrammarResolver()
const;
1621 bool getParseInProgress()
const;
1642 void setCurrentNode(
DOMNode* toSet);
1658 void setParseInProgress(
const bool toSet);
1671 bool isDocumentAdopted()
const;
1682 void resetInProgress();
virtual void deallocate(void *p)=0
This method deallocates memory.
bool getParseInProgress() const
Get the parse in progress flag.
Definition: AbstractDOMParser.hpp:1804
virtual void handleElementPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)=0
Receive notification of the PSVI properties of an element.
DOMDocumentTypeImpl * fDocumentType
Definition: AbstractDOMParser.hpp:1777
DOMEntityImpl * fCurrentEntity
Definition: AbstractDOMParser.hpp:1775
GrammarResolver * fGrammarResolver
Definition: AbstractDOMParser.hpp:1779
XMLGrammarPool * fGrammarPool
Definition: AbstractDOMParser.hpp:1783
virtual void startEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when the scanner hits an entity reference.
The DOMAttr class refers to an attribute of an XML element.
Definition: DOMAttr.hpp:57
static char * replicate(const char *const toRep, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Replicates a string NOTE: The returned buffer is allocated with the MemoryManager.
XMLValidator * fValidator
Definition: AbstractDOMParser.hpp:1781
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
void setCurrentNode(DOMNode *toSet)
Set the current DOM node.
Definition: AbstractDOMParser.hpp:1888
virtual void endEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when a referenced entity's content ends.
This abstract class defines a callback mechanism for the scanner.
Definition: XMLErrorReporter.hpp:42
XMLScanner * getScanner() const
Get the XML scanner.
Definition: AbstractDOMParser.hpp:1809
virtual void docComment(const XMLCh *const comment)=0
Receive notification of comments in the XML content being parsed.
virtual void handlePartialElementPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)
Receive notification of partial PSVI properties of an element.
Definition: PSVIHandler.hpp:139
#define PARSERS_EXPORT
Definition: XercesDefs.hpp:168
bool fDoXInclude
Definition: AbstractDOMParser.hpp:1770
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.
This class implements the Document Object Model (DOM) interface.
Definition: AbstractDOMParser.hpp:54
virtual void resetDocument()=0
Reset the document handler's state, if required.
DOMNode * fCurrentNode
Definition: AbstractDOMParser.hpp:1774
void setCreateEntityReferenceNodes(const bool create)
Set the 'include entity references' flag.
Definition: AbstractDOMParser.hpp:1846
bool getCreateCommentNodes() const
Get the 'create comment node' flag.
Definition: AbstractDOMParser.hpp:1819
bool fCreateSchemaInfo
Definition: AbstractDOMParser.hpp:1769
This class represents the core information about a notation declaration that all validators must at l...
Definition: XMLNotationDecl.hpp:41
void setIncludeIgnorableWhitespace(const bool include)
Set the 'include ignorable whitespace' flag.
Definition: AbstractDOMParser.hpp:1851
void setParseInProgress(const bool toSet)
Set the parse in progress flag.
Definition: AbstractDOMParser.hpp:1893
void useImplementation(const XMLCh *const implementationFeatures)
Set the implementation to use when creating the document.
Definition: AbstractDOMParser.hpp:1861
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)=0
Receive notification of ignorable whitespace in element content.
The DOMDocument interface represents the entire XML document.
Definition: DOMDocument.hpp:64
MemoryManager * getMemoryManager() const
Definition: AbstractDOMParser.hpp:1880
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: DOMElement.hpp:66
void setCreateCommentNodes(const bool create)
Set the 'create comment nodes' flag.
Definition: AbstractDOMParser.hpp:1856
Definition: PSVIElement.hpp:41
This abstract class provides the interface for the scanner to return PSVI information to the applicat...
Definition: PSVIHandler.hpp:38
DOMNode * getCurrentNode()
Get the current DOM node.
Definition: AbstractDOMParser.hpp:1875
virtual void startDocument()=0
Receive notification of the start of a new document.
DOMDocumentImpl * fDocument
Definition: AbstractDOMParser.hpp:1776
XMLCh * fImplementationFeatures
Definition: AbstractDOMParser.hpp:1772
The DOMText interface inherits from DOMCharacterData and represents the textual content (termed chara...
Definition: DOMText.hpp:51
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
bool fCreateCommentNodes
Definition: AbstractDOMParser.hpp:1767
This class defines the core information of an element declaration.
Definition: XMLElementDecl.hpp:51
bool fDocumentAdoptedByUser
Definition: AbstractDOMParser.hpp:1768
SIZE_T XMLSize_t
Definition: Xerces_autoconf_config.borland.hpp:86
Definition: PSVIAttributeList.hpp:59
PSVIHandler * fPSVIHandler
Definition: AbstractDOMParser.hpp:1786
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.
bool getIncludeIgnorableWhitespace() const
Get the 'include ignorable whitespace' flag.
Definition: AbstractDOMParser.hpp:1799
bool getCreateEntityReferenceNodes() const
Get the 'include entity references' flag.
Definition: AbstractDOMParser.hpp:1794
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
This abstract class provides the interface for all validators.
Definition: XMLValidator.hpp:52
void setDoXInclude(const bool newState)
Set the 'do XInclude' flag.
Definition: AbstractDOMParser.hpp:1867
virtual void handleAttributesPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIAttributeList *psviAttributes)=0
Enables PSVI information about attributes to be passed back to the application.
bool fCreateEntityReferenceNodes
Definition: AbstractDOMParser.hpp:1763
MemoryManager * fMemoryManager
Definition: AbstractDOMParser.hpp:1782
bool fWithinElement
Definition: AbstractDOMParser.hpp:1765
XMLScanner * fScanner
Definition: AbstractDOMParser.hpp:1771
XMLBufferMgr fBufMgr
Definition: AbstractDOMParser.hpp:1784
PSVIHandler * getPSVIHandler()
This method returns the installed PSVI handler.
Definition: AbstractDOMParser.hpp:1824
This abstract class is a callback mechanism for the scanner.
Definition: XMLEntityHandler.hpp:43
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
bool getDoXInclude() const
Get the 'do XInclude' flag.
Definition: AbstractDOMParser.hpp:1839
Allow application to force the parser to behave in a security-conscious way.
Definition: SecurityManager.hpp:51
virtual void endDocument()=0
Receive notification after the scanner has parsed the end of the document.
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: DOMCDATASection.hpp:65
ValSchemes
ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.
Definition: AbstractDOMParser.hpp:77
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.
XMLStringPool * fURIStringPool
Definition: AbstractDOMParser.hpp:1780
bool fIncludeIgnorableWhitespace
Definition: AbstractDOMParser.hpp:1764
XMLBuffer & fInternalSubset
Definition: AbstractDOMParser.hpp:1785
bool getCreateSchemaInfo() const
Get the 'associate schema info' flag.
Definition: AbstractDOMParser.hpp:1834
This class defines that core information that defines an XML entity, no matter what validator is used...
Definition: XMLEntityDecl.hpp:50
GrammarResolver * getGrammarResolver() const
Get the Grammar resolver.
Definition: AbstractDOMParser.hpp:1814
virtual void docPI(const XMLCh *const target, const XMLCh *const data)=0
Receive notification of PI's parsed in the XML content.
DOMNode * fCurrentParent
Definition: AbstractDOMParser.hpp:1773
bool fParseInProgress
Definition: AbstractDOMParser.hpp:1766
RefVectorOf< DOMDocumentImpl > * fDocumentVector
Definition: AbstractDOMParser.hpp:1778