Xerces-C++ 3.2.5

AbstractDOMParser.hpp
Go to the documentation of this file.
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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_ABSTRACTDOMPARSER_HPP)
23#define XERCESC_INCLUDE_GUARD_ABSTRACTDOMPARSER_HPP
24
25#include <xercesc/dom/DOMDocument.hpp>
26#include <xercesc/framework/XMLDocumentHandler.hpp>
27#include <xercesc/framework/XMLErrorReporter.hpp>
28#include <xercesc/framework/XMLEntityHandler.hpp>
29#include <xercesc/util/SecurityManager.hpp>
30#include <xercesc/util/ValueStackOf.hpp>
31#include <xercesc/validators/DTD/DocTypeHandler.hpp>
32#include <xercesc/dom/DOMDocumentType.hpp>
33#include <xercesc/validators/DTD/DTDElementDecl.hpp>
34#include <xercesc/framework/XMLBufferMgr.hpp>
35#include <xercesc/framework/psvi/PSVIHandler.hpp>
36
37 XERCES_CPP_NAMESPACE_BEGIN
38
39 class XMLPScanToken;
40 class XMLScanner;
41 class XMLValidator;
42 class DOMDocumentImpl;
43 class DOMDocumentTypeImpl;
44 class DOMEntityImpl;
45 class DOMElement;
46 class GrammarResolver;
47 class XMLGrammarPool;
48 class PSVIHandler;
49
54 class PARSERS_EXPORT AbstractDOMParser :
55
56 public XMemory
57 , public XMLDocumentHandler
58 , public XMLErrorReporter
59 , public XMLEntityHandler
60 , public DocTypeHandler
61 , public PSVIHandler
62{
63public :
64 // -----------------------------------------------------------------------
65 // Class types
66 // -----------------------------------------------------------------------
69
77 enum ValSchemes
78 {
79 Val_Never
80 , Val_Always
81 , Val_Auto
82 };
83
85
86
87 // -----------------------------------------------------------------------
88 // Constructors and Destructor
89 // -----------------------------------------------------------------------
92
96 virtual ~AbstractDOMParser();
97
99
100 // -----------------------------------------------------------------------
101 // Utility methods
102 // -----------------------------------------------------------------------
103
111 void reset();
112
126 DOMDocument* adoptDocument();
127
129
130
131 // -----------------------------------------------------------------------
132 // Getter methods
133 // -----------------------------------------------------------------------
134
137
149 DOMDocument* getDocument();
150
158 const XMLValidator& getValidator() const;
159
167 ValSchemes getValidationScheme() const;
168
179 bool getDoSchema() const;
180
191 bool getValidationSchemaFullChecking() const;
192
203 bool getIdentityConstraintChecking() const;
204
216 XMLSize_t getErrorCount() const;
217
228 bool getDoNamespaces() const;
229
242 bool getExitOnFirstFatalError() const;
243
254 bool getValidationConstraintFatal() const;
255
265 bool getCreateEntityReferenceNodes()const;
266
277 bool getIncludeIgnorableWhitespace() const;
278
298 XMLCh* getExternalSchemaLocation() const;
299
319 XMLCh* getExternalNoNamespaceSchemaLocation() const;
320
336 SecurityManager* getSecurityManager() const;
337
351 const XMLSize_t& getLowWaterMark() const;
352
365 bool getDisallowDoctype() const;
366
379 bool getLoadExternalDTD() const;
380
392 bool getLoadSchema() const;
393
402 bool getCreateCommentNodes()const;
403
415 bool getCalculateSrcOfs() const;
416
427 bool getStandardUriConformant() const;
428
435 PSVIHandler* getPSVIHandler();
436
443 const PSVIHandler* getPSVIHandler() const;
444
454 bool getCreateSchemaInfo() const;
455
465 bool getDoXInclude() const;
466
478 bool getGenerateSyntheticAnnotations() const;
479
487 bool getValidateAnnotations() const;
488
496 bool getIgnoreAnnotations() const;
497
505 bool getDisableDefaultEntityResolution() const;
506
514 bool getSkipDTDValidation() const;
515
523 bool getHandleMultipleImports() const;
525
526
527 // -----------------------------------------------------------------------
528 // Setter methods
529 // -----------------------------------------------------------------------
530
544 void setGenerateSyntheticAnnotations(const bool newValue);
545
553 void setValidateAnnotations(const bool newValue);
554
569 void setDoNamespaces(const bool newState);
570
587 void setExitOnFirstFatalError(const bool newState);
588
608 void setValidationConstraintFatal(const bool newState);
609
628 void setCreateEntityReferenceNodes(const bool create);
629
651 void setIncludeIgnorableWhitespace(const bool include);
652
669 void setValidationScheme(const ValSchemes newScheme);
670
686 void setDoSchema(const bool newState);
687
704 void setValidationSchemaFullChecking(const bool schemaFullChecking);
705
719 void setIdentityConstraintChecking(const bool newState);
720
741 void setExternalSchemaLocation(const XMLCh* const schemaLocation);
742
751 void setExternalSchemaLocation(const char* const schemaLocation);
752
767 void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
768
777 void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
778
794 void setSecurityManager(SecurityManager* const securityManager);
795
809 void setLowWaterMark(XMLSize_t lwm);
810
826 void setDisallowDoctype(const bool newState);
827
845 void setLoadExternalDTD(const bool newState);
846
862 void setLoadSchema(const bool newState);
863
874 void setCreateCommentNodes(const bool create);
875
888 void setCalculateSrcOfs(const bool newState);
889
900 void setStandardUriConformant(const bool newState);
901
909 void useScanner(const XMLCh* const scannerName);
910
918 void useImplementation(const XMLCh* const implementationFeatures);
919
928 virtual void setPSVIHandler(PSVIHandler* const handler);
929
939 void setCreateSchemaInfo(const bool newState);
940
950 void setDoXInclude(const bool newState);
951
961 void setIgnoreAnnotations(const bool newValue);
962
977 void setDisableDefaultEntityResolution(const bool newValue);
978
991 void setSkipDTDValidation(const bool newValue);
992
1004 void setHandleMultipleImports(const bool newValue);
1006
1007
1008 // -----------------------------------------------------------------------
1009 // Parsing methods
1010 // -----------------------------------------------------------------------
1011
1014
1030 void parse(const InputSource& source);
1031
1048 void parse(const XMLCh* const systemId);
1049
1065 void parse(const char* const systemId);
1066
1093 bool parseFirst
1094 (
1095 const XMLCh* const systemId
1096 , XMLPScanToken& toFill
1097 );
1098
1126 bool parseFirst
1127 (
1128 const char* const systemId
1129 , XMLPScanToken& toFill
1130 );
1131
1159 bool parseFirst
1160 (
1161 const InputSource& source
1162 , XMLPScanToken& toFill
1163 );
1164
1187 bool parseNext(XMLPScanToken& token);
1188
1214 void parseReset(XMLPScanToken& token);
1215
1217
1218 // -----------------------------------------------------------------------
1219 // Implementation of the PSVIHandler interface.
1220 // -----------------------------------------------------------------------
1221
1224
1235 virtual void handleElementPSVI
1236 (
1237 const XMLCh* const localName
1238 , const XMLCh* const uri
1239 , PSVIElement * elementInfo
1240 );
1241
1242 virtual void handlePartialElementPSVI
1243 (
1244 const XMLCh* const localName
1245 , const XMLCh* const uri
1246 , PSVIElement * elementInfo
1247 );
1259 virtual void handleAttributesPSVI
1260 (
1261 const XMLCh* const localName
1262 , const XMLCh* const uri
1263 , PSVIAttributeList * psviAttributes
1264 );
1266
1267 // -----------------------------------------------------------------------
1268 // Implementation of the XMLDocumentHandler interface.
1269 // -----------------------------------------------------------------------
1270
1273
1286 virtual void docCharacters
1287 (
1288 const XMLCh* const chars
1289 , const XMLSize_t length
1290 , const bool cdataSection
1291 );
1292
1301 virtual void docComment
1302 (
1303 const XMLCh* const comment
1304 );
1305
1318 virtual void docPI
1319 (
1320 const XMLCh* const target
1321 , const XMLCh* const data
1322 );
1323
1328 virtual void endDocument();
1329
1346 virtual void endElement
1347 (
1348 const XMLElementDecl& elemDecl
1349 , const unsigned int urlId
1350 , const bool isRoot
1351 , const XMLCh* const elemPrefix
1352 );
1353
1362 virtual void endEntityReference
1363 (
1364 const XMLEntityDecl& entDecl
1365 );
1366
1385 virtual void ignorableWhitespace
1386 (
1387 const XMLCh* const chars
1388 , const XMLSize_t length
1389 , const bool cdataSection
1390 );
1391
1398 virtual void resetDocument();
1399
1404 virtual void startDocument();
1405
1433 virtual void startElement
1434 (
1435 const XMLElementDecl& elemDecl
1436 , const unsigned int urlId
1437 , const XMLCh* const elemPrefix
1438 , const RefVectorOf<XMLAttr>& attrList
1439 , const XMLSize_t attrCount
1440 , const bool isEmpty
1441 , const bool isRoot
1442 );
1443
1453 virtual void startEntityReference
1454 (
1455 const XMLEntityDecl& entDecl
1456 );
1457
1476 virtual void XMLDecl
1477 (
1478 const XMLCh* const versionStr
1479 , const XMLCh* const encodingStr
1480 , const XMLCh* const standaloneStr
1481 , const XMLCh* const actualEncStr
1482 );
1483
1485
1486
1487 // -----------------------------------------------------------------------
1488 // Implementation of the deprecated DocTypeHandler interface.
1489 // -----------------------------------------------------------------------
1492 virtual void attDef
1493 (
1494 const DTDElementDecl& elemDecl
1495 , const DTDAttDef& attDef
1496 , const bool ignoring
1497 );
1498
1499 virtual void doctypeComment
1500 (
1501 const XMLCh* const comment
1502 );
1503
1504 virtual void doctypeDecl
1505 (
1506 const DTDElementDecl& elemDecl
1507 , const XMLCh* const publicId
1508 , const XMLCh* const systemId
1509 , const bool hasIntSubset
1510 , const bool hasExtSubset = false
1511 );
1512
1513 virtual void doctypePI
1514 (
1515 const XMLCh* const target
1516 , const XMLCh* const data
1517 );
1518
1519 virtual void doctypeWhitespace
1520 (
1521 const XMLCh* const chars
1522 , const XMLSize_t length
1523 );
1524
1525 virtual void elementDecl
1526 (
1527 const DTDElementDecl& decl
1528 , const bool isIgnored
1529 );
1530
1531 virtual void endAttList
1532 (
1533 const DTDElementDecl& elemDecl
1534 );
1535
1536 virtual void endIntSubset();
1537
1538 virtual void endExtSubset();
1539
1540 virtual void entityDecl
1541 (
1542 const DTDEntityDecl& entityDecl
1543 , const bool isPEDecl
1544 , const bool isIgnored
1545 );
1546
1547 virtual void resetDocType();
1548
1549 virtual void notationDecl
1550 (
1551 const XMLNotationDecl& notDecl
1552 , const bool isIgnored
1553 );
1554
1555 virtual void startAttList
1556 (
1557 const DTDElementDecl& elemDecl
1558 );
1559
1560 virtual void startIntSubset();
1561
1562 virtual void startExtSubset();
1563
1564 virtual void TextDecl
1565 (
1566 const XMLCh* const versionStr
1567 , const XMLCh* const encodingStr
1568 );
1569
1571
1572 protected:
1573 // DOM node creation hooks. Override them if you are using your own
1574 // DOM node types.
1575 //
1576 virtual DOMCDATASection* createCDATASection (const XMLCh*, XMLSize_t);
1577 virtual DOMText* createText (const XMLCh*, XMLSize_t);
1578
1579 virtual DOMElement* createElement (const XMLCh* name);
1580 virtual DOMElement* createElementNS (const XMLCh* namespaceURI,
1581 const XMLCh* elemPrefix,
1582 const XMLCh* localName,
1583 const XMLCh* qName);
1584
1585 virtual DOMAttr* createAttr (const XMLCh* name);
1586 virtual DOMAttr* createAttrNS (const XMLCh* namespaceURI,
1587 const XMLCh* elemPrefix,
1588 const XMLCh* localName,
1589 const XMLCh* qName);
1590
1591
1592
1593
1594protected :
1595 // -----------------------------------------------------------------------
1596 // Protected Constructor Methods
1597 // -----------------------------------------------------------------------
1616 AbstractDOMParser
1617 (
1618 XMLValidator* const valToAdopt = 0
1619 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
1620 , XMLGrammarPool* const gramPool = 0
1621 );
1622
1624
1625 // -----------------------------------------------------------------------
1626 // Protected getter methods
1627 // -----------------------------------------------------------------------
1635 DOMNode* getCurrentNode();
1636
1641 XMLScanner* getScanner() const;
1642
1647 GrammarResolver* getGrammarResolver() const;
1648
1654 bool getParseInProgress() const;
1655
1656 MemoryManager* getMemoryManager() const;
1657
1659
1660
1661 // -----------------------------------------------------------------------
1662 // Protected setter methods
1663 // -----------------------------------------------------------------------
1664
1667
1675 void setCurrentNode(DOMNode* toSet);
1676
1683 void setDocument(DOMDocument* toSet);
1684
1691 void setParseInProgress(const bool toSet);
1693
1694 // -----------------------------------------------------------------------
1695 // Protected Helper methods
1696 // -----------------------------------------------------------------------
1699 void resetPool();
1700
1704 bool isDocumentAdopted() const;
1705
1707
1708
1709private :
1710 // -----------------------------------------------------------------------
1711 // Initialize/Cleanup methods
1712 // -----------------------------------------------------------------------
1713 void initialize();
1714 void cleanUp();
1715 void resetInProgress();
1716
1717 // -----------------------------------------------------------------------
1718 // Unimplemented constructors and operators
1719 // -----------------------------------------------------------------------
1720 AbstractDOMParser(const AbstractDOMParser&);
1721 AbstractDOMParser& operator=(const AbstractDOMParser&);
1722
1723 protected:
1724 // -----------------------------------------------------------------------
1725 // Protected data members
1726 //
1727 // fCurrentNode
1728 // fCurrentParent
1729 // Used to track the current node during nested element events. Since
1730 // the tree must be built from a set of disjoint callbacks, we need
1731 // these to keep up with where we currently are.
1732 //
1733 // fCurrentEntity
1734 // Used to track the current entity decl. If a text decl is seen later on,
1735 // it is used to update the encoding and version information.
1736 //
1737 // fDocument
1738 // The root document object, filled with the document contents.
1739 //
1740 // fCreateEntityReferenceNodes
1741 // Indicates whether entity reference nodes should be created.
1742 //
1743 // fIncludeIgnorableWhitespace
1744 // Indicates whether ignorable whitespace should be added to
1745 // the DOM tree for validating parsers.
1746 //
1747 // fScanner
1748 // The scanner used for this parser. This is created during the
1749 // constructor.
1750 //
1751 // fImplementationFeatures
1752 // The implementation features that we use to get an implementation
1753 // for use in creating the DOMDocument used during parse. If this is
1754 // null then the default DOMImplementation is used
1755 //
1756 // fParseInProgress
1757 // Used to prevent multiple entrance to the parser while its doing
1758 // a parse.
1759 //
1760 // fWithinElement
1761 // A flag to indicate that the parser is within at least one level
1762 // of element processing.
1763 //
1764 // fDocumentType
1765 // Used to store and update the documentType variable information
1766 // in fDocument
1767 //
1768 // fDocumentVector
1769 // Store all the previous fDocument(s) (thus not the current fDocument)
1770 // created in this parser. It is destroyed when the parser is destructed.
1771 //
1772 // fCreateCommentNodes
1773 // Indicates whether comment nodes should be created.
1774 //
1775 // fDocumentAdoptedByUser
1776 // The DOMDocument ownership has been transferred to application
1777 // If set to true, the parser does not own the document anymore
1778 // and thus will not release its memory.
1779 //
1780 // fInternalSubset
1781 // Buffer for storing the internal subset information.
1782 // Once complete (after DOCTYPE is finished scanning), send
1783 // it to DocumentType Node
1784 //
1785 // fGrammarPool
1786 // The grammar pool passed from external application (through derivatives).
1787 // which could be 0, not owned.
1788 //
1789 // fCreateSchemaInfo
1790 // Indicates whether element and attributes will have schema info associated
1791 //
1792 // fDoXinclude
1793 // A bool used to request that XInlcude processing occur on the
1794 // Document the parser parses.
1795 // -----------------------------------------------------------------------
1796 bool fCreateEntityReferenceNodes;
1797 bool fIncludeIgnorableWhitespace;
1798 bool fWithinElement;
1799 bool fParseInProgress;
1800 bool fCreateCommentNodes;
1801 bool fDocumentAdoptedByUser;
1802 bool fCreateSchemaInfo;
1803 bool fDoXInclude;
1804 XMLScanner* fScanner;
1805 XMLCh* fImplementationFeatures;
1806 DOMNode* fCurrentParent;
1807 DOMNode* fCurrentNode;
1808 DOMEntityImpl* fCurrentEntity;
1809 DOMDocumentImpl* fDocument;
1810 DOMDocumentTypeImpl* fDocumentType;
1811 RefVectorOf<DOMDocumentImpl>* fDocumentVector;
1812 GrammarResolver* fGrammarResolver;
1813 XMLStringPool* fURIStringPool;
1814 XMLValidator* fValidator;
1815 MemoryManager* fMemoryManager;
1816 XMLGrammarPool* fGrammarPool;
1817 XMLBufferMgr fBufMgr;
1818 XMLBuffer& fInternalSubset;
1819 PSVIHandler* fPSVIHandler;
1820};
1821
1822
1823
1824// ---------------------------------------------------------------------------
1825// AbstractDOMParser: Getter methods
1826// ---------------------------------------------------------------------------
1827 inline bool AbstractDOMParser::getCreateEntityReferenceNodes() const
1828{
1829 return fCreateEntityReferenceNodes;
1830}
1831
1832 inline bool AbstractDOMParser::getIncludeIgnorableWhitespace() const
1833{
1834 return fIncludeIgnorableWhitespace;
1835}
1836
1837 inline bool AbstractDOMParser::getParseInProgress() const
1838{
1839 return fParseInProgress;
1840}
1841
1842 inline XMLScanner* AbstractDOMParser::getScanner() const
1843{
1844 return fScanner;
1845}
1846
1847 inline GrammarResolver* AbstractDOMParser::getGrammarResolver() const
1848{
1849 return fGrammarResolver;
1850}
1851
1852 inline bool AbstractDOMParser::getCreateCommentNodes() const
1853{
1854 return fCreateCommentNodes;
1855}
1856
1857 inline PSVIHandler* AbstractDOMParser::getPSVIHandler()
1858{
1859 return fPSVIHandler;
1860}
1861
1862 inline const PSVIHandler* AbstractDOMParser::getPSVIHandler() const
1863{
1864 return fPSVIHandler;
1865}
1866
1867 inline bool AbstractDOMParser::getCreateSchemaInfo() const
1868{
1869 return fCreateSchemaInfo;
1870}
1871
1872 inline bool AbstractDOMParser::getDoXInclude() const
1873{
1874 return fDoXInclude;
1875}
1876// ---------------------------------------------------------------------------
1877// AbstractDOMParser: Setter methods
1878// ---------------------------------------------------------------------------
1879 inline void AbstractDOMParser::setCreateEntityReferenceNodes(const bool create)
1880{
1881 fCreateEntityReferenceNodes = create;
1882}
1883
1884 inline void AbstractDOMParser::setIncludeIgnorableWhitespace(const bool include)
1885{
1886 fIncludeIgnorableWhitespace = include;
1887}
1888
1889 inline void AbstractDOMParser::setCreateCommentNodes(const bool create)
1890{
1891 fCreateCommentNodes = create;
1892}
1893
1894 inline void AbstractDOMParser::useImplementation(const XMLCh* const implementationFeatures)
1895{
1896 fMemoryManager->deallocate(fImplementationFeatures);
1897 fImplementationFeatures = XMLString::replicate(implementationFeatures, fMemoryManager);
1898}
1899
1900 inline void AbstractDOMParser::setDoXInclude(const bool newState)
1901{
1902 fDoXInclude = newState;
1903}
1904
1905// ---------------------------------------------------------------------------
1906// AbstractDOMParser: Protected getter methods
1907// ---------------------------------------------------------------------------
1908 inline DOMNode* AbstractDOMParser::getCurrentNode()
1909{
1910 return fCurrentNode;
1911}
1912
1913 inline MemoryManager* AbstractDOMParser::getMemoryManager() const
1914{
1915 return fMemoryManager;
1916}
1917
1918// ---------------------------------------------------------------------------
1919// AbstractDOMParser: Protected setter methods
1920// ---------------------------------------------------------------------------
1921 inline void AbstractDOMParser::setCurrentNode(DOMNode* toSet)
1922{
1923 fCurrentNode = toSet;
1924}
1925
1926 inline void AbstractDOMParser::setParseInProgress(const bool toSet)
1927{
1928 fParseInProgress = toSet;
1929}
1930
1931 XERCES_CPP_NAMESPACE_END
1932
1933#endif
DOMDocumentType.hpp
DOMDocument.hpp
PSVIHandler.hpp
SecurityManager.hpp
XMLDocumentHandler.hpp
XMLEntityHandler.hpp
XMLErrorReporter.hpp
PARSERS_EXPORT
#define PARSERS_EXPORT
Definition XercesDefs.hpp:168
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
AbstractDOMParser
This class implements the Document Object Model (DOM) interface.
Definition AbstractDOMParser.hpp:62
AbstractDOMParser::setCreateEntityReferenceNodes
void setCreateEntityReferenceNodes(const bool create)
Set the 'include entity references' flag.
Definition AbstractDOMParser.hpp:1879
AbstractDOMParser::isDocumentAdopted
bool isDocumentAdopted() const
Returns true if the user has adopted the document.
AbstractDOMParser::setExternalSchemaLocation
void setExternalSchemaLocation(const XMLCh *const schemaLocation)
This method allows the user to specify a list of schemas to use.
AbstractDOMParser::fValidator
XMLValidator * fValidator
Definition AbstractDOMParser.hpp:1814
AbstractDOMParser::fDocument
DOMDocumentImpl * fDocument
Definition AbstractDOMParser.hpp:1809
AbstractDOMParser::docComment
virtual void docComment(const XMLCh *const comment)
Handle a document comment event.
AbstractDOMParser::setExitOnFirstFatalError
void setExitOnFirstFatalError(const bool newState)
Set the 'exit on first error' flag.
AbstractDOMParser::useScanner
void useScanner(const XMLCh *const scannerName)
Set the scanner to use when scanning the XML document.
AbstractDOMParser::resetPool
void resetPool()
AbstractDOMParser::parseReset
void parseReset(XMLPScanToken &token)
Reset the parser after a progressive parse.
AbstractDOMParser::doctypePI
virtual void doctypePI(const XMLCh *const target, const XMLCh *const data)
AbstractDOMParser::setDisallowDoctype
void setDisallowDoctype(const bool newState)
Set the 'Disallow DOCTYPE (DTD)' flag.
AbstractDOMParser::getDisallowDoctype
bool getDisallowDoctype() const
Get the 'Disallow DOCTYPE (DTD)' flag.
AbstractDOMParser::fPSVIHandler
PSVIHandler * fPSVIHandler
Definition AbstractDOMParser.hpp:1819
AbstractDOMParser::startEntityReference
virtual void startEntityReference(const XMLEntityDecl &entDecl)
Handle a start entity reference event.
AbstractDOMParser::createElementNS
virtual DOMElement * createElementNS(const XMLCh *namespaceURI, const XMLCh *elemPrefix, const XMLCh *localName, const XMLCh *qName)
AbstractDOMParser::getHandleMultipleImports
bool getHandleMultipleImports() const
Get the 'handle multiple schema imports' flag.
AbstractDOMParser::setExternalNoNamespaceSchemaLocation
void setExternalNoNamespaceSchemaLocation(const XMLCh *const noNamespaceSchemaLocation)
This method allows the user to specify the no target namespace XML Schema Location externally.
AbstractDOMParser::setCreateCommentNodes
void setCreateCommentNodes(const bool create)
Set the 'create comment nodes' flag.
Definition AbstractDOMParser.hpp:1889
AbstractDOMParser::setDoNamespaces
void setDoNamespaces(const bool newState)
Set the 'do namespaces' flag.
AbstractDOMParser::endEntityReference
virtual void endEntityReference(const XMLEntityDecl &entDecl)
Handle and end of entity reference event.
AbstractDOMParser::fDoXInclude
bool fDoXInclude
Definition AbstractDOMParser.hpp:1803
AbstractDOMParser::getDoSchema
bool getDoSchema() const
Get the 'do schema' flag.
AbstractDOMParser::parseNext
bool parseNext(XMLPScanToken &token)
Continue a progressive parse operation.
AbstractDOMParser::getScanner
XMLScanner * getScanner() const
Get the XML scanner.
Definition AbstractDOMParser.hpp:1842
AbstractDOMParser::getValidator
const XMLValidator & getValidator() const
Get a const reference to the validator.
AbstractDOMParser::handlePartialElementPSVI
virtual void handlePartialElementPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)
Receive notification of partial PSVI properties of an element.
AbstractDOMParser::fCurrentEntity
DOMEntityImpl * fCurrentEntity
Definition AbstractDOMParser.hpp:1808
AbstractDOMParser::getPSVIHandler
PSVIHandler * getPSVIHandler()
This method returns the installed PSVI handler.
Definition AbstractDOMParser.hpp:1857
AbstractDOMParser::setHandleMultipleImports
void setHandleMultipleImports(const bool newValue)
Set the 'handle multiple schema imports' flag.
AbstractDOMParser::docPI
virtual void docPI(const XMLCh *const target, const XMLCh *const data)
Handle a document PI event.
AbstractDOMParser::fGrammarPool
XMLGrammarPool * fGrammarPool
Definition AbstractDOMParser.hpp:1816
AbstractDOMParser::endElement
virtual void endElement(const XMLElementDecl &elemDecl, const unsigned int urlId, const bool isRoot, const XMLCh *const elemPrefix)
Handle and end of element event.
AbstractDOMParser::startIntSubset
virtual void startIntSubset()
AbstractDOMParser::setIgnoreAnnotations
void setIgnoreAnnotations(const bool newValue)
Set the 'ignore annotation' flag.
AbstractDOMParser::setLoadSchema
void setLoadSchema(const bool newState)
Set the 'Loading Schema' flag.
AbstractDOMParser::ValSchemes
ValSchemes
ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.
Definition AbstractDOMParser.hpp:78
AbstractDOMParser::parseFirst
bool parseFirst(const XMLCh *const systemId, XMLPScanToken &toFill)
Begin a progressive parse operation.
AbstractDOMParser::reset
void reset()
Reset the parser.
AbstractDOMParser::endIntSubset
virtual void endIntSubset()
AbstractDOMParser::fCreateCommentNodes
bool fCreateCommentNodes
Definition AbstractDOMParser.hpp:1800
AbstractDOMParser::resetDocument
virtual void resetDocument()
Handle a document reset event.
AbstractDOMParser::~AbstractDOMParser
virtual ~AbstractDOMParser()
Destructor.
AbstractDOMParser::getExternalNoNamespaceSchemaLocation
XMLCh * getExternalNoNamespaceSchemaLocation() const
Get the noNamespace SchemaLocation that is specified externally.
AbstractDOMParser::endAttList
virtual void endAttList(const DTDElementDecl &elemDecl)
AbstractDOMParser::fInternalSubset
XMLBuffer & fInternalSubset
Definition AbstractDOMParser.hpp:1818
AbstractDOMParser::startAttList
virtual void startAttList(const DTDElementDecl &elemDecl)
AbstractDOMParser::fCreateEntityReferenceNodes
bool fCreateEntityReferenceNodes
Definition AbstractDOMParser.hpp:1796
AbstractDOMParser::setDisableDefaultEntityResolution
void setDisableDefaultEntityResolution(const bool newValue)
Set the 'disable default entity resolution' flag.
AbstractDOMParser::setExternalNoNamespaceSchemaLocation
void setExternalNoNamespaceSchemaLocation(const char *const noNamespaceSchemaLocation)
This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
AbstractDOMParser::getStandardUriConformant
bool getStandardUriConformant() const
Get the 'force standard uri flag'.
AbstractDOMParser::XMLDecl
virtual void XMLDecl(const XMLCh *const versionStr, const XMLCh *const encodingStr, const XMLCh *const standaloneStr, const XMLCh *const actualEncStr)
Handle an XMLDecl event.
AbstractDOMParser::getCurrentNode
DOMNode * getCurrentNode()
Get the current DOM node.
Definition AbstractDOMParser.hpp:1908
AbstractDOMParser::getCreateSchemaInfo
bool getCreateSchemaInfo() const
Get the 'associate schema info' flag.
Definition AbstractDOMParser.hpp:1867
AbstractDOMParser::entityDecl
virtual void entityDecl(const DTDEntityDecl &entityDecl, const bool isPEDecl, const bool isIgnored)
AbstractDOMParser::getGenerateSyntheticAnnotations
bool getGenerateSyntheticAnnotations() const
Get the 'generate synthetic annotations' flag.
AbstractDOMParser::fDocumentType
DOMDocumentTypeImpl * fDocumentType
Definition AbstractDOMParser.hpp:1810
AbstractDOMParser::getValidateAnnotations
bool getValidateAnnotations() const
Get the 'validate annotations' flag.
AbstractDOMParser::setValidateAnnotations
void setValidateAnnotations(const bool newValue)
set the 'validlate annotations' flag
AbstractDOMParser::setDocument
void setDocument(DOMDocument *toSet)
Set the document node.
AbstractDOMParser::fScanner
XMLScanner * fScanner
Definition AbstractDOMParser.hpp:1804
AbstractDOMParser::handleElementPSVI
virtual void handleElementPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)
Receive notification of the PSVI properties of an element.
AbstractDOMParser::fCurrentNode
DOMNode * fCurrentNode
Definition AbstractDOMParser.hpp:1807
AbstractDOMParser::setLoadExternalDTD
void setLoadExternalDTD(const bool newState)
Set the 'Loading External DTD' flag.
AbstractDOMParser::useImplementation
void useImplementation(const XMLCh *const implementationFeatures)
Set the implementation to use when creating the document.
Definition AbstractDOMParser.hpp:1894
AbstractDOMParser::getLowWaterMark
const XMLSize_t & getLowWaterMark() const
Get the raw buffer low water mark for this parser.
AbstractDOMParser::setDoSchema
void setDoSchema(const bool newState)
Set the 'do schema' flag.
AbstractDOMParser::adoptDocument
DOMDocument * adoptDocument()
Adopt the DOM document.
AbstractDOMParser::setParseInProgress
void setParseInProgress(const bool toSet)
Set the parse in progress flag.
Definition AbstractDOMParser.hpp:1926
AbstractDOMParser::createCDATASection
virtual DOMCDATASection * createCDATASection(const XMLCh *, XMLSize_t)
AbstractDOMParser::createAttrNS
virtual DOMAttr * createAttrNS(const XMLCh *namespaceURI, const XMLCh *elemPrefix, const XMLCh *localName, const XMLCh *qName)
AbstractDOMParser::getIgnoreAnnotations
bool getIgnoreAnnotations() const
Get the 'ignore annotations' flag.
AbstractDOMParser::setExternalSchemaLocation
void setExternalSchemaLocation(const char *const schemaLocation)
This method is same as setExternalSchemaLocation(const XMLCh* const).
AbstractDOMParser::startExtSubset
virtual void startExtSubset()
AbstractDOMParser::getErrorCount
XMLSize_t getErrorCount() const
Get error count from the last parse operation.
AbstractDOMParser::getGrammarResolver
GrammarResolver * getGrammarResolver() const
Get the Grammar resolver.
Definition AbstractDOMParser.hpp:1847
AbstractDOMParser::getDocument
DOMDocument * getDocument()
Get the DOM document.
AbstractDOMParser::setCalculateSrcOfs
void setCalculateSrcOfs(const bool newState)
Enable/disable src offset calculation.
AbstractDOMParser::setValidationSchemaFullChecking
void setValidationSchemaFullChecking(const bool schemaFullChecking)
This method allows the user to turn full Schema constraint checking on/off.
AbstractDOMParser::doctypeComment
virtual void doctypeComment(const XMLCh *const comment)
AbstractDOMParser::getValidationScheme
ValSchemes getValidationScheme() const
This method returns an enumerated value that indicates the current validation scheme set on this pars...
AbstractDOMParser::fImplementationFeatures
XMLCh * fImplementationFeatures
Definition AbstractDOMParser.hpp:1805
AbstractDOMParser::fParseInProgress
bool fParseInProgress
Definition AbstractDOMParser.hpp:1799
AbstractDOMParser::getCreateEntityReferenceNodes
bool getCreateEntityReferenceNodes() const
Get the 'include entity references' flag.
Definition AbstractDOMParser.hpp:1827
AbstractDOMParser::fIncludeIgnorableWhitespace
bool fIncludeIgnorableWhitespace
Definition AbstractDOMParser.hpp:1797
AbstractDOMParser::getSkipDTDValidation
bool getSkipDTDValidation() const
Get the 'skip DTD validation' flag.
AbstractDOMParser::doctypeDecl
virtual void doctypeDecl(const DTDElementDecl &elemDecl, const XMLCh *const publicId, const XMLCh *const systemId, const bool hasIntSubset, const bool hasExtSubset=false)
AbstractDOMParser::parseFirst
bool parseFirst(const char *const systemId, XMLPScanToken &toFill)
Begin a progressive parse operation.
AbstractDOMParser::fMemoryManager
MemoryManager * fMemoryManager
Definition AbstractDOMParser.hpp:1815
AbstractDOMParser::AbstractDOMParser
AbstractDOMParser(XMLValidator *const valToAdopt=0, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager, XMLGrammarPool *const gramPool=0)
Construct a AbstractDOMParser, with an optional validator.
AbstractDOMParser::getIdentityConstraintChecking
bool getIdentityConstraintChecking() const
Get the identity constraint checking' flag.
AbstractDOMParser::setValidationScheme
void setValidationScheme(const ValSchemes newScheme)
This method allows users to set the validation scheme to be used by this parser.
AbstractDOMParser::setCurrentNode
void setCurrentNode(DOMNode *toSet)
Set the current DOM node.
Definition AbstractDOMParser.hpp:1921
AbstractDOMParser::setSecurityManager
void setSecurityManager(SecurityManager *const securityManager)
This allows an application to set a SecurityManager on the parser; this object stores information tha...
AbstractDOMParser::setDoXInclude
void setDoXInclude(const bool newState)
Set the 'do XInclude' flag.
Definition AbstractDOMParser.hpp:1900
AbstractDOMParser::getExternalSchemaLocation
XMLCh * getExternalSchemaLocation() const
Get the set of Namespace/SchemaLocation that is specified externally.
AbstractDOMParser::fDocumentAdoptedByUser
bool fDocumentAdoptedByUser
Definition AbstractDOMParser.hpp:1801
AbstractDOMParser::setPSVIHandler
virtual void setPSVIHandler(PSVIHandler *const handler)
This method installs the user specified PSVI handler on the parser.
AbstractDOMParser::setSkipDTDValidation
void setSkipDTDValidation(const bool newValue)
Set the 'skip DTD validation' flag.
AbstractDOMParser::setGenerateSyntheticAnnotations
void setGenerateSyntheticAnnotations(const bool newValue)
set the 'generate synthetic annotations' flag
AbstractDOMParser::parse
void parse(const InputSource &source)
Parse via an input source object.
AbstractDOMParser::getValidationSchemaFullChecking
bool getValidationSchemaFullChecking() const
Get the 'full schema constraint checking' flag.
AbstractDOMParser::doctypeWhitespace
virtual void doctypeWhitespace(const XMLCh *const chars, const XMLSize_t length)
AbstractDOMParser::endDocument
virtual void endDocument()
Handle the end of document event.
AbstractDOMParser::elementDecl
virtual void elementDecl(const DTDElementDecl &decl, const bool isIgnored)
AbstractDOMParser::getDoNamespaces
bool getDoNamespaces() const
Get the 'do namespaces' flag.
AbstractDOMParser::resetDocType
virtual void resetDocType()
AbstractDOMParser::parseFirst
bool parseFirst(const InputSource &source, XMLPScanToken &toFill)
Begin a progressive parse operation.
AbstractDOMParser::parse
void parse(const char *const systemId)
Parse via a file path or URL (in the local code page)
AbstractDOMParser::getCreateCommentNodes
bool getCreateCommentNodes() const
Get the 'create comment node' flag.
Definition AbstractDOMParser.hpp:1852
AbstractDOMParser::TextDecl
virtual void TextDecl(const XMLCh *const versionStr, const XMLCh *const encodingStr)
AbstractDOMParser::getParseInProgress
bool getParseInProgress() const
Get the parse in progress flag.
Definition AbstractDOMParser.hpp:1837
AbstractDOMParser::setStandardUriConformant
void setStandardUriConformant(const bool newState)
Force standard uri.
AbstractDOMParser::fWithinElement
bool fWithinElement
Definition AbstractDOMParser.hpp:1798
AbstractDOMParser::ignorableWhitespace
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)
Handle an ignorable whitespace vent.
AbstractDOMParser::getValidationConstraintFatal
bool getValidationConstraintFatal() const
This method returns the state of the parser's validation-constraint-fatal flag.
AbstractDOMParser::getSecurityManager
SecurityManager * getSecurityManager() const
Get the SecurityManager instance attached to this parser.
AbstractDOMParser::createText
virtual DOMText * createText(const XMLCh *, XMLSize_t)
AbstractDOMParser::getLoadSchema
bool getLoadSchema() const
Get the 'Loading Schema' flag.
AbstractDOMParser::getDoXInclude
bool getDoXInclude() const
Get the 'do XInclude' flag.
Definition AbstractDOMParser.hpp:1872
AbstractDOMParser::handleAttributesPSVI
virtual void handleAttributesPSVI(const XMLCh *const localName, const XMLCh *const uri, PSVIAttributeList *psviAttributes)
Enables PSVI information about attributes to be passed back to the application.
AbstractDOMParser::startElement
virtual void startElement(const XMLElementDecl &elemDecl, const unsigned int urlId, const XMLCh *const elemPrefix, const RefVectorOf< XMLAttr > &attrList, const XMLSize_t attrCount, const bool isEmpty, const bool isRoot)
Handle a start element event.
AbstractDOMParser::fCurrentParent
DOMNode * fCurrentParent
Definition AbstractDOMParser.hpp:1806
AbstractDOMParser::notationDecl
virtual void notationDecl(const XMLNotationDecl &notDecl, const bool isIgnored)
AbstractDOMParser::fURIStringPool
XMLStringPool * fURIStringPool
Definition AbstractDOMParser.hpp:1813
AbstractDOMParser::getMemoryManager
MemoryManager * getMemoryManager() const
Definition AbstractDOMParser.hpp:1913
AbstractDOMParser::docCharacters
virtual void docCharacters(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)
Handle document character events.
AbstractDOMParser::setIncludeIgnorableWhitespace
void setIncludeIgnorableWhitespace(const bool include)
Set the 'include ignorable whitespace' flag.
Definition AbstractDOMParser.hpp:1884
AbstractDOMParser::getDisableDefaultEntityResolution
bool getDisableDefaultEntityResolution() const
Get the 'disable default entity resolution' flag.
AbstractDOMParser::setLowWaterMark
void setLowWaterMark(XMLSize_t lwm)
Set the raw buffer low water mark for this parser.
AbstractDOMParser::attDef
virtual void attDef(const DTDElementDecl &elemDecl, const DTDAttDef &attDef, const bool ignoring)
AbstractDOMParser::fBufMgr
XMLBufferMgr fBufMgr
Definition AbstractDOMParser.hpp:1817
AbstractDOMParser::createElement
virtual DOMElement * createElement(const XMLCh *name)
AbstractDOMParser::getExitOnFirstFatalError
bool getExitOnFirstFatalError() const
Get the 'exit on first error' flag.
AbstractDOMParser::parse
void parse(const XMLCh *const systemId)
Parse via a file path or URL.
AbstractDOMParser::createAttr
virtual DOMAttr * createAttr(const XMLCh *name)
AbstractDOMParser::setValidationConstraintFatal
void setValidationConstraintFatal(const bool newState)
This method allows users to set the parser's behaviour when it encounters a validation constraint err...
AbstractDOMParser::getIncludeIgnorableWhitespace
bool getIncludeIgnorableWhitespace() const
Get the 'include ignorable whitespace' flag.
Definition AbstractDOMParser.hpp:1832
AbstractDOMParser::fCreateSchemaInfo
bool fCreateSchemaInfo
Definition AbstractDOMParser.hpp:1802
AbstractDOMParser::getLoadExternalDTD
bool getLoadExternalDTD() const
Get the 'Loading External DTD' flag.
AbstractDOMParser::setIdentityConstraintChecking
void setIdentityConstraintChecking(const bool newState)
This method allows users to enable or disable the parser's identity constraint checks.
AbstractDOMParser::startDocument
virtual void startDocument()
Handle a start document event.
AbstractDOMParser::fDocumentVector
RefVectorOf< DOMDocumentImpl > * fDocumentVector
Definition AbstractDOMParser.hpp:1811
AbstractDOMParser::fGrammarResolver
GrammarResolver * fGrammarResolver
Definition AbstractDOMParser.hpp:1812
AbstractDOMParser::getCalculateSrcOfs
bool getCalculateSrcOfs() const
Get the 'calculate src offset flag'.
AbstractDOMParser::endExtSubset
virtual void endExtSubset()
AbstractDOMParser::setCreateSchemaInfo
void setCreateSchemaInfo(const bool newState)
Set the 'associate schema info' flag.
DOMAttr
The DOMAttr class refers to an attribute of an XML element.
Definition DOMAttr.hpp:57
DOMCDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition DOMCDATASection.hpp:65
DOMDocument
The DOMDocument interface represents the entire XML document.
Definition DOMDocument.hpp:67
DOMElement
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition DOMElement.hpp:66
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition DOMNode.hpp:139
DOMText
The DOMText interface inherits from DOMCharacterData and represents the textual content (termed chara...
Definition DOMText.hpp:51
InputSource
A single input source for an XML entity.
Definition InputSource.hpp:63
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
MemoryManager::deallocate
virtual void deallocate(void *p)=0
This method deallocates memory.
PSVIAttributeList
Definition PSVIAttributeList.hpp:60
PSVIElement
Definition PSVIElement.hpp:42
PSVIHandler
This abstract class provides the interface for the scanner to return PSVI information to the applicat...
Definition PSVIHandler.hpp:39
SecurityManager
Allow application to force the parser to behave in a security-conscious way.
Definition SecurityManager.hpp:52
XMLDocumentHandler
This abstract class provides the interface for the scanner to return XML document information up to t...
Definition XMLDocumentHandler.hpp:43
XMLElementDecl
This class defines the core information of an element declaration.
Definition XMLElementDecl.hpp:52
XMLEntityDecl
This class defines that core information that defines an XML entity, no matter what validator is used...
Definition XMLEntityDecl.hpp:51
XMLEntityHandler
This abstract class is a callback mechanism for the scanner.
Definition XMLEntityHandler.hpp:44
XMLErrorReporter
This abstract class defines a callback mechanism for the scanner.
Definition XMLErrorReporter.hpp:43
XMLGrammarPool
Definition XMLGrammarPool.hpp:44
XMLNotationDecl
This class represents the core information about a notation declaration that all validators must at l...
Definition XMLNotationDecl.hpp:42
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XMLString::replicate
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
This abstract class provides the interface for all validators.
Definition XMLValidator.hpp:53
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41