| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd"> |
| |
| <s1 title="Migration Archive"> |
| <s2 title="Migrating to earlier Releases"> |
| <ul> |
| <li><link anchor="Migrateto230">Migrating from &XercesCName; 2.2.0 to 2.3.0</link></li> |
| <li><link anchor="Migrateto220">Migrating from &XercesCName; 2.1.0 to 2.2.0</link></li> |
| <li><link anchor="Migrateto210">Migrating from &XercesCName; 2.0.0 to 2.1.0</link></li> |
| <li><link anchor="Migrateto200">Migrating from &XercesCName; 1.7.0 to 2.0.0</link></li> |
| <li><link anchor="Migrateto170">Migrating from &XercesCName; 1.6.0 to 1.7.0</link></li> |
| <li><link anchor="Migrateto160">Migrating from &XercesCName; 1.5.2 to 1.6.0</link></li> |
| <li><link anchor="Migrateto152">Migrating from &XercesCName; 1.4.0 to 1.5.2</link></li> |
| <li><link anchor="Migrateto140">Migrating from XML4C 2.x to 1.4.0</link></li> |
| </ul> |
| </s2> |
| |
| <anchor name="Migrateto230"/> |
| <s2 title="Migrating from &XercesCName; 2.2.0 to &XercesCName; &XercesCVersion;"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 2.2.0 code base and the &XercesCName; &XercesCVersion;.</p> |
| |
| <p>Topics discussed are:</p> |
| <ul> |
| <li><link anchor="NewFeatures230">New features in &XercesCName; &XercesCVersion;</link></li> |
| <li><link anchor="API230">Public API Changes</link></li> |
| <ul> |
| <li><link anchor="NewAPI230">New Public API</link></li> |
| <li><link anchor="ModifiedAPI230">Modified Public API</link></li> |
| <li><link anchor="DeprecatedAPI230">Deprecated/Removed Public API</link></li> |
| </ul> |
| </ul> |
| |
| <anchor name="NewFeatures230"/> |
| <s3 title="New features in &XercesCName; &XercesCVersion;"> |
| <ul> |
| <li>Experimental Implementation of Namespaces in XML 1.1 </li> |
| <li>Experimental Implementation of XML 1.1: in DOMWriter</li> |
| <li>More Schema 1.0 Errata Implementation</li> |
| <li>More DOM L3 Core Support</li> |
| <ul> |
| <li>DOMConfiguration</li> |
| <li>Document Normalization</li> |
| </ul> |
| <li>Plugable Memory Manager</li> |
| <li>Plugable Security Manager</li> |
| <li>Plugable Panic Handler</li> |
| <li>Logical Path Resolution</li> |
| </ul> |
| </s3> |
| |
| <anchor name="API230"/> |
| <s3 title="Public API Changes"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 2.2.0; and the &XercesCName; &XercesCVersion; releases |
| of the parser. </p> |
| |
| <anchor name="NewAPI230"/> |
| <s4 title="New Public API"> |
| <ul> |
| <li>To support additional DOM L3 functions, the following are added:</li> |
| <li>DOMDocument: getDOMConfiguration</li> |
| <li>DOMConfiguration class for document normalization.</li> |
| </ul> |
| </s4> |
| |
| <anchor name="ModifiedAPI230"/> |
| <s4 title="Modified Public API"> |
| <ul> |
| <li></li> |
| </ul> |
| </s4> |
| |
| <anchor name="DeprecatedAPI230"/> |
| <s4 title="Deprecated/Removed Public API"> |
| <ul> |
| <li>DOMDocument canSetNormalizationFeature, setNormalizationFeature, getNormalizationFeature, getErrorHandler, setErrorHandler removed</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto220"/> |
| <s2 title="Migrating from &XercesCName; 2.1.0 to &XercesCName; 2.2.0"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 2.1.0 code base and the &XercesCName; 2.2.0.</p> |
| |
| <p>Topics discussed are:</p> |
| <ul> |
| <li><link anchor="NewFeatures220">New features in &XercesCName; 2.2.0</link></li> |
| <li><link anchor="CPPNamespace220">Using C++ Namespace</link></li> |
| <li><link anchor="API220">Public API Changes</link></li> |
| <ul> |
| <li><link anchor="NewAPI220">New Public API</link></li> |
| <li><link anchor="ModifiedAPI220">Modified Public API</link></li> |
| <li><link anchor="DeprecatedAPI220">Deprecated/Removed Public API</link></li> |
| </ul> |
| </ul> |
| |
| <anchor name="NewFeatures220"/> |
| <s3 title="New features in &XercesCName; 2.2.0"> |
| <ul> |
| <li>C++ Namespace Support</li> |
| <li>Schema 1.0 Errata Implementation</li> |
| <li>Experimental Implementation of XML 1.1</li> |
| <li>More DOM L3 Core Support:</li> |
| <ul> |
| <li>DOMNode: baseURI</li> |
| <li>DOMAttr: isId, getTypeInfo</li> |
| <li>DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo</li> |
| </ul> |
| <li>DOM Message: make use of the non-standard extension DOMImplementation::loadDOMExceptionMsg |
| to load the default error text message for the correspond Exception Code.</li> |
| <li>New feature XMLPlatformUtils::Initialize(const char* const locale) to set |
| the locale for message loader. See <jump href="program-others.html#SpecifylocaleforMessageLoader"> |
| Specify locale for Message Loader</jump> for details</li> |
| <li>Support Build with ICU Message Loader, or Message Catalog Message Loader</li> |
| <li>RPM for Linux</li> |
| <li>390: Uniconv390 support</li> |
| <li>390: support record-oriented MVS datasets with the DOM Level 3 serialization APIs</li> |
| <li>Support for Linux/390</li> |
| <li>Performance: Break Scanner for different functionalities and many other performance improvement</li> |
| <li>New feature, "http://apache.org/xml/features/dom/byte-order-mark", allows user to enable |
| DOMWriter to write Byte-Order-Mark in the output XML stream, |
| See <jump href="program-dom.html#Byte-Order-Mark"> |
| Xercesc Feature: Byte Order Mark</jump> for details</li> |
| </ul> |
| </s3> |
| |
| <anchor name="CPPNamespace220"/> |
| <s3 title="Using C++ Namespace"> |
| <p>&XercesCName; 2.2.0 now supports C++ Namespace. All &XercesCName; |
| classes/data/variables are defined in the <code>"namespace &XercesCNamespace;"</code> |
| if C++ Namespace support is ENABLED.</p> |
| |
| <p>All the binary distributions of &XercesCName; 2.2.0 are now built with |
| C++ Namespace enabled. Therefore users' applications that links with the distributed |
| binary packages must namespace qualified all the &XercesCName; classes/data/variables |
| with <code>"&XercesCNamespace;::"</code> or add the |
| <code>"using namespace &XercesCNamespace;"</code> clause.</p> |
| |
| <p>See the Programming Guide <jump href="program-others.html#CPPNamespace">Using C++ Namespace</jump> |
| for more details.</p> |
| |
| </s3> |
| |
| <anchor name="API220"/> |
| <s3 title="Public API Changes"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 2.1.0; and the &XercesCName; 2.2.0 releases |
| of the parser. </p> |
| |
| <anchor name="NewAPI220"/> |
| <s4 title="New Public API"> |
| <ul> |
| <li>To support additional DOM L3 functions, the following are added:</li> |
| <ul> |
| <li>DOMAttr: isId, getTypeInfo</li> |
| <li>DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo</li> |
| <li>Added DOMTypeInfo class for getTypeInfo class in DOMElement and DOMAttr</li> |
| <li>Added getDOMTypeInfoUri, getDOMTypeInfoName to XMLAttDef and XMLElementDecl for use in building DOMTypeInfo</li> |
| </ul> |
| <li>Added a non-standard extension DOMImplementation::loadDOMExceptionMsg to load the |
| default error message for the corresponding DOMException code.</li> |
| <li>XMLAttr: Added a constructor and a set method to allow creating/setting of |
| XMLAttr using a rawname.</li> |
| <li>Added XMLUri::getUriText to return the URI as a string specification.</li> |
| <li>Add XMLString::fixURI to transform an absolute path filename to standard URI form.</li> |
| <li>Added XMLString::equals for faster string comparison.</li> |
| <li>To allow users to tell the parser to force standard uri conformance, |
| the following are added:</li> |
| <ul> |
| <li>XercesDOMParser/DOMParser/SAXParser: get/setStandardUriConformant</li> |
| <li>and DOMBuilder/SAX2XMLReader will recognize the feature |
| http://apache.org/xml/features/standard-uri-conformant</li> |
| </ul> |
| <li>Add XMLURL::hasInvalidChar() to indicate if the URL has invalid char as per RFC standard</li> |
| <li>To allow users to enable/disable src offset calculation, |
| the following are added:</li> |
| <ul> |
| <li>XercesDOMParser/DOMParser/SAXParser: get/setCalculateSrcOfs</li> |
| <li>and DOMBuilder/SAX2XMLReader will recognize the feature |
| http://apache.org/xml/features/calculate-src-ofst</li> |
| </ul> |
| <li>To allow users to select the scanner when scanning XML documents, |
| the following are added:</li> |
| <ul> |
| <li>XercesDOMParser/DOMParser/SAXParser: useScanner</li> |
| <li>and DOMBuilder/SAX2XMLReader will recognize the property |
| http://apache.org/xml/properties/scannerName</li> |
| </ul> |
| <li>Added getSrcOffset to XercesDOMParser/DOMParser/SAXParser/DOMBuilder/SAX2XMLReader to |
| allow users to get the current src offset within the input source.</li> |
| </ul> |
| </s4> |
| |
| <anchor name="ModifiedAPI220"/> |
| <s4 title="Modified Public API"> |
| <ul> |
| <li>The following DOM functions are being added a const modifier.</li> |
| <ul> |
| <li>DOMImplementation::hasFeature</li> |
| <li>DOMNode: isSameNode, isEqualNode, compareTreePosition</li> |
| </ul> |
| <li>XMLPlatformUtils::Initialize() takes a parameter specifying locale |
| for message loader, with default value "en_US".</li> |
| <li>To fix [Bug 13641], the QName copy constructor is corrected to take |
| a reference as parameter, i.e. QName(const QName& qname).</li> |
| <li>To fix [Bug 12232], the QName operator== has been added a const modified.</li> |
| <li>Move XMLUri copy constructor and operator = as public.</li> |
| <li>Move XMLUri::isURIString as public.</li> |
| <li>For validation purpose, added two more default parameters to |
| XMLValidator::validateAttrValue.</li> |
| <li>To fix [Bug 15802], the getURIText of DOMParser/XercesDOMParser/SAXParser/SAX2XMLReader |
| are being added a const modifier.</li> |
| </ul> |
| </s4> |
| |
| <anchor name="DeprecatedAPI220"/> |
| <s4 title="Deprecated/Removed Public API"> |
| <ul> |
| <li>No Deprecated Public API in this release.</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto210"/> |
| <s2 title="Migrating from &XercesCName; 2.0.0 to &XercesCName; 2.1.0"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 2.0.0 code base and the &XercesCName; 2.1.0.</p> |
| |
| <p>Topics discussed are:</p> |
| <ul> |
| <li><link anchor="NewFeatures210">New features in &XercesCName; 2.1.0</link></li> |
| <li><link anchor="API210">Public API Changes</link></li> |
| <ul> |
| <li><link anchor="NewAPI210">New Public API</link></li> |
| <li><link anchor="ModifiedAPI210">Modified Public API</link></li> |
| <li><link anchor="DeprecatedAPI210">Deprecated/Removed Public API</link></li> |
| </ul> |
| </ul> |
| |
| <anchor name="NewFeatures210"/> |
| <s3 title="New features in &XercesCName; 2.1.0"> |
| <ul> |
| <li>64 bit binaries distribution on Windows IA64 and Linux IA64</li> |
| <li>Support for Cygwin environment</li> |
| <li>DOM Level 3 DOMNode: compareTreePosition, lookupNamespaceURI, lookupNamespacePrefix and isDefaultNamespace</li> |
| <li>plus many more bug fixes</li> |
| </ul> |
| </s3> |
| |
| <anchor name="API210"/> |
| <s3 title="Public API Changes"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 2.0.0; and the &XercesCName; 2.1.0 releases |
| of the parser. </p> |
| |
| <anchor name="NewAPI210"/> |
| <s4 title="New Public API"> |
| <ul> |
| <li>To fix bug 7087, XMLEnumerator is added a virtual destructor.</li> |
| <li>To fix bug 11448, XMLNotationDecl::get/setBaseURI, and XMLEntityDecl::get/setBaseURI are added.</li> |
| </ul> |
| </s4> |
| |
| <anchor name="ModifiedAPI210"/> |
| <s4 title="Modified Public API"> |
| <ul> |
| <li>DOMNodeList: item, and getLength have been added a const modifier.</li> |
| <li>DOMNode: lookupNamespacePrefix, isDefaultNamespace, and lookupNamespaceURI have been added a const modifier.</li> |
| </ul> |
| </s4> |
| |
| <anchor name="DeprecatedAPI210"/> |
| <s4 title="Deprecated/Removed Public API"> |
| <ul> |
| <li>No Deprecated Public API in this release.</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto200"/> |
| <s2 title="Migrating from &XercesCName; 1.7.0 to &XercesCName; 2.0.0"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 1.7.0 code base and the &XercesCName; 2.0.0.</p> |
| |
| <p>Topics discussed are:</p> |
| <ul> |
| <li><link anchor="NewFeatures200">New features in &XercesCName; 2.0.0</link></li> |
| <li><link anchor="LibraryChange200">Unix Library Name change</link></li> |
| <li><link anchor="DirChange200">DOM Reorganization</link></li> |
| <li><link anchor="Reuse200">Reuse Grammar becomes Grammar Caching</link></li> |
| <li><link anchor="API200">Public API Changes</link></li> |
| <ul> |
| <li><link anchor="NewAPI200">New Public API</link></li> |
| <li><link anchor="ModifiedAPI200">Modified Public API</link></li> |
| <li><link anchor="DeprecatedAPI200">Deprecated/Removed Public API</link></li> |
| </ul> |
| </ul> |
| |
| <anchor name="NewFeatures200"/> |
| <s3 title="New features in &XercesCName; 2.0.0"> |
| <ul> |
| <li>64 bit binaries distribution</li> |
| <li>Follow Unix Shared Library Naming Convention</li> |
| <li>Apache Recommended DOM C++ Binding</li> |
| <li>Experimental DOM Level 3 subset support, including DOMWriter and DOMBuilder</li> |
| <li>Grammar preparsing and Grammar caching</li> |
| <li>Optionally ignore loading of external DTD</li> |
| <li>Project files for Microsoft Visual C++ .Net</li> |
| <li>Codewarrior 8 support</li> |
| <li>Option to enable/disable strict IANA encoding name checking</li> |
| <li>plus many more bug fixes and performance enhancement</li> |
| </ul> |
| </s3> |
| |
| <anchor name="LibraryChange200"/> |
| <s3 title="Unix Library Name Change"> |
| <p>The &XercesCName; UNIX Library now follows the Unix Shared Library Naming Convention (libname.so.soname). |
| It is now called:</p> |
| <ul> |
| <li>AIX</li> |
| <ul> |
| <li>&XercesCUnixLib;&XercesCUnixSoName;.so</li> |
| <li>symbolic link: &XercesCUnixLib;.so ----> &XercesCUnixLib;&XercesCUnixVersion;.so</li> |
| <li>symbolic link: &XercesCUnixLib;&XercesCUnixVersion;.so ----> &XercesCUnixLib;&XercesCUnixSoName;.so</li> |
| </ul> |
| <li>Solaris / Linux</li> |
| <ul> |
| <li>&XercesCUnixLib;.so.&XercesCUnixSoName;</li> |
| <li>symbolic link: &XercesCUnixLib;.so ----> &XercesCUnixLib;.so.&XercesCUnixVersion;</li> |
| <li>symbolic link: &XercesCUnixLib;.so.&XercesCUnixVersion; ----> &XercesCUnixLib;.so.&XercesCUnixSoName;</li> |
| </ul> |
| <li>HP-UX</li> |
| <ul> |
| <li>&XercesCUnixLib;.sl.&XercesCUnixSoName;</li> |
| <li>symbolic link: &XercesCUnixLib;.sl ----> &XercesCUnixLib;.sl.&XercesCUnixVersion;</li> |
| <li>symbolic link: &XercesCUnixLib;.sl.&XercesCUnixVersion; ----> &XercesCUnixLib;.sl.&XercesCUnixSoName;</li> |
| </ul> |
| </ul> |
| </s3> |
| |
| <anchor name="DirChange200"/> |
| <s3 title="DOM Reorganization"> |
| <p>1. The old Java-like DOM is now deprecated, and all the associated files, including the headers |
| and DOMParser files are moved to <code>src/xercesc/dom/deprecated</code>. Users of the old |
| Java-like DOM are required to change all their #include lines to pick up the headers. |
| For example</p> |
| <source> |
| //old code |
| #include <xercesc/dom/DOM.hpp> |
| #include <xercesc/dom/DOM_Document.hpp> |
| #include <xercesc/parsers/DOMParser.hpp> |
| |
| void test(char* xmlFile) { |
| DOMParser parser; |
| parser.parse(xmlFile); |
| DOM_Document doc = parser.getDocument(); |
| : |
| return; |
| } |
| </source> |
| <p> should now change to </p> |
| <source> |
| //new code |
| #include <xercesc/dom/deprecated/DOM.hpp> //<==== change this include line |
| #include <xercesc/dom/deprecated/DOM_Document.hpp> //<==== change this include line |
| #include <xercesc/dom/deprecated/DOMParser.hpp> //<==== change this include line |
| |
| // the rest is the same |
| void test(char* xmlFile) { |
| DOMParser parser; |
| parser.parse(xmlFile); |
| DOM_Document doc = parser.getDocument(); |
| : |
| return; |
| } |
| </source> |
| <p>2. The Experimental IDOM is now renamed, and becomes the Apache Recommended DOM C++ Binding. |
| The following changes are made: </p> |
| <ul> |
| <li>class names are renamed from IDOM_XXXX to DOMXXXX, e.g. IDOM_Document to DOMDocument</li> |
| <li>and thus header files are renamed from IDOM_XXXX.hpp to DOMXXXX.hpp and are moved |
| to <code>src/xercesc/dom</code></li> |
| <li>the IDOMParser is renamed to XercesDOMParser. And thus the header |
| file is renamed as well</li> |
| <li>the rest is the same, see |
| <jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding</jump> |
| and <jump href="program-dom.html">DOM Programming Guide</jump> for more programming |
| information</li> |
| </ul> |
| <p>Users of IDOM are required to change all their #include lines and do a global rename of |
| IDOMParser to XercesDOMParesr, and IDOM_XXXX to DOMXXXX. For example</p> |
| <source> |
| //old code |
| #include <xercesc/idom/IDOM.hpp> |
| #include <xercesc/idom/IDOM_Document.hpp> |
| #include <xercesc/parsers/IDOMParser.hpp> |
| |
| void test(char* xmlFile) { |
| IDOMParser parser; |
| parser.parse(xmlFile); |
| IDOM_Document* doc = parser.getDocument(); |
| : |
| return; |
| } |
| </source> |
| <p> should now change to </p> |
| <source> |
| //new code |
| #include <xercesc/dom/DOM.hpp> //<==== change this include line |
| #include <xercesc/dom/DOMDocument.hpp> //<==== change this include line |
| #include <xercesc/parsers/XercesDOMParser.hpp> //<==== change this include line |
| |
| void test(char* xmlFile) { |
| XercesDOMParser parser; //<==== rename the IDOMParser |
| parser.parse(xmlFile); |
| DOMDocument* doc = parser.getDocument(); //<==== rename the IDOM_XXXX |
| : |
| return; |
| } |
| </source> |
| </s3> |
| |
| <anchor name="Reuse200"/> |
| <s3 title="Reuse Grammar becomes Grammar Caching"> |
| <p>The &XercesCName; 2.0.0 extends the "Reuse Grammar" support by replacing it with |
| a new feature called "Grammar Caching" which provides more flexibility in reusing grammars. |
| Users who used to do the following:</p> |
| <source> |
| |
| XercesDOMParser parser; |
| |
| // this is the first parse, just usual code as you do normal parse |
| // "firstXmlFile" has a grammar (schema or DTD) specified. |
| parser.parse(firstXmlFile); |
| |
| // this is the second parse, by setting second parameter to true, |
| // the parser will reuse the grammar in the last parse |
| // (i.e. the one in "firstXmlFile") |
| // to validate the second "anotherXmlFile". Any grammar that is |
| // specified in anotherXmlFile is IGNORED. |
| // |
| // Note: The anotherXmlFile cannot have any DTD internal subset. |
| parser.parse(anotherXmlFile, true); |
| |
| </source> |
| <p>should now use the features cacheGrammarFromParse and useCachedGrammarFromParse:</p> |
| <source> |
| XercesDOMParser parser; |
| |
| // By setting cacheGrammarFromParse to true, |
| // the parser will cache any grammars encountered in the |
| // follow-on xml files, if not cached already |
| parser.cacheGrammarFromParse(true); |
| |
| parser.parse(firstXmlFile); |
| |
| // By setting useCachedGrammarFromParse to true, |
| // the parser will use all the previous cached grammars |
| // to validate the follow-on xml files if the cached |
| // grammar matches the one specified in anotherXmlFile. |
| // |
| // Note: The follow-on xml files cannot have any DTD internal subset. |
| parser.useCachedGrammarFromParse(true); |
| |
| parser.parse(anotherXmlFile); |
| |
| // This will flush the cached grammar pool |
| parser.resetCachedGrammarPool(); |
| </source> |
| |
| <p>Note there are a number of differences between "Reuse Grammar" and "Grammar Caching" </p> |
| <ol> |
| <li>"Reuse Grammar" ignores any grammar that is specified in anotherXmlFile and simply |
| reuse whatever stored in previous parse; while "Grammar Caching" will use the |
| cached grammar only if it matches the one specified in the anotherXmlFile. |
| If not match, then the new grammar is parsed.</li> |
| <li>"Reuse Grammar" can only reuse the grammar from previous parse; while "Grammar Caching" |
| can selectively cache many grammars from different parses and collect them all in a pool indexed |
| by targetNamespace (for Schema) or system id (for DTD).</li> |
| <li>Plus "Grammar Caching" has much more functionalities other than above |
| (like "Pre-parsing Grammar"). Please refer to |
| <jump href="program-others.html#GrammarCache">Preparsing Grammar and Grammar Caching |
| </jump> for more programming details.</li> |
| </ol> |
| </s3> |
| |
| <anchor name="API200"/> |
| <s3 title="Public API Changes"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 1.7.0; and the &XercesCName; 2.0.0 releases |
| of the parser. </p> |
| |
| <anchor name="NewAPI200"/> |
| <s4 title="New Public API"> |
| <ul> |
| <li>To support DOM Level 3, the following are added (see |
| <jump href="api.html">the API documentation page</jump> for details).</li> |
| <ul> |
| <li>DOMNode functions set/getUserData, isSameNode isEqualNode.</li> |
| <li>DOMDocument functions renameNode, get/setActualEncoding, get/setEncoding, get/setVersion, get/setStandalone, get/setDocumentURI.</li> |
| <li>DOMEntity functions get/setActualEncoding, get/setEncoding, get/setVersion.</li> |
| <li>classes AbstractDOMParser, DOMError, DOMErrorHandler, and DOMLocator.</li> |
| <li>classes DOMUserDataHandler, DOMImplementationRegistry and DOMImplementationSource.</li> |
| <li>classes DOMBuilder, DOMEntityResolver, DOMImplementationLS, DOMInputSource, |
| Wrapper4DOMInputSource and Wrapper4InputSource.</li> |
| <li>classes DOMWriter, DOMWriterFilter, LocalFileFormatTarget, StdOutFormatTarget, |
| and MemBufFormatTarget</li> |
| </ul> |
| <li>To support DOMWriter, the following PlatformUtils functions are added</li> |
| <ul> |
| <li>openFileToWrite, writeBufferToFile</li> |
| </ul> |
| <li>To have Apache Recommended DOM C++ Binding, the following are added (see |
| <jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding).</jump></li> |
| <ul> |
| <li>function release() to fix Memory Management problem</li> |
| <li>classes DOMDocumentRange and DOMDocumentTraversal</li> |
| <li>XMLSize_t is used to represent unsigned integral type in DOM</li> |
| <li>IDOM_XXXX classes are renamed to DOMXXXX, and IDOMParser is renamed to XercesDOMParser |
| as described in <link anchor="DirChange200">DOM Reorganization</link></li> |
| <li>XercesDOMParser::adoptDocument is added so that document can optionally live |
| outside the parser.</li> |
| </ul> |
| <li>To support optionally load external DTD, the following are added:</li> |
| <ul> |
| <li>XercesDOMParser::set/getLoadExternalDTD</li> |
| <li>DOMParser::set/getLoadExternalDTD</li> |
| <li>SAXParser::set/getLoadExternalDTD</li> |
| <li>and SAX2XMLReader will recognize the feature |
| http://apache.org/xml/features/nonvalidating/load-external-dtd</li> |
| </ul> |
| <li>To support Preparsing Grammar and Grammar Caching, the following are added:</li> |
| <ul> |
| <li>XercesDOMParser/DOMParser/SAXParser functions loadGrammar, resetCachedGrammarPool, |
| cacheGrammarFromParse, isCachingGrammarFromParse, useCachedGrammarInParse, |
| isUsingCachedGrammarInParse.</li> |
| <li>SAX2XMLReader functions loadGrammar, resetCachedGrammarPool, and will recognize the features |
| http://apache.org/xml/features/validation/cache-grammarFromParse and |
| http://apache.org/xml/features/validation/use-cachedGrammarInParse.</li> |
| </ul> |
| <li>To support access to Grammar info, the following are added:</li> |
| <ul> |
| <li>XercesDOMParser/DOMParser/SAXParser/SAX2XMLReader functions getRootGrammar, getGrammar, getURIText.</li> |
| </ul> |
| <li>To support strict IANA encoding name checking, the following are added:</li> |
| <ul> |
| <li>class EncodingValidator.</li> |
| <li>PlatformUtils functions strictIANAEncoding, isStrictIANAEncoding.</li> |
| <li>XMLTransService functions strictIANAEncoding, isStrictIANAEncoding.</li> |
| </ul> |
| </ul> |
| </s4> |
| |
| <anchor name="ModifiedAPI200"/> |
| <s4 title="Modified Public API"> |
| <ul> |
| <li>SAXParser::getScanner() is moved from public to protected.</li> |
| <li>Grammar::getGrammarType has been added a const modifier.</li> |
| <li>Xerces features are renamed from XMLUni::fgSAX2XercesXXXX to XMLUni::fgXercesXXXX |
| so that they can be shared with DOM parser.</li> |
| <li>With the new Grammar Caching introduced, the the last parameter "reuseGrammar" in |
| the following API is dropped. |
| Users should now use the "Grammar Caching" feature as described in |
| <link anchor="Reuse200">Reuse Grammar becomes Grammar Caching</link>.</li> |
| <ul> |
| <li>(in Parser, SAXParser, DOMParser, and XercesDOMParser) </li> |
| <li>parse(const InputSource& source, const bool reuseGrammar = false);</li> |
| <li>parse(const XMLCh* const systemId, const bool reuseGrammar = false);</li> |
| <li>parse(const char* const systemId, const bool reuseGrammar = false);</li> |
| <li>(in SAXParser, DOMParser, and XercesDOMParser) </li> |
| <li>parseFirst(const InputSource& source, XMLPScanToken& toFill, const bool reuseGrammar = false);</li> |
| <li>parseFirst(const XMLCh* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);</li> |
| <li>parseFirst(const char* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);</li> |
| </ul> |
| </ul> |
| </s4> |
| |
| <anchor name="DeprecatedAPI200"/> |
| <s4 title="Deprecated/Removed Public API"> |
| <ul> |
| <li>The old Java-like DOM is now deprecated as described in |
| <link anchor="DirChange200">DOM Reorganization</link></li> |
| <li>SAX2XMLReader::setValidationConstraint. For consistency, SAX2XMLReader users should |
| set the feature http://apache.org/xml/features/validation-error-as-fatal" instead.</li> |
| <li>SAX2XMLReader::setExitOnFirstFatalError. For consistency, SAX2XMLReader users should |
| set the feature "http://apache.org/xml/features/continue-after-fatal-error" instead.</li> |
| <li>With the new Grammar Caching introduced, the following features will not be |
| recognized by the SAX2XMLReader:</li> |
| <ul> |
| <li>http://apache.org/xml/features/validation/reuse-grammar</li> |
| <li>http://apache.org/xml/features/validation/reuse-validator</li> |
| </ul> |
| </ul> |
| </s4> |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto170"/> |
| <s2 title="Migrating from &XercesCName; 1.6.0 to 1.7.0"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 1.6.0 code base and the &XercesCName; 1.7.0 code base.</p> |
| |
| <s3 title="New features in &XercesCName; 1.7.0"> |
| <ul> |
| <li>Support SAX2-ext's DeclHandler.</li> |
| <li>Directory sane_include reorganization: add sub-directory 'xercesc' to src / include folder. |
| See <link anchor="DirChange170">"Directory change in &XercesCName; 1.7.0"</link> |
| below for detail.</li> |
| <li>More IDOM test cases - port IDOMMemTest, and merge ThreadTest and IThreadTest.</li> |
| <li>Support IconvFBSD in multi-threading environment.</li> |
| <li>Use IDOM in schema processing for faster performance.</li> |
| <li>Add Project files for BCB6.</li> |
| <li>Port to Caldera (SCO) OpenServer.</li> |
| <li>Support building with new MacOSURLAccessCF NetAccessor that doesn't require |
| Carbon but can allow Xerces to live solely within CoreServices layer.</li> |
| </ul> |
| </s3> |
| |
| <anchor name="DirChange170"/> |
| <s3 title="Directory change in &XercesCName; 1.7.0"> |
| <ul> |
| <li>A new directory, <em>src/xercesc</em> is created to be the new parent directory of |
| all src's direct subdirectories.</li> |
| <li>And in the binary package, all the headers are distributed in <em>include/xercesc</em> directory.</li> |
| <li>Migration considerations:</li> |
| <ul> |
| <li>Windows application, <br/> |
| either change the <em>include directories </em> setting to |
| "..\..\..\..\..\src\<em>xercesc</em>" (Projects->settings->C/C++->Preprocessor), <br/> |
| or <br/> |
| change the relevant #include instances in the source/header files, accordingly, eg <br/> |
| #include <util/XMLString.hpp> be changed to <br/> |
| #include <<em>xercesc</em>/util/XMLString.hpp> </li> |
| <li>Unix application, <br/> |
| either change the <em>include search path </em> in the Makefile to |
| " -I <installroot>/include/<em>xercesc</em>", <br/> |
| or <br/> |
| change the relevant #include instances in the source/header files as shown above. </li> |
| </ul> |
| </ul> |
| </s3> |
| |
| <s3 title="Public API Changes in &XercesCName; 1.7.0"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 1.7.0 and the &XercesCName; 1.7.0 releases |
| of the parser. </p> |
| |
| <s4 title="New Public API"> |
| <ul> |
| <li>Added SAX2-ext's DeclHandler class. |
| See <jump href="api.html">the API documentation page</jump> for details.</li> |
| <li>To support SAX2-ext's DeclHandler, the following new methods are added |
| in classes DefaultHandler and SAX2XMLReader:</li> |
| <ul> |
| <li>void DefaultHandler::elementDecl(const XMLCh* const name, const XMLCh* const model)</li> |
| <li>void DefaultHandler::attributeDecl(const XMLCh* const eName, const XMLCh* const aName, |
| const XMLCh* const type, const XMLCh* const mode, const XMLCh* const value)</li> |
| <li>void DefaultHandler::internalEntityDecl(const XMLCh* const name, const XMLCh* const value)</li> |
| <li>void DefaultHandler::externalEntityDecl(const XMLCh* const name, const XMLCh* const publicId, |
| const XMLCh* const systemId)</li> |
| <li>DeclHandler* SAX2XMLReader::getDeclarationHandler() const</li> |
| <li>void SAX2XMLReader::setDeclarationHandler(DeclHandler* const handler)</li> |
| </ul> |
| <li>To conform to DOM Level 2 specification, the following methods are added:</li> |
| <ul> |
| <li>DOM_Node DOM_NodeIterator::getRoot()</li> |
| <li>DOM_Node DOM_TreeWalker::getRoot()</li> |
| <li>bool DOM_Node::hasAttributes() const</li> |
| <li>bool DOM_Element::hasAttribute(const DOMString &name) const</li> |
| <li>bool DOM_Element::hasAttributeNS(const DOMString &namespaceURI, |
| const DOMString &localName) const</li> |
| <li>IDOM_Node* IDOM_NodeIterator::getRoot()</li> |
| <li>IDOM_Node* IDOM_TreeWalker::getRoot()</li> |
| <li>bool IDOM_Node::hasAttributes() const</li> |
| <li>bool IDOM_Element::hasAttribute(const XMLCh* name) const</li> |
| <li>bool IDOM_Element::hasAttributeNS(const XMLCh* namespaceURI, |
| const XMLCh* localName) const</li> |
| </ul> |
| <li>To fix [Bug 5570], a copy constructor is added to DOM_Range</li> |
| </ul> |
| </s4> |
| |
| <s4 title="Modified Public API"> |
| <ul> |
| <li>To conform to the SAX2 specification, the namespace-prefixes feature |
| in SAX2 is set to off as default.</li> |
| <li>To fix [Bug 6330], the Base64::encode and Base64::decode have been modified |
| as follows</li> |
| <ul> |
| <li>static XMLByte* Base64::encode(const XMLByte* const inputData, |
| const unsigned int inputLength, |
| unsigned int* outputLength);</li> |
| <li>static XMLByte* Base64::decode(const XMLByte* const inputData, |
| unsigned int* outputLength);</li> |
| <li>static XMLCh* decode(const XMLCh* const inputData, |
| unsigned int* outputLength);</li> |
| </ul> |
| <li>To conform to DOM Level 2 specification, the DOM_Node::supports and IDOM_Node::supports |
| are modified to</li> |
| <ul> |
| <li>bool DOM_Node::isSupported(const DOMString &feature, const DOMString &version) const</li> |
| <li>bool IDOM_Node::isSupported(const XMLCh* feature, const XMLCh* version) const</li> |
| </ul> |
| </ul> |
| </s4> |
| |
| <s4 title="Deprecated Public API"> |
| <ul> |
| <li>No Deprecated Public API in this release.</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto160"/> |
| <s2 title="Migrating from &XercesCName; 1.5.2 to 1.6.0"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 1.5.2 code base and the &XercesCName; 1.6.0 code base.</p> |
| |
| <s3 title="New features in &XercesCName; 1.6.0"> |
| <ul> |
| <li>Full Schema support is available in this release. |
| See <jump href="schema.html">the Schema page</jump> for details.</li> |
| <li>New sample SEnumVal to show how to enumerate the markup decls in a Schema Grammar is added.</li> |
| </ul> |
| </s3> |
| |
| <s3 title="Public API Changes in &XercesCName; 1.6.0"> |
| |
| <p>The following lists the public API changes between the &XercesCName; |
| 1.5.2 and the &XercesCName; 1.6.0 releases |
| of the parser. </p> |
| |
| <s4 title="New Public API"> |
| <ul> |
| <li>It should not be a fatal error if a schema InputSource is not found. |
| Add the following new methods:</li> |
| <ul> |
| <li>const bool InputSource::getIssueFatalErrorIfNotFound() const</li> |
| <li>void InputSource::setIssueFatalErrorIfNotFound(const bool flag</li> |
| </ul> |
| <li>Allow code to take advantage of the fact that the length of the prefix and |
| local name are known when constructing the QName. |
| Add the following new methods:</li> |
| <ul> |
| <li>void QName::setNPrefix(const XMLCh*, const unsigned int)</li> |
| <li>void QName::setNLocalPart(const XMLCh*, const unsigned int)</li> |
| </ul> |
| <li>To support schemaLocation and noNamespaceSchemaLocation to be specified outside the |
| instance document, the following new methods are added:</li> |
| <ul> |
| <li>XMLCh* DOMParser::getExternalSchemaLocation() const</li> |
| <li>XMLCh* DOMParser::getExternalNoNamespaceSchemaLocation() const</li> |
| <li>void DOMParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li> |
| <li>void DOMParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li> |
| <li>XMLCh* IDOMParser::getExternalSchemaLocation() const</li> |
| <li>XMLCh* IDOMParser::getExternalNoNamespaceSchemaLocation() const</li> |
| <li>void IDOMParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li> |
| <li>void IDOMParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li> |
| <li>XMLCh* SAXParser::getExternalSchemaLocation() const</li> |
| <li>XMLCh* SAXParser::getExternalNoNamespaceSchemaLocation() const</li> |
| <li>void SAXParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li> |
| <li>void SAXParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li> |
| <li>and the following properties are recognized by SAX2XMLReader:</li> |
| <ul> |
| <li>http://apache.org/xml/properties/schema/external-schemaLocation</li> |
| <li>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation</li> |
| </ul> |
| </ul> |
| <li>To support identity constraints, the following new method is added:</li> |
| <ul> |
| <li>QName* XMLAttr::getAttName() const</li> |
| </ul> |
| </ul> |
| </s4> |
| |
| <s4 title="Modified Public API"> |
| <ul> |
| <li>To support attribute constraint checking, the constant values in XMLAttDef::DefAttTypes have been re-ordered.</li> |
| </ul> |
| </s4> |
| |
| <s4 title="Deprecated Public API"> |
| <ul> |
| <li>Root Element check is moved from XMLValidator to XMLScanner. Thus XMLValidator::checkRootElement() is deprecated.</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto152"/> |
| <s2 title="Migrating from &XercesCName; 1.4.0 to 1.5.2"> |
| <p>The following section is a discussion of the technical differences between |
| &XercesCName; 1.4.0 code base and the &XercesCName; 1.5.2 code base.</p> |
| |
| <s3 title="New features in &XercesCName; 1.5.2"> |
| <p>Schema subset support and an experimental IDOM are available |
| in this release. |
| </p> |
| <s4 title="Schema Subset Support"> |
| <ul> |
| <li>New function "setDoSchema" is added to DOM/SAX parser.</li> |
| <li>New feature "http://apache.org/xml/features/validation/schema" is recognized by SAX2XMLReader.</li> |
| <li>New classes such as SchemaValidator, TraverseSchema ... are added.</li> |
| <li>The Scanner is enhanced to process schema.</li> |
| <li>New sample data files personal-schema.xml and personal.xsd.</li> |
| <li>New command line option "-s" for samples.</li> |
| </ul> |
| <p> |
| See <jump href="schema.html">the Schema page</jump> for details. |
| </p> |
| </s4> |
| |
| <s4 title="Experimental IDOM"> |
| <p>The experimental IDOM API is a new design of the C++ DOM API. If you would like |
| to migrate from DOM to the experimental IDOM, please refer to |
| <jump href="program-idom.html"> |
| IDOM programming guide.</jump> Please note that this experimental IDOM API is only |
| a prototype and is subject to change. |
| </p> |
| </s4> |
| |
| </s3> |
| |
| <s3 title="Changes required to migrate to &XercesCName; 1.5.2"> |
| |
| <p>There are some architectural changes between the &XercesCName; |
| 1.4.0 and the &XercesCName; 1.5.2 releases |
| of the parser, and as a result, some code has undergone restructuring |
| as shown below. </p> |
| |
| <s4 title="Validator directory Reorganization"> |
| <ul> |
| <li>common content model files such as DFAContentModel ... |
| are moved to a new directory called src/validators/common</li> |
| <li>DTD related files are moved to a new directory called src/validators/DTD</li> |
| <li>new directory src/validators/Datatype is created to store all datatype validators</li> |
| <li>new directory src/validators/schema is created to store Schema related files</li> |
| </ul> |
| </s4> |
| |
| <s4 title="DTDValidator"> |
| <p> DTDValidator was design to scan, validate and store the DTD in &XercesCName; 1.4.0 |
| or earlier. In &XercesCName; 1.5.2, this process is broken down into three components: |
| </p> |
| <ul> |
| <li>new class DTDScanner - to scan the DTD</li> |
| <li>new class DTDGrammar - to store the DTD Grammar</li> |
| <li>DTDValidator - to validate the DTD only</li> |
| </ul> |
| </s4> |
| |
| </s3> |
| </s2> |
| |
| <anchor name="Migrateto140"/> |
| <s2 title="Migrating from XML4C 2.x to &XercesCName; 1.4.0"> |
| <p>The following section is a discussion of the technical differences between |
| XML4C 2.x code base and the new &XercesCName; 1.4.0 code base.</p> |
| |
| <s3 title="Summary of changes required to migrate from XML4C 2.x to &XercesCName; 1.4.0"> |
| |
| <p>There are some major architectural changes |
| between the 2.3.x and &XercesCName; 1.4.0 releases |
| of the parser, and as a result the code has undergone |
| significant restructuring. The list below mentions the public |
| api's which existed in 2.3.x and no longer exist in |
| &XercesCName; 1.4.0. It also mentions the |
| &XercesCName; 1.4.0 api which will give you the |
| same functionality. Note: This list is not exhaustive. The |
| API docs (and ultimately the header files) supplement this |
| information.</p> |
| |
| <ul> |
| |
| <li><code>parsers/[Non]Validating[DOM/SAX]parser.hpp</code><br/> |
| These files/classes have all been consolidated in the new |
| version to just two files/classes: |
| <code>[DOM/SAX]Parser.hpp</code>. Validation is now a |
| property which may be set before invoking the |
| <code>parse</code>. Now, the |
| <code>setDoValidation()</code> method controls the |
| validation processing.</li> |
| |
| <li>The <code>framework/XMLDocumentTypeHandler.hpp</code> |
| been replaced with |
| <code>validators/DTD/DocTypeHandler.hpp</code>.</li> |
| |
| <li>The following methods now have different set of |
| parameters because the underlying base class methods have |
| changed in the 3.x release. These methods belong to one of |
| <code>XMLDocumentHandler</code>, |
| <code>XMLErrorReporter</code> or |
| <code>DocTypeHandler</code> interfaces.</li> |
| <ul> |
| <li><code>[Non]Validating[DOM/SAX]Parser::docComment</code></li> |
| <li><code>[Non]Validating[DOM/SAX]Parser::doctypePI</code></li> |
| <li><code>[Non]ValidatingSAXParser::elementDecl</code></li> |
| <li><code>[Non]ValidatingSAXParser::endAttList</code></li> |
| <li><code>[Non]ValidatingSAXParser::entityDecl</code></li> |
| <li><code>[Non]ValidatingSAXParser::notationDecl</code></li> |
| <li><code>[Non]ValidatingSAXParser::startAttList</code></li> |
| <li><code>[Non]ValidatingSAXParser::TextDecl</code></li> |
| <li><code>[Non]ValidatingSAXParser::docComment</code></li> |
| <li><code>[Non]ValidatingSAXParser::docPI</code></li> |
| <li><code>[Non]Validating[DOM/SAX]Parser::endElement</code></li> |
| <li><code>[Non]Validating[DOM/SAX]Parser::startElement</code></li> |
| <li><code>[Non]Validating[DOM/SAX]Parser::XMLDecl</code></li> |
| <li><code>[Non]Validating[DOM/SAX]Parser::error</code></li> |
| </ul> |
| |
| <li>The following methods/data members changed visibility |
| from <code>protected</code> in 2.3.x to |
| <code>private</code> (with public setters and getters, as |
| appropriate).</li> |
| |
| <ul> |
| <li><code>[Non]ValidatingDOMParser::fDocument</code></li> |
| <li><code>[Non]ValidatingDOMParser::fCurrentParent</code></li> |
| <li><code>[Non]ValidatingDOMParser::fCurrentNode</code></li> |
| <li><code>[Non]ValidatingDOMParser::fNodeStack</code></li> |
| </ul> |
| |
| |
| <li>The following files have moved, possibly requiring |
| changes in the <code>#include</code> statements.</li> |
| |
| <ul> |
| <li><code>MemBufInputSource.hpp</code></li> |
| <li><code>StdInInputSource.hpp</code></li> |
| <li><code>URLInputSource.hpp</code></li> |
| </ul> |
| |
| |
| <li>All the DTD validator code was moved from |
| <code>internal</code> to separate |
| <code>validators/DTD</code> directory.</li> |
| |
| <li>The error code definitions which were earlier in |
| <code>internal/ErrorCodes.hpp</code> are now split up into |
| the following files:</li> |
| |
| <ul> |
| <li><code>framework/XMLErrorCodes.hpp </code> - Core XML errors</li> |
| <li><code>framework/XMLValidityCodes.hpp</code> - DTD validity errors</li> |
| <li><code>util/XMLExceptMsgs.hpp </code> - C++ specific exception codes.</li> |
| </ul> |
| </ul> |
| |
| </s3> |
| |
| |
| |
| <s3 title="The Samples"> |
| |
| <p>The sample programs no longer use any of the unsupported |
| util/xxx classes. They only existed to allow us to write |
| portable samples. But, since we feel that the wide character |
| APIs are supported on a lot of platforms these days, it was |
| decided to go ahead and just write the samples in terms of |
| these. If your system does not support these APIs, you will |
| not be able to build and run the samples. On some platforms, |
| these APIs might perhaps be optional packages or require |
| runtime updates or some such action.</p> |
| |
| <p>More samples have been added as well. These highlight some |
| of the new functionality introduced in the new code base. And |
| the existing ones have been cleaned up as well.</p> |
| |
| <p>The new samples are:</p> |
| <ol> |
| <li>PParse - Demonstrates 'progressive parse' (see below)</li> |
| <li>StdInParse - Demonstrates use of the standard in input source</li> |
| <li>EnumVal - Shows how to enumerate the markup decls in a DTD Validator</li> |
| </ol> |
| </s3> |
| |
| |
| <s3 title="Parser Classes"> |
| |
| <p>In the XML4C 2.x code base, there were the following parser |
| classes (in the src/parsers/ source directory): |
| NonValidatingSAXParser, ValidatingSAXParser, |
| NonValidatingDOMParser, ValidatingDOMParser. The |
| non-validating ones were the base classes and the validating |
| ones just derived from them and turned on the validation. |
| This was deemed a little bit overblown, considering the tiny |
| amount of code required to turn on validation and the fact |
| that it makes people use a pointer to the parser in most cases |
| (if they needed to support either validating or non-validating |
| versions.)</p> |
| |
| <p>The new code base just has SAXParer and DOMParser |
| classes. These are capable of handling both validating and |
| non-validating modes, according to the state of a flag that |
| you can set on them. For instance, here is a code snippet that |
| shows this in action.</p> |
| |
| <source>void ParseThis(const XMLCh* const fileToParse, |
| const bool validate) |
| { |
| // |
| // Create a SAXParser. It can now just be |
| // created by value on the stack if we want |
| // to parse something within this scope. |
| // |
| SAXParser myParser; |
| |
| // Tell it whether to validate or not |
| myParser.setDoValidation(validate); |
| |
| // Parse and catch exceptions... |
| try |
| { |
| myParser.parse(fileToParse); |
| } |
| ... |
| };</source> |
| |
| <p>We feel that this is a simpler architecture, and that it makes things |
| easier for you. In the above example, for instance, the parser will be |
| cleaned up for you automatically upon exit since you don't have to |
| allocate it anymore.</p> |
| |
| </s3> |
| |
| |
| <s3 title="Moved Classes to src/framework"> |
| |
| <p>Some of the classes previously in the src/internal/ |
| directory have been moved to their more correct location in |
| the src/framework/ directory. These are classes used by the |
| outside world and should have been framework classes to begin |
| with. Also, to avoid name classes in the absence of C++ namespace |
| support, some of these clashes have been renamed to make them |
| more XML specific and less likely to clash. More |
| classes might end up being moved to framework as well.</p> |
| |
| <p>So you might have to change a few include statements to |
| find these classes in their new locations. And you might have |
| to rename some of the names of the classes, if you used any of |
| the ones whose names were changed.</p> |
| |
| </s3> |
| |
| <s3 title="Util directory Reorganization"> |
| |
| <p>The src/util directory was becoming somewhat of a dumping |
| ground of platform and compiler stuff. So we reworked that |
| directory to better spread things out. The new scheme is: |
| </p> |
| |
| <s4 title="util - The platform independent utility stuff"> |
| <ul> |
| <li>MsgLoaders - Holds the msg loader implementations</li> |
| <ol> |
| <li>ICU</li> |
| <li>InMemory</li> |
| <li>MsgCatalog</li> |
| <li>Win32</li> |
| </ol> |
| <li>Compilers - All the compiler specific files</li> |
| <li>Transcoders - Holds the transcoder implementations</li> |
| <ol> |
| <li>Iconv</li> |
| <li>ICU</li> |
| <li>Win32</li> |
| </ol> |
| <li>Platforms</li> |
| <ol> |
| <li>AIX</li> |
| <li>HP-UX</li> |
| <li>Linux</li> |
| <li>Solaris</li> |
| <li>....</li> |
| <li>Win32</li> |
| </ol> |
| </ul> |
| </s4> |
| |
| <p>This organization makes things much easier to understand. |
| And it makes it easier to find which files you need and which |
| are optional. Note that only per-platform files have any hard |
| coded references to specific message loaders or |
| transcoders. So if you don't include the ICU implementations |
| of these services, you don't need to link in ICU or use any |
| ICU headers. The rest of the system works only in terms of the |
| abstraction APIs.</p> |
| |
| </s3> |
| </s2> |
| |
| </s1> |