You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1605 lines
74 KiB

  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. -->
  18. <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
  19. <s1 title="Migration Archive">
  20. <s2 title="Migrating to earlier Releases">
  21. <ul>
  22. <li><link anchor="Migrateto311">Migrating from &XercesCName; 3.1.0 to 3.1.1</link></li>
  23. <li><link anchor="Migrateto310">Migrating from &XercesCName; 3.0.1 to 3.1.0</link></li>
  24. <li><link anchor="Migrateto301">Migrating from &XercesCName; 3.0.0 to 3.0.1</link></li>
  25. <li><link anchor="Migrateto300">Migrating from &XercesCName; 2.8.0 to 3.0.0</link></li>
  26. <li><link anchor="Migrateto280">Migrating from &XercesCName; 2.7.0 to 2.8.0</link></li>
  27. <li><link anchor="Migrateto270">Migrating from &XercesCName; 2.6.0 to 2.7.0</link></li>
  28. <li><link anchor="Migrateto260">Migrating from &XercesCName; 2.5.0 to 2.6.0</link></li>
  29. <li><link anchor="Migrateto250">Migrating from &XercesCName; 2.4.0 to 2.5.0</link></li>
  30. <li><link anchor="Migrateto240">Migrating from &XercesCName; 2.3.0 to 2.4.0</link></li>
  31. <li><link anchor="Migrateto230">Migrating from &XercesCName; 2.2.0 to 2.3.0</link></li>
  32. <li><link anchor="Migrateto220">Migrating from &XercesCName; 2.1.0 to 2.2.0</link></li>
  33. <li><link anchor="Migrateto210">Migrating from &XercesCName; 2.0.0 to 2.1.0</link></li>
  34. <li><link anchor="Migrateto200">Migrating from &XercesCName; 1.7.0 to 2.0.0</link></li>
  35. <li><link anchor="Migrateto170">Migrating from &XercesCName; 1.6.0 to 1.7.0</link></li>
  36. <li><link anchor="Migrateto160">Migrating from &XercesCName; 1.5.2 to 1.6.0</link></li>
  37. <li><link anchor="Migrateto152">Migrating from &XercesCName; 1.4.0 to 1.5.2</link></li>
  38. <li><link anchor="Migrateto140">Migrating from XML4C 2.x to 1.4.0</link></li>
  39. </ul>
  40. </s2>
  41. <anchor name="Migrateto311"/>
  42. <s2 title="Migrating from &XercesCName; 3.1.0 to &XercesCName; 3.1.1">
  43. <p>&XercesCName; 3.1.1 is a bugfix-only release and is
  44. binary-compatible with &XercesCName; 3.1.0.</p>
  45. </s2>
  46. <anchor name="Migrateto310"/>
  47. <s2 title="Migrating from &XercesCName; 3.0.1 to &XercesCName; 3.1.0">
  48. <p>The following section is a discussion of the technical differences between
  49. &XercesCName; 3.0.1 and &XercesCName; 3.1.0.</p>
  50. <p>Topics discussed are:</p>
  51. <ul>
  52. <li><link anchor="NewFeatures310">New features in &XercesCName; 3.1.0</link></li>
  53. <li><link anchor="API310">Public API Changes</link></li>
  54. </ul>
  55. <anchor name="NewFeatures310"/>
  56. <s3 title="New features in &XercesCName; 3.1.0">
  57. <ul>
  58. <li>Working multi-import support. The support for handling multiple import
  59. declarations with the same target namespaces has been improved and
  60. thoroughly tested. Furthermore, the same logic was extended to
  61. loadGrammar and the schemaLocation attributes so that you can load
  62. several schemas with the same namespace and/or "add" more declarations
  63. with the schemaLocation attributes. To enable this feature, set the
  64. XMLUni::fgXercesHandleMultipleImports feature/parameter to true.
  65. Starting with this release all the tests and examples have multi-import
  66. support enabled by default.</li>
  67. <li>New property, XMLUni::fgXercesLowWaterMark, allows to configure the
  68. parser buffer low water mark. In particular, setting this value to 0
  69. disables data caching in the parser which can be useful if you want
  70. the SAX events to be dispatched as soon as the data is available.</li>
  71. <li>DOMLSParser::parseWithContext implementation. In particular, this
  72. functionality allows one to parse a document fragment with missing
  73. namespace declarations as long as the context document provides them.</li>
  74. <li>Improved performance and reduced memory footprint when validating with
  75. large maxOccurs values. If available, the SSE2 instructions are used to
  76. further speedup this case.</li>
  77. <li>Improved scalability of the XML Schema identity checking (key, keyref,
  78. and unique).</li>
  79. <li>Multiple XML Schema conformance fixes.</li>
  80. <li>More robust external library detection (libcurl and ICU). In particular,
  81. the build system no longer tries to inject any additional paths such as
  82. /usr or /usr/local.</li>
  83. <li>Compilation of the ICU message loader resources no longer depends on
  84. the ICU implementation details.</li>
  85. </ul>
  86. </s3>
  87. <anchor name="API310"/>
  88. <s3 title="Public API Changes">
  89. <p>&XercesCName; 3.1.0 is a minor release and does
  90. not include any public API changes that would preclude
  91. applications using the previous version of &XercesCName; from
  92. building successfully with this version.</p>
  93. </s3>
  94. </s2>
  95. <anchor name="Migrateto301"/>
  96. <s2 title="Migrating from &XercesCName; 3.0.0 to &XercesCName; 3.0.1">
  97. <p>&XercesCName; 3.0.1 is a bugfix-only release and is
  98. binary-compatible with &XercesCName; 3.0.0.</p>
  99. </s2>
  100. <anchor name="Migrateto300"/>
  101. <s2 title="Migrating from &XercesCName; 2.8.0 to &XercesCName; 3.0.0">
  102. <p>The following section is a discussion of the technical differences between
  103. &XercesCName; 2.8.0 and &XercesCName; 3.0.0.</p>
  104. <p>Topics discussed are:</p>
  105. <ul>
  106. <li><link anchor="NewFeatures300">New features in &XercesCName; 3.0.0</link></li>
  107. <li><link anchor="API300">Public API Changes</link></li>
  108. <ul>
  109. <li><link anchor="NewAPI300">New Public API</link></li>
  110. <li><link anchor="ModifiedAPI300">Modified Public API</link></li>
  111. <li><link anchor="DeprecatedAPI300">Deprecated/Removed Public API</link></li>
  112. </ul>
  113. </ul>
  114. <anchor name="NewFeatures300"/>
  115. <s3 title="New features in &XercesCName; 3.0.0">
  116. <ul>
  117. <li>Autotools-based build system for the UNIX/Linux/Mac OS X platforms</li>
  118. <li>Project files for VC++ 9</li>
  119. <li>Support for the ICU transcoder in VC++ 7.1, 8, and 9 project files</li>
  120. <li>libcurl-based net accessor</li>
  121. <li>Support for XInclude in DOM</li>
  122. <li>Support for both XPath 1 and XPath 2 models in the DOM XPath interface</li>
  123. <li>Support for the XML Schema subset of XPath 1 in DOM</li>
  124. <li>Conformance to the final DOM Level 3 interface specification</li>
  125. <li>Ability to provide custom DOM memory manager as well as tune the global DOM heap parameters</li>
  126. <li>All public and widely used interfaces as well as a large
  127. portion of the implementation were converted to be 64-bit safe.</li>
  128. <li>Various XML Schema fixes including the fix for the large
  129. maxOccurs and minOccurs bug as well as for the changed ##other
  130. interpretation</li>
  131. <li>Reviewed and cleaned up diagnostics messages</li>
  132. <li>Optimizations for SAX/SAX2 and DOM parsing as well as XML Schema
  133. validation</li>
  134. </ul>
  135. </s3>
  136. <anchor name="API300"/>
  137. <s3 title="Public API Changes">
  138. <p>&XercesCName; 3.0.0 is a major release and includes
  139. a number of application-breaking interface changes compared to
  140. &XercesCName; 2 series.
  141. The following sub-sections provide an overview of the public API
  142. changes between &XercesCName; 2 series and this release.</p>
  143. <anchor name="NewAPI300"/>
  144. <s4 title="New Public APIs">
  145. <ul>
  146. <li>XMLGrammarPoolImpl implementation has been moved to
  147. framework/ and is now publicly accessible</li>
  148. <li>DOM XPath interfaces now support XPath 2 model</li>
  149. <li>A number of DOM interfaces (DOMLSInput, DOMLSOuput,
  150. DOMLSParser, DOMLSSerializer, DOMConfiguration, etc.)
  151. were added as part of the the final DOM Level 3
  152. specification conformance work</li>
  153. </ul>
  154. </s4>
  155. <anchor name="ModifiedAPI300"/>
  156. <s4 title="Modified Public APIs">
  157. <p>A large number of public APIs have been modified. Consult
  158. individual interface documentation for details. The following
  159. list gives an overview of major changes:</p>
  160. <ul>
  161. <li>Several DOM interfaces have been adjusted to conform to the final
  162. DOM Level 3 specification</li>
  163. <li>DOM XPath interfaces have been adjusted to support both XPath 1
  164. and XPath 2</li>
  165. <li>Many public interfaces that used int/long types to represent
  166. memory-related sizes, counts, indexes, etc., have been modified
  167. to use the 64-bit safe XMLSize_t type instead</li>
  168. </ul>
  169. </s4>
  170. <anchor name="DeprecatedAPI300"/>
  171. <s4 title="Deprecated/Removed Public APIs">
  172. <p>All APIs marked as deprecated in &XercesCName; 2 series have
  173. been removed in this release. In particular deprecated DOM
  174. (depdom) as well as COM support have been removed.</p>
  175. <p>Furthermore, a number of DOM interfaces (DOMBuilder, DOMWriter,
  176. DOMInputSource, etc.) were replaced as part of the the final
  177. DOM Level 3 specification conformance work.</p>
  178. </s4>
  179. </s3>
  180. </s2>
  181. <anchor name="Migrateto280"/>
  182. <s2 title="Migrating from &XercesCName; 2.7.0 to &XercesCName; 2.8.0">
  183. <p>The following section is a discussion of the technical differences between
  184. &XercesCName; 2.7.0 code base and the &XercesCName; 2.8.0.</p>
  185. <p>Topics discussed are:</p>
  186. <ul>
  187. <li><link anchor="NewFeatures280">New features in &XercesCName; 2.8.0</link></li>
  188. <li><link anchor="API280">Public API Changes</link></li>
  189. <ul>
  190. <li><link anchor="NewAPI280">New Public API</link></li>
  191. <li><link anchor="ModifiedAPI280">Modified Public API</link></li>
  192. <li><link anchor="DeprecatedAPI280">Deprecated/Removed Public API</link></li>
  193. </ul>
  194. </ul>
  195. <anchor name="NewFeatures280"/>
  196. <s3 title="New features in &XercesCName; 2.8.0">
  197. <ul>
  198. <li>Exponential growth of memory block (from 16KB to 128KB) that are allocated by the DOM heap.</li>
  199. <li>The NODE_CLONED notification is now sent to each node's user data handler when cloning the entire DOMDocument.</li>
  200. <li>On Windows extract the registry code page from MIME\Database\Charset\&lt;encoding>\@InternetEncoding instead of MIME\Database\Charset\&lt;encoding>\@Codepage.</li>
  201. <li>Allow whitespace-only nodes to be added as children of a DOMDocument.</li>
  202. <li>When a node is cloned or imported the type information (PSVI) is also copied.</li>
  203. <li>When using SAX2, including XMLReaderFactory to use createXMLReader doesn't include xercesc/parsers/SAX2XMLReaderImpl.hpp anymore. If you need to cast the SAX2XMLReader to SAX2XMLReaderImpl,
  204. you need to include this header yourself.</li>
  205. </ul>
  206. </s3>
  207. </s2>
  208. <anchor name="Migrateto270"/>
  209. <s2 title="Migrating from &XercesCName; 2.6.0 to &XercesCName; 2.7.0">
  210. <p>The following section is a discussion of the technical differences between
  211. &XercesCName; 2.6.0 code base and the &XercesCName; 2.7.0.</p>
  212. <p>Topics discussed are:</p>
  213. <ul>
  214. <li><link anchor="NewFeatures270">New features in &XercesCName; 2.7.0</link></li>
  215. <li><link anchor="API270">Public API Changes</link></li>
  216. <ul>
  217. <li><link anchor="NewAPI270">New Public API</link></li>
  218. <li><link anchor="ModifiedAPI270">Modified Public API</link></li>
  219. <li><link anchor="DeprecatedAPI270">Deprecated/Removed Public API</link></li>
  220. </ul>
  221. </ul>
  222. <anchor name="NewFeatures270"/>
  223. <s3 title="New features in &XercesCName; 2.7.0">
  224. <ul>
  225. <li>Feature to not generate XML Schema annotations. That is, not to add them to the grammar. If you don't need annotations you may want to turn on this feature to avoid memory bloat for XML Schemas that use annotations heavily.</li>
  226. <li>Option to skip regenerating the XML Schema annotations when deserializing a grammar. If you don't need annotations you may want to turn on this option to avoid memory bloat for XML Schemas that use annotations heavily.</li>
  227. <li>Feature to not perform default entity resolution. When the entityResolver returns NULL, the parser doesn't try to resolve the entity externally.</li>
  228. <li>Feature to do schema-only validation even if there is a DTD.</li>
  229. </ul>
  230. </s3>
  231. <anchor name="API270"/>
  232. <s3 title="Public API Changes">
  233. <p>The following lists the public API changes between the &XercesCName;
  234. 2.6.0; and the &XercesCName; 2.7.0 releases
  235. of the parser. </p>
  236. <anchor name="NewAPI270"/>
  237. <s4 title="New Public API">
  238. <ul>
  239. <li>XMLString: subString, compareIStringASCII, lowercaseASCII, uppercaseASCII</li>
  240. <li>RefHash2KeysTableOf: rehashing support</li>
  241. <li>XMemory: placement new and delete</li>
  242. <li>SAX2XMLFilter</li>
  243. </ul>
  244. </s4>
  245. <anchor name="ModifiedAPI270"/>
  246. <s4 title="Modified Public API">
  247. </s4>
  248. <anchor name="DeprecatedAPI270"/>
  249. <s4 title="Deprecated/Removed Public API">
  250. </s4>
  251. </s3>
  252. </s2>
  253. <anchor name="Migrateto260"/>
  254. <s2 title="Migrating from &XercesCName; 2.5.0 to &XercesCName; 2.6.0">
  255. <p>The following section is a discussion of the technical differences between
  256. &XercesCName; 2.5.0 code base and the &XercesCName; 2.6.0.</p>
  257. <p>Topics discussed are:</p>
  258. <ul>
  259. <li><link anchor="NewFeatures260">New features in &XercesCName; 2.6.0</link></li>
  260. <li><link anchor="API260">Public API Changes</link></li>
  261. <ul>
  262. <li><link anchor="NewAPI260">New Public API</link></li>
  263. <li><link anchor="ModifiedAPI260">Modified Public API</link></li>
  264. <li><link anchor="DeprecatedAPI260">Deprecated/Removed Public API</link></li>
  265. <li>Please note the following source code incompatibility: Rename VALUE_CONSTRAINT enumeration values in XSConstants.hpp due to conflict with system header. New
  266. values are VALUE_CONSTRAINT_NONE, VALUE_CONSTRAINT_DEFAULT and VALUE_CONSTRAINT_FIXED. Old
  267. values are VC_NONE, VC_DEFAULT and VC_FIXED.</li>
  268. <li>Also note that if you have implemented your own XMLGrammarPool implementation, that
  269. the original getXSModel has been marked deprecated and a new method, of the same
  270. name, that takes a bool parameter has been added. This new getXSModel needs
  271. to always return an XSModel.</li>
  272. </ul>
  273. </ul>
  274. <anchor name="NewFeatures260"/>
  275. <s3 title="New features in &XercesCName; 2.6.0">
  276. <ul>
  277. <li>Reduce footprint of DLL by building the deprecated DOM as a separate library</li>
  278. <li>Improve packaging scripts</li>
  279. <li>Enable ID's to work on all kinds of schema components</li>
  280. <li>Add messages to DOMExceptions along with the error code</li>
  281. <li>Improve annotation error-reporting capabilities</li>
  282. <li>Make grammar caching work with DTD internal subsets</li>
  283. <li>Bring parser up to the XML 1.0 3rd Edition</li>
  284. <li>Update to the XML 1.1 recommendation</li>
  285. <li>Add new method to DOMDocument so that DOM level-2 style DOMDocumentTypes (which have a
  286. DOMDocument to own them) can be created</li>
  287. <li>Feature for disabling identity constraints</li>
  288. <li>Update schema errata</li>
  289. <li>Provide means to get actual values out of PSVI/schema component model</li>
  290. <li>Synthesize annotation components for non-schema attributes</li>
  291. <li>Expose partial PSVIElement information at the start element call</li>
  292. <li>Externalize validation, actual/canonical value production for arbitrary strings</li>
  293. <li>Laxly validate schema annotations</li>
  294. <li>Upgrade to ICU 3.0</li>
  295. <li>Handle elements with a large number of attributes more efficiently</li>
  296. </ul>
  297. </s3>
  298. <anchor name="API260"/>
  299. <s3 title="Public API Changes">
  300. <p>The following lists the public API changes between the &XercesCName;
  301. 2.5.0; and the &XercesCName; 2.6.0 releases
  302. of the parser. </p>
  303. <anchor name="NewAPI260"/>
  304. <s4 title="New Public API">
  305. <ul>
  306. <li>XSValue</li>
  307. <li>IdentityConstraintHandler</li>
  308. <li>XMLBufferFullHandler</li>
  309. <li>XMLString: removeChar, isValidNOTATION</li>
  310. <li>XMLUri: normalizeUri</li>
  311. <li>PSVIHandler: handlePartialElementPSVI</li>
  312. <li>RefHash family of classes: getHashModulus</li>
  313. <li>XSAnnotation: setline/col and systemid</li>
  314. <li>XMLReader: handeEOL</li>
  315. <li>XMLChar: isValidNmToken</li>
  316. <li>XMLBigDecimal: parseDecimal, getIntVal</li>
  317. <li>HexBin: getCanonicalRepresentation, decode</li>
  318. <li>Base64: getCanonicalRepresentation, decode</li>
  319. <li>XMLBigInteger: compareValues</li>
  320. <li>XMLAbstractDoubleFloat: isDataConverted, getValue, isDataOverFlowed</li>
  321. <li>PSVIItem: getActualValue</li>
  322. <li>XSSimpleTypeDefinition: getDatatypeValidator</li>
  323. <li>RefHash2KeysTableOf: transferElement</li>
  324. <li>XMLGrammarPool: getXSModel</li>
  325. </ul>
  326. </s4>
  327. <anchor name="ModifiedAPI260"/>
  328. <s4 title="Modified Public API">
  329. <ul>
  330. <li>XSerializeEngine constructor</li>
  331. <li>MACUnicodeConverters</li>
  332. </ul>
  333. </s4>
  334. <anchor name="DeprecatedAPI260"/>
  335. <s4 title="Deprecated/Removed Public API">
  336. <ul>
  337. <li>XSerializeEngine constructor</li>
  338. <li>DTDAttDef: getDOMTypeInfoName, getDOMTypeInfoUri</li>
  339. <li>DTDElementDecl: getDOMTypeInfoName, getDOMTypeInfoUri</li>
  340. <li>SchemaAttDef: setAnyDatatypeValidator</li>
  341. <li>UnionDatatypeValidator: getMemberTypeName, getMemberTypeUri, getMemberTypeAnonymous, getMemberTypeValidator</li>
  342. <li>XMLAttr: getValidatingTypeURI, getValidatingTypeName, setDatatypeValidator, setSchemaValidated</li>
  343. <li>ComplexTypeInfo: setContentModel</li>
  344. <li>XMLGrammarPool: getXSModel</li>
  345. <li>SAXParser, mark this class deprecated</li>
  346. </ul>
  347. </s4>
  348. </s3>
  349. </s2>
  350. <anchor name="Migrateto250"/>
  351. <s2 title="Migrating from &XercesCName; 2.4.0 to &XercesCName; 2.5.0">
  352. <p>The following section is a discussion of the technical differences between
  353. &XercesCName; 2.4.0 code base and the &XercesCName; 2.5.0.</p>
  354. <p>Topics discussed are:</p>
  355. <ul>
  356. <li><link anchor="NewFeatures250">New features in &XercesCName; 2.5.0</link></li>
  357. <li><link anchor="API250">Public API Changes</link></li>
  358. <ul>
  359. <li><link anchor="NewAPI250">New Public API</link></li>
  360. <li><link anchor="ModifiedAPI250">Modified Public API</link></li>
  361. <li><link anchor="DeprecatedAPI250">Deprecated/Removed Public API</link></li>
  362. </ul>
  363. </ul>
  364. <anchor name="NewFeatures250"/>
  365. <s3 title="New features in &XercesCName; 2.5.0">
  366. <ul>
  367. <li>Fix duplicate attribute detection when namespaces are disabled </li>
  368. <li>Stricter use of static memory manager for static data only</li>
  369. <li>PSVI bug fix and enhencement </li>
  370. <li>ThreadTest with grammar caching</li>
  371. <li>Re-pluggable Panic Handler</li>
  372. <li>Enhenced mutex creation to impove thread safety</li>
  373. <li>Intrinsic transcoding support for 390.</li>
  374. <li>Canonical Representation Support </li>
  375. <li>New sample SCMPrint</li>
  376. <li>New sample PSVIWriter</li>
  377. <li>New test XSerializerTest</li>
  378. </ul>
  379. </s3>
  380. <anchor name="API250"/>
  381. <s3 title="Public API Changes">
  382. <p>The following lists the public API changes between the &XercesCName;
  383. 2.4.0; and the &XercesCName; 2.5.0 releases
  384. of the parser. </p>
  385. <anchor name="NewAPI250"/>
  386. <s4 title="New Public API">
  387. <ul>
  388. <li></li>
  389. </ul>
  390. </s4>
  391. <anchor name="ModifiedAPI250"/>
  392. <s4 title="Modified Public API">
  393. <ul>
  394. <li></li>
  395. </ul>
  396. </s4>
  397. <anchor name="DeprecatedAPI250"/>
  398. <s4 title="Deprecated/Removed Public API">
  399. <ul>
  400. <li></li>
  401. </ul>
  402. </s4>
  403. </s3>
  404. </s2>
  405. <anchor name="Migrateto240"/>
  406. <s2 title="Migrating from &XercesCName; 2.3.0 to &XercesCName; 2.4.0">
  407. <p>The following section is a discussion of the technical differences between
  408. &XercesCName; 2.3.0 code base and the &XercesCName; 2.4.0.</p>
  409. <p>Topics discussed are:</p>
  410. <ul>
  411. <li><link anchor="NewFeatures240">New features in &XercesCName; 2.4.0</link></li>
  412. <li><link anchor="API240">Public API Changes</link></li>
  413. <ul>
  414. <li><link anchor="NewAPI240">New Public API</link></li>
  415. <li><link anchor="ModifiedAPI240">Modified Public API</link></li>
  416. <li><link anchor="DeprecatedAPI240">Deprecated/Removed Public API</link></li>
  417. </ul>
  418. </ul>
  419. <anchor name="NewFeatures240"/>
  420. <s3 title="New features in &XercesCName; 2.4.0">
  421. <ul>
  422. <li>PSVI</li>
  423. <li>Performance enhancement</li>
  424. <li>Stateless Grammar </li>
  425. <li>Grammar Serialization/Deserialiation</li>
  426. </ul>
  427. </s3>
  428. <anchor name="API240"/>
  429. <s3 title="Public API Changes">
  430. <p>The following lists the public API changes between the &XercesCName;
  431. 2.3.0; and the &XercesCName; 2.4.0 releases
  432. of the parser. </p>
  433. <anchor name="NewAPI240"/>
  434. <s4 title="New Public API">
  435. <ul>
  436. <li>PSVI related</li>
  437. <li>Grammar serialization/deserialization related</li>
  438. </ul>
  439. </s4>
  440. <anchor name="ModifiedAPI240"/>
  441. <s4 title="Modified Public API">
  442. <ul>
  443. <li></li>
  444. </ul>
  445. </s4>
  446. <anchor name="DeprecatedAPI240"/>
  447. <s4 title="Deprecated/Removed Public API">
  448. <ul>
  449. <li>XMLAttDef: getProvided, getDOMTypeInfoUri, getDOMTypeInfoName, setProvided</li>
  450. <li>XMLAttDefList: hasMoreElements, nextElement, Reset</li>
  451. <li>DTDAttDefList: hasMoreElements, nextElement, Reset</li>
  452. <li>SchemaAttDefList: hasMoreElements, nextElement, Reset</li>
  453. <li>XMLElementDecl: LookupOpts</li>
  454. <li>XMLNumber family: toString</li>
  455. <li>ENTITYDatatypeValidator: setEntityDeclPool</li>
  456. <li>IDDatatypeValidator: setIDRefList</li>
  457. <li>IDREFDatatypeValidator: setIDRefList</li>
  458. <li>GeneralAttributeCheck: setIDRefList</li>
  459. <li>SchemaGrammar: getIDRefList</li>
  460. <li>SchemaElementDecl: all non thread safe methods </li>
  461. <li>SchemaAttDef: getters </li>
  462. <li>DTDGrammar: getRootElemId</li>
  463. </ul>
  464. </s4>
  465. </s3>
  466. </s2>
  467. <anchor name="Migrateto230"/>
  468. <s2 title="Migrating from &XercesCName; 2.2.0 to &XercesCName; 2.3.0">
  469. <p>The following section is a discussion of the technical differences between
  470. &XercesCName; 2.2.0 code base and the &XercesCName; 2.3.0.</p>
  471. <p>Topics discussed are:</p>
  472. <ul>
  473. <li><link anchor="NewFeatures230">New features in &XercesCName; 2.3.0</link></li>
  474. <li><link anchor="API230">Public API Changes</link></li>
  475. <ul>
  476. <li><link anchor="NewAPI230">New Public API</link></li>
  477. <li><link anchor="ModifiedAPI230">Modified Public API</link></li>
  478. <li><link anchor="DeprecatedAPI230">Deprecated/Removed Public API</link></li>
  479. </ul>
  480. </ul>
  481. <anchor name="NewFeatures230"/>
  482. <s3 title="New features in &XercesCName; 2.3.0">
  483. <ul>
  484. <li>Experimental Implementation of Namespaces in XML 1.1 </li>
  485. <li>Experimental Implementation of XML 1.1: in DOMWriter</li>
  486. <li>More Schema 1.0 Errata Implementation</li>
  487. <li>More DOM L3 Core Support</li>
  488. <ul>
  489. <li>DOMConfiguration</li>
  490. <li>Document Normalization</li>
  491. </ul>
  492. <li>Plugable Memory Manager</li>
  493. <li>Plugable Security Manager</li>
  494. <li>Plugable Panic Handler</li>
  495. <li>Logical Path Resolution</li>
  496. </ul>
  497. </s3>
  498. <anchor name="API230"/>
  499. <s3 title="Public API Changes">
  500. <p>The following lists the public API changes between the &XercesCName;
  501. 2.2.0; and the &XercesCName; 2.3.0 releases
  502. of the parser. </p>
  503. <anchor name="NewAPI230"/>
  504. <s4 title="New Public API">
  505. <ul>
  506. <li>To support additional DOM L3 functions, the following are added:</li>
  507. <li>DOMDocument: getDOMConfiguration</li>
  508. <li>DOMConfiguration class for document normalization.</li>
  509. </ul>
  510. </s4>
  511. <anchor name="ModifiedAPI230"/>
  512. <s4 title="Modified Public API">
  513. <ul>
  514. <li></li>
  515. </ul>
  516. </s4>
  517. <anchor name="DeprecatedAPI230"/>
  518. <s4 title="Deprecated/Removed Public API">
  519. <ul>
  520. <li>DOMDocument canSetNormalizationFeature, setNormalizationFeature, getNormalizationFeature, getErrorHandler, setErrorHandler removed</li>
  521. </ul>
  522. </s4>
  523. </s3>
  524. </s2>
  525. <anchor name="Migrateto220"/>
  526. <s2 title="Migrating from &XercesCName; 2.1.0 to &XercesCName; 2.2.0">
  527. <p>The following section is a discussion of the technical differences between
  528. &XercesCName; 2.1.0 code base and the &XercesCName; 2.2.0.</p>
  529. <p>Topics discussed are:</p>
  530. <ul>
  531. <li><link anchor="NewFeatures220">New features in &XercesCName; 2.2.0</link></li>
  532. <li><link anchor="CPPNamespace220">Using C++ Namespace</link></li>
  533. <li><link anchor="API220">Public API Changes</link></li>
  534. <ul>
  535. <li><link anchor="NewAPI220">New Public API</link></li>
  536. <li><link anchor="ModifiedAPI220">Modified Public API</link></li>
  537. <li><link anchor="DeprecatedAPI220">Deprecated/Removed Public API</link></li>
  538. </ul>
  539. </ul>
  540. <anchor name="NewFeatures220"/>
  541. <s3 title="New features in &XercesCName; 2.2.0">
  542. <ul>
  543. <li>C++ Namespace Support</li>
  544. <li>Schema 1.0 Errata Implementation</li>
  545. <li>Experimental Implementation of XML 1.1</li>
  546. <li>More DOM L3 Core Support:</li>
  547. <ul>
  548. <li>DOMNode: baseURI</li>
  549. <li>DOMAttr: isId, getTypeInfo</li>
  550. <li>DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo</li>
  551. </ul>
  552. <li>DOM Message: make use of the non-standard extension DOMImplementation::loadDOMExceptionMsg
  553. to load the default error text message for the correspond Exception Code.</li>
  554. <li>New feature XMLPlatformUtils::Initialize(const char* const locale) to set
  555. the locale for message loader. See <jump href="program-others-&XercesC3Series;.html#SpecifylocaleforMessageLoader">
  556. Specify locale for Message Loader</jump> for details</li>
  557. <li>Support Build with ICU Message Loader, or Message Catalog Message Loader</li>
  558. <li>RPM for Linux</li>
  559. <li>390: Uniconv390 support</li>
  560. <li>390: support record-oriented MVS datasets with the DOM Level 3 serialization APIs</li>
  561. <li>Support for Linux/390</li>
  562. <li>Performance: Break Scanner for different functionalities and many other performance improvement</li>
  563. <li>New feature, "http://apache.org/xml/features/dom/byte-order-mark", allows user to enable
  564. DOMWriter to write Byte-Order-Mark in the output XML stream,
  565. See <jump href="program-dom-&XercesC3Series;.html#Byte-Order-Mark">
  566. Xercesc Feature: Byte Order Mark</jump> for details</li>
  567. </ul>
  568. </s3>
  569. <anchor name="CPPNamespace220"/>
  570. <s3 title="Using C++ Namespace">
  571. <p>&XercesCName; 2.2.0 now supports C++ Namespace. All &XercesCName;
  572. classes, data and variables are defined in the &XercesC3Namespace; namespace
  573. if C++ Namespace support is ENABLED.</p>
  574. <p>All the binary distributions of &XercesCName; 2.2.0 are now built with
  575. C++ Namespace enabled. Therefore users' applications that links with the distributed
  576. binary packages must namespace qualify all the &XercesCName; classes, data and variables.</p>
  577. <p>See the Programming Guide <jump href="program-others-&XercesC3Series;.html#CPPNamespace">Using C++ Namespace</jump>
  578. for details.</p>
  579. </s3>
  580. <anchor name="API220"/>
  581. <s3 title="Public API Changes">
  582. <p>The following lists the public API changes between the &XercesCName;
  583. 2.1.0; and the &XercesCName; 2.2.0 releases
  584. of the parser. </p>
  585. <anchor name="NewAPI220"/>
  586. <s4 title="New Public API">
  587. <ul>
  588. <li>To support additional DOM L3 functions, the following are added:</li>
  589. <ul>
  590. <li>DOMAttr: isId, getTypeInfo</li>
  591. <li>DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo</li>
  592. <li>Added DOMTypeInfo class for getTypeInfo class in DOMElement and DOMAttr</li>
  593. <li>Added getDOMTypeInfoUri, getDOMTypeInfoName to XMLAttDef and XMLElementDecl for use in building DOMTypeInfo</li>
  594. </ul>
  595. <li>Added a non-standard extension DOMImplementation::loadDOMExceptionMsg to load the
  596. default error message for the corresponding DOMException code.</li>
  597. <li>XMLAttr: Added a constructor and a set method to allow creating/setting of
  598. XMLAttr using a rawname.</li>
  599. <li>Added XMLUri::getUriText to return the URI as a string specification.</li>
  600. <li>Add XMLString::fixURI to transform an absolute path filename to standard URI form.</li>
  601. <li>Added XMLString::equals for faster string comparison.</li>
  602. <li>To allow users to tell the parser to force standard uri conformance,
  603. the following are added:</li>
  604. <ul>
  605. <li>XercesDOMParser/DOMParser/SAXParser: get/setStandardUriConformant</li>
  606. <li>and DOMBuilder/SAX2XMLReader will recognize the feature
  607. http://apache.org/xml/features/standard-uri-conformant</li>
  608. </ul>
  609. <li>Add XMLURL::hasInvalidChar() to indicate if the URL has invalid char as per RFC standard</li>
  610. <li>To allow users to enable/disable src offset calculation,
  611. the following are added:</li>
  612. <ul>
  613. <li>XercesDOMParser/DOMParser/SAXParser: get/setCalculateSrcOfs</li>
  614. <li>and DOMBuilder/SAX2XMLReader will recognize the feature
  615. http://apache.org/xml/features/calculate-src-ofst</li>
  616. </ul>
  617. <li>To allow users to select the scanner when scanning XML documents,
  618. the following are added:</li>
  619. <ul>
  620. <li>XercesDOMParser/DOMParser/SAXParser: useScanner</li>
  621. <li>and DOMBuilder/SAX2XMLReader will recognize the property
  622. http://apache.org/xml/properties/scannerName</li>
  623. </ul>
  624. <li>Added getSrcOffset to XercesDOMParser/DOMParser/SAXParser/DOMBuilder/SAX2XMLReader to
  625. allow users to get the current src offset within the input source.</li>
  626. </ul>
  627. </s4>
  628. <anchor name="ModifiedAPI220"/>
  629. <s4 title="Modified Public API">
  630. <ul>
  631. <li>The following DOM functions are being added a const modifier.</li>
  632. <ul>
  633. <li>DOMImplementation::hasFeature</li>
  634. <li>DOMNode: isSameNode, isEqualNode, compareTreePosition</li>
  635. </ul>
  636. <li>XMLPlatformUtils::Initialize() takes a parameter specifying locale
  637. for message loader, with default value "en_US".</li>
  638. <li>To fix [Bug 13641], the QName copy constructor is corrected to take
  639. a reference as parameter, i.e. QName(const QName&amp; qname).</li>
  640. <li>To fix [Bug 12232], the QName operator== has been added a const modified.</li>
  641. <li>Move XMLUri copy constructor and operator = as public.</li>
  642. <li>Move XMLUri::isURIString as public.</li>
  643. <li>For validation purpose, added two more default parameters to
  644. XMLValidator::validateAttrValue.</li>
  645. <li>To fix [Bug 15802], the getURIText of DOMParser/XercesDOMParser/SAXParser/SAX2XMLReader
  646. are being added a const modifier.</li>
  647. </ul>
  648. </s4>
  649. <anchor name="DeprecatedAPI220"/>
  650. <s4 title="Deprecated/Removed Public API">
  651. <ul>
  652. <li>No Deprecated Public API in this release.</li>
  653. </ul>
  654. </s4>
  655. </s3>
  656. </s2>
  657. <anchor name="Migrateto210"/>
  658. <s2 title="Migrating from &XercesCName; 2.0.0 to &XercesCName; 2.1.0">
  659. <p>The following section is a discussion of the technical differences between
  660. &XercesCName; 2.0.0 code base and the &XercesCName; 2.1.0.</p>
  661. <p>Topics discussed are:</p>
  662. <ul>
  663. <li><link anchor="NewFeatures210">New features in &XercesCName; 2.1.0</link></li>
  664. <li><link anchor="API210">Public API Changes</link></li>
  665. <ul>
  666. <li><link anchor="NewAPI210">New Public API</link></li>
  667. <li><link anchor="ModifiedAPI210">Modified Public API</link></li>
  668. <li><link anchor="DeprecatedAPI210">Deprecated/Removed Public API</link></li>
  669. </ul>
  670. </ul>
  671. <anchor name="NewFeatures210"/>
  672. <s3 title="New features in &XercesCName; 2.1.0">
  673. <ul>
  674. <li>64 bit binaries distribution on Windows IA64 and Linux IA64</li>
  675. <li>Support for Cygwin environment</li>
  676. <li>DOM Level 3 DOMNode: compareTreePosition, lookupNamespaceURI, lookupNamespacePrefix and isDefaultNamespace</li>
  677. <li>plus many more bug fixes</li>
  678. </ul>
  679. </s3>
  680. <anchor name="API210"/>
  681. <s3 title="Public API Changes">
  682. <p>The following lists the public API changes between the &XercesCName;
  683. 2.0.0; and the &XercesCName; 2.1.0 releases
  684. of the parser. </p>
  685. <anchor name="NewAPI210"/>
  686. <s4 title="New Public API">
  687. <ul>
  688. <li>To fix bug 7087, XMLEnumerator is added a virtual destructor.</li>
  689. <li>To fix bug 11448, XMLNotationDecl::get/setBaseURI, and XMLEntityDecl::get/setBaseURI are added.</li>
  690. </ul>
  691. </s4>
  692. <anchor name="ModifiedAPI210"/>
  693. <s4 title="Modified Public API">
  694. <ul>
  695. <li>DOMNodeList: item, and getLength have been added a const modifier.</li>
  696. <li>DOMNode: lookupNamespacePrefix, isDefaultNamespace, and lookupNamespaceURI have been added a const modifier.</li>
  697. </ul>
  698. </s4>
  699. <anchor name="DeprecatedAPI210"/>
  700. <s4 title="Deprecated/Removed Public API">
  701. <ul>
  702. <li>No Deprecated Public API in this release.</li>
  703. </ul>
  704. </s4>
  705. </s3>
  706. </s2>
  707. <anchor name="Migrateto200"/>
  708. <s2 title="Migrating from &XercesCName; 1.7.0 to &XercesCName; 2.0.0">
  709. <p>The following section is a discussion of the technical differences between
  710. &XercesCName; 1.7.0 code base and the &XercesCName; 2.0.0.</p>
  711. <p>Topics discussed are:</p>
  712. <ul>
  713. <li><link anchor="NewFeatures200">New features in &XercesCName; 2.0.0</link></li>
  714. <li><link anchor="LibraryChange200">Unix Library Name change</link></li>
  715. <li><link anchor="DirChange200">DOM Reorganization</link></li>
  716. <li><link anchor="Reuse200">Reuse Grammar becomes Grammar Caching</link></li>
  717. <li><link anchor="API200">Public API Changes</link></li>
  718. <ul>
  719. <li><link anchor="NewAPI200">New Public API</link></li>
  720. <li><link anchor="ModifiedAPI200">Modified Public API</link></li>
  721. <li><link anchor="DeprecatedAPI200">Deprecated/Removed Public API</link></li>
  722. </ul>
  723. </ul>
  724. <anchor name="NewFeatures200"/>
  725. <s3 title="New features in &XercesCName; 2.0.0">
  726. <ul>
  727. <li>64 bit binaries distribution</li>
  728. <li>Follow Unix Shared Library Naming Convention</li>
  729. <li>Apache Recommended DOM C++ Binding</li>
  730. <li>Experimental DOM Level 3 subset support, including DOMWriter and DOMBuilder</li>
  731. <li>Grammar preparsing and Grammar caching</li>
  732. <li>Optionally ignore loading of external DTD</li>
  733. <li>Project files for Microsoft Visual C++ .Net</li>
  734. <li>Codewarrior 8 support</li>
  735. <li>Option to enable/disable strict IANA encoding name checking</li>
  736. <li>plus many more bug fixes and performance enhancement</li>
  737. </ul>
  738. </s3>
  739. <anchor name="LibraryChange200"/>
  740. <s3 title="Unix Library Name Change">
  741. <p>The &XercesCName; UNIX Library now follows the Unix Shared Library Naming Convention (libname.so.soname).</p>
  742. </s3>
  743. <anchor name="DirChange200"/>
  744. <s3 title="DOM Reorganization">
  745. <p>1. The old Java-like DOM is now deprecated, and all the associated files, including the headers
  746. and DOMParser files are moved to <code>src/xercesc/dom/deprecated</code>. Users of the old
  747. Java-like DOM are required to change all their #include lines to pick up the headers.
  748. For example</p>
  749. <source>
  750. //old code
  751. #include &lt;xercesc/dom/DOM.hpp&gt;
  752. #include &lt;xercesc/dom/DOM_Document.hpp&gt;
  753. #include &lt;xercesc/parsers/DOMParser.hpp&gt;
  754. void test(char* xmlFile) {
  755. DOMParser parser;
  756. parser.parse(xmlFile);
  757. DOM_Document doc = parser.getDocument();
  758. :
  759. return;
  760. }
  761. </source>
  762. <p> should now change to </p>
  763. <source>
  764. //new code
  765. #include &lt;xercesc/dom/deprecated/DOM.hpp&gt; //&lt;==== change this include line
  766. #include &lt;xercesc/dom/deprecated/DOM_Document.hpp&gt; //&lt;==== change this include line
  767. #include &lt;xercesc/dom/deprecated/DOMParser.hpp&gt; //&lt;==== change this include line
  768. // the rest is the same
  769. void test(char* xmlFile) {
  770. DOMParser parser;
  771. parser.parse(xmlFile);
  772. DOM_Document doc = parser.getDocument();
  773. :
  774. return;
  775. }
  776. </source>
  777. <p>2. The Experimental IDOM is now renamed, and becomes the Apache Recommended DOM C++ Binding.
  778. The following changes are made: </p>
  779. <ul>
  780. <li>class names are renamed from IDOM_XXXX to DOMXXXX, e.g. IDOM_Document to DOMDocument</li>
  781. <li>and thus header files are renamed from IDOM_XXXX.hpp to DOMXXXX.hpp and are moved
  782. to <code>src/xercesc/dom</code></li>
  783. <li>the IDOMParser is renamed to XercesDOMParser. And thus the header
  784. file is renamed as well</li>
  785. <li>the rest is the same, see
  786. <jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding</jump>
  787. and <jump href="program-dom-&XercesC3Series;.html">DOM Programming Guide</jump> for more programming
  788. information</li>
  789. </ul>
  790. <p>Users of IDOM are required to change all their #include lines and do a global rename of
  791. IDOMParser to XercesDOMParesr, and IDOM_XXXX to DOMXXXX. For example</p>
  792. <source>
  793. //old code
  794. #include &lt;xercesc/idom/IDOM.hpp&gt;
  795. #include &lt;xercesc/idom/IDOM_Document.hpp&gt;
  796. #include &lt;xercesc/parsers/IDOMParser.hpp&gt;
  797. void test(char* xmlFile) {
  798. IDOMParser parser;
  799. parser.parse(xmlFile);
  800. IDOM_Document* doc = parser.getDocument();
  801. :
  802. return;
  803. }
  804. </source>
  805. <p> should now change to </p>
  806. <source>
  807. //new code
  808. #include &lt;xercesc/dom/DOM.hpp&gt; //&lt;==== change this include line
  809. #include &lt;xercesc/dom/DOMDocument.hpp&gt; //&lt;==== change this include line
  810. #include &lt;xercesc/parsers/XercesDOMParser.hpp&gt; //&lt;==== change this include line
  811. void test(char* xmlFile) {
  812. XercesDOMParser parser; //&lt;==== rename the IDOMParser
  813. parser.parse(xmlFile);
  814. DOMDocument* doc = parser.getDocument(); //&lt;==== rename the IDOM_XXXX
  815. :
  816. return;
  817. }
  818. </source>
  819. </s3>
  820. <anchor name="Reuse200"/>
  821. <s3 title="Reuse Grammar becomes Grammar Caching">
  822. <p>The &XercesCName; 2.0.0 extends the "Reuse Grammar" support by replacing it with
  823. a new feature called "Grammar Caching" which provides more flexibility in reusing grammars.
  824. Users who used to do the following:</p>
  825. <source>
  826. XercesDOMParser parser;
  827. // this is the first parse, just usual code as you do normal parse
  828. // "firstXmlFile" has a grammar (schema or DTD) specified.
  829. parser.parse(firstXmlFile);
  830. // this is the second parse, by setting second parameter to true,
  831. // the parser will reuse the grammar in the last parse
  832. // (i.e. the one in "firstXmlFile")
  833. // to validate the second "anotherXmlFile". Any grammar that is
  834. // specified in anotherXmlFile is IGNORED.
  835. //
  836. // Note: The anotherXmlFile cannot have any DTD internal subset.
  837. parser.parse(anotherXmlFile, true);
  838. </source>
  839. <p>should now use the features cacheGrammarFromParse and useCachedGrammarFromParse:</p>
  840. <source>
  841. XercesDOMParser parser;
  842. // By setting cacheGrammarFromParse to true,
  843. // the parser will cache any grammars encountered in the
  844. // follow-on xml files, if not cached already
  845. parser.cacheGrammarFromParse(true);
  846. parser.parse(firstXmlFile);
  847. // By setting useCachedGrammarFromParse to true,
  848. // the parser will use all the previous cached grammars
  849. // to validate the follow-on xml files if the cached
  850. // grammar matches the one specified in anotherXmlFile.
  851. //
  852. // Note: The follow-on xml files cannot have any DTD internal subset.
  853. parser.useCachedGrammarFromParse(true);
  854. parser.parse(anotherXmlFile);
  855. // This will flush the cached grammar pool
  856. parser.resetCachedGrammarPool();
  857. </source>
  858. <p>Note there are a number of differences between "Reuse Grammar" and "Grammar Caching" </p>
  859. <ol>
  860. <li>"Reuse Grammar" ignores any grammar that is specified in anotherXmlFile and simply
  861. reuse whatever stored in previous parse; while "Grammar Caching" will use the
  862. cached grammar only if it matches the one specified in the anotherXmlFile.
  863. If not match, then the new grammar is parsed.</li>
  864. <li>"Reuse Grammar" can only reuse the grammar from previous parse; while "Grammar Caching"
  865. can selectively cache many grammars from different parses and collect them all in a pool indexed
  866. by targetNamespace (for Schema) or system id (for DTD).</li>
  867. <li>Plus "Grammar Caching" has much more functionalities other than above
  868. (like "Pre-parsing Grammar"). Please refer to
  869. <jump href="program-others-&XercesC3Series;.html#GrammarCache">Preparsing Grammar and Grammar Caching
  870. </jump> for more programming details.</li>
  871. </ol>
  872. </s3>
  873. <anchor name="API200"/>
  874. <s3 title="Public API Changes">
  875. <p>The following lists the public API changes between the &XercesCName;
  876. 1.7.0; and the &XercesCName; 2.0.0 releases
  877. of the parser. </p>
  878. <anchor name="NewAPI200"/>
  879. <s4 title="New Public API">
  880. <ul>
  881. <li>To support DOM Level 3, the following are added (see
  882. <jump href="api-&XercesC3Series;.html">the API documentation page</jump> for details).</li>
  883. <ul>
  884. <li>DOMNode functions set/getUserData, isSameNode isEqualNode.</li>
  885. <li>DOMDocument functions renameNode, get/setActualEncoding, get/setEncoding, get/setVersion, get/setStandalone, get/setDocumentURI.</li>
  886. <li>DOMEntity functions get/setActualEncoding, get/setEncoding, get/setVersion.</li>
  887. <li>classes AbstractDOMParser, DOMError, DOMErrorHandler, and DOMLocator.</li>
  888. <li>classes DOMUserDataHandler, DOMImplementationRegistry and DOMImplementationSource.</li>
  889. <li>classes DOMBuilder, DOMEntityResolver, DOMImplementationLS, DOMInputSource,
  890. Wrapper4DOMInputSource and Wrapper4InputSource.</li>
  891. <li>classes DOMWriter, DOMWriterFilter, LocalFileFormatTarget, StdOutFormatTarget,
  892. and MemBufFormatTarget</li>
  893. </ul>
  894. <li>To support DOMWriter, the following PlatformUtils functions are added</li>
  895. <ul>
  896. <li>openFileToWrite, writeBufferToFile</li>
  897. </ul>
  898. <li>To have Apache Recommended DOM C++ Binding, the following are added (see
  899. <jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding).</jump></li>
  900. <ul>
  901. <li>function release() to fix Memory Management problem</li>
  902. <li>classes DOMDocumentRange and DOMDocumentTraversal</li>
  903. <li>XMLSize_t is used to represent unsigned integral type in DOM</li>
  904. <li>IDOM_XXXX classes are renamed to DOMXXXX, and IDOMParser is renamed to XercesDOMParser
  905. as described in <link anchor="DirChange200">DOM Reorganization</link></li>
  906. <li>XercesDOMParser::adoptDocument is added so that document can optionally live
  907. outside the parser.</li>
  908. </ul>
  909. <li>To support optionally load external DTD, the following are added:</li>
  910. <ul>
  911. <li>XercesDOMParser::set/getLoadExternalDTD</li>
  912. <li>DOMParser::set/getLoadExternalDTD</li>
  913. <li>SAXParser::set/getLoadExternalDTD</li>
  914. <li>and SAX2XMLReader will recognize the feature
  915. http://apache.org/xml/features/nonvalidating/load-external-dtd</li>
  916. </ul>
  917. <li>To support Preparsing Grammar and Grammar Caching, the following are added:</li>
  918. <ul>
  919. <li>XercesDOMParser/DOMParser/SAXParser functions loadGrammar, resetCachedGrammarPool,
  920. cacheGrammarFromParse, isCachingGrammarFromParse, useCachedGrammarInParse,
  921. isUsingCachedGrammarInParse.</li>
  922. <li>SAX2XMLReader functions loadGrammar, resetCachedGrammarPool, and will recognize the features
  923. http://apache.org/xml/features/validation/cache-grammarFromParse and
  924. http://apache.org/xml/features/validation/use-cachedGrammarInParse.</li>
  925. </ul>
  926. <li>To support access to Grammar info, the following are added:</li>
  927. <ul>
  928. <li>XercesDOMParser/DOMParser/SAXParser/SAX2XMLReader functions getRootGrammar, getGrammar, getURIText.</li>
  929. </ul>
  930. <li>To support strict IANA encoding name checking, the following are added:</li>
  931. <ul>
  932. <li>class EncodingValidator.</li>
  933. <li>PlatformUtils functions strictIANAEncoding, isStrictIANAEncoding.</li>
  934. <li>XMLTransService functions strictIANAEncoding, isStrictIANAEncoding.</li>
  935. </ul>
  936. </ul>
  937. </s4>
  938. <anchor name="ModifiedAPI200"/>
  939. <s4 title="Modified Public API">
  940. <ul>
  941. <li>SAXParser::getScanner() is moved from public to protected.</li>
  942. <li>Grammar::getGrammarType has been added a const modifier.</li>
  943. <li>Xerces features are renamed from XMLUni::fgSAX2XercesXXXX to XMLUni::fgXercesXXXX
  944. so that they can be shared with DOM parser.</li>
  945. <li>With the new Grammar Caching introduced, the the last parameter "reuseGrammar" in
  946. the following API is dropped.
  947. Users should now use the "Grammar Caching" feature as described in
  948. <link anchor="Reuse200">Reuse Grammar becomes Grammar Caching</link>.</li>
  949. <ul>
  950. <li>(in Parser, SAXParser, DOMParser, and XercesDOMParser) </li>
  951. <li>parse(const InputSource&amp; source, const bool reuseGrammar = false);</li>
  952. <li>parse(const XMLCh* const systemId, const bool reuseGrammar = false);</li>
  953. <li>parse(const char* const systemId, const bool reuseGrammar = false);</li>
  954. <li>(in SAXParser, DOMParser, and XercesDOMParser) </li>
  955. <li>parseFirst(const InputSource&amp; source, XMLPScanToken&amp; toFill, const bool reuseGrammar = false);</li>
  956. <li>parseFirst(const XMLCh* const systemId, XMLPScanToken&amp; toFill, const bool reuseGrammar = false);</li>
  957. <li>parseFirst(const char* const systemId, XMLPScanToken&amp; toFill, const bool reuseGrammar = false);</li>
  958. </ul>
  959. </ul>
  960. </s4>
  961. <anchor name="DeprecatedAPI200"/>
  962. <s4 title="Deprecated/Removed Public API">
  963. <ul>
  964. <li>The old Java-like DOM is now deprecated as described in
  965. <link anchor="DirChange200">DOM Reorganization</link></li>
  966. <li>SAX2XMLReader::setValidationConstraint. For consistency, SAX2XMLReader users should
  967. set the feature "http://apache.org/xml/features/validation-error-as-fatal" instead.</li>
  968. <li>SAX2XMLReader::setExitOnFirstFatalError. For consistency, SAX2XMLReader users should
  969. set the feature "http://apache.org/xml/features/continue-after-fatal-error" instead.</li>
  970. <li>With the new Grammar Caching introduced, the following features will not be
  971. recognized by the SAX2XMLReader:</li>
  972. <ul>
  973. <li>http://apache.org/xml/features/validation/reuse-grammar</li>
  974. <li>http://apache.org/xml/features/validation/reuse-validator</li>
  975. </ul>
  976. </ul>
  977. </s4>
  978. </s3>
  979. </s2>
  980. <anchor name="Migrateto170"/>
  981. <s2 title="Migrating from &XercesCName; 1.6.0 to 1.7.0">
  982. <p>The following section is a discussion of the technical differences between
  983. &XercesCName; 1.6.0 code base and the &XercesCName; 1.7.0 code base.</p>
  984. <s3 title="New features in &XercesCName; 1.7.0">
  985. <ul>
  986. <li>Support SAX2-ext's DeclHandler.</li>
  987. <li>Directory sane_include reorganization: add sub-directory 'xercesc' to src / include folder.
  988. See <link anchor="DirChange170">"Directory change in &XercesCName; 1.7.0"</link>
  989. below for detail.</li>
  990. <li>More IDOM test cases - port IDOMMemTest, and merge ThreadTest and IThreadTest.</li>
  991. <li>Support IconvFBSD in multi-threading environment.</li>
  992. <li>Use IDOM in schema processing for faster performance.</li>
  993. <li>Add Project files for BCB6.</li>
  994. <li>Port to Caldera (SCO) OpenServer.</li>
  995. <li>Support building with new MacOSURLAccessCF NetAccessor that doesn't require
  996. Carbon but can allow Xerces to live solely within CoreServices layer.</li>
  997. </ul>
  998. </s3>
  999. <anchor name="DirChange170"/>
  1000. <s3 title="Directory change in &XercesCName; 1.7.0">
  1001. <ul>
  1002. <li>A new directory, <em>src/xercesc</em> is created to be the new parent directory of
  1003. all src's direct subdirectories.</li>
  1004. <li>And in the binary package, all the headers are distributed in <em>include/xercesc</em> directory.</li>
  1005. <li>Migration considerations:</li>
  1006. <ul>
  1007. <li>Windows application, <br/>
  1008. either change the <em>include directories </em> setting to
  1009. "..\..\..\..\..\src\<em>xercesc</em>" (Projects->settings->C/C++->Preprocessor), <br/>
  1010. or <br/>
  1011. change the relevant #include instances in the source/header files, accordingly, eg <br/>
  1012. #include &lt;util/XMLString.hpp&gt; be changed to <br/>
  1013. #include &lt;<em>xercesc</em>/util/XMLString.hpp&gt; </li>
  1014. <li>Unix application, <br/>
  1015. either change the <em>include search path </em> in the Makefile to
  1016. " -I &lt;installroot&gt;/include/<em>xercesc</em>", <br/>
  1017. or <br/>
  1018. change the relevant #include instances in the source/header files as shown above. </li>
  1019. </ul>
  1020. </ul>
  1021. </s3>
  1022. <s3 title="Public API Changes in &XercesCName; 1.7.0">
  1023. <p>The following lists the public API changes between the &XercesCName;
  1024. 1.7.0 and the &XercesCName; 1.7.0 releases
  1025. of the parser. </p>
  1026. <s4 title="New Public API">
  1027. <ul>
  1028. <li>Added SAX2-ext's DeclHandler class.
  1029. See <jump href="api-&XercesC3Series;.html">the API documentation page</jump> for details.</li>
  1030. <li>To support SAX2-ext's DeclHandler, the following new methods are added
  1031. in classes DefaultHandler and SAX2XMLReader:</li>
  1032. <ul>
  1033. <li>void DefaultHandler::elementDecl(const XMLCh* const name, const XMLCh* const model)</li>
  1034. <li>void DefaultHandler::attributeDecl(const XMLCh* const eName, const XMLCh* const aName,
  1035. const XMLCh* const type, const XMLCh* const mode, const XMLCh* const value)</li>
  1036. <li>void DefaultHandler::internalEntityDecl(const XMLCh* const name, const XMLCh* const value)</li>
  1037. <li>void DefaultHandler::externalEntityDecl(const XMLCh* const name, const XMLCh* const publicId,
  1038. const XMLCh* const systemId)</li>
  1039. <li>DeclHandler* SAX2XMLReader::getDeclarationHandler() const</li>
  1040. <li>void SAX2XMLReader::setDeclarationHandler(DeclHandler* const handler)</li>
  1041. </ul>
  1042. <li>To conform to DOM Level 2 specification, the following methods are added:</li>
  1043. <ul>
  1044. <li>DOM_Node DOM_NodeIterator::getRoot()</li>
  1045. <li>DOM_Node DOM_TreeWalker::getRoot()</li>
  1046. <li>bool DOM_Node::hasAttributes() const</li>
  1047. <li>bool DOM_Element::hasAttribute(const DOMString &amp;name) const</li>
  1048. <li>bool DOM_Element::hasAttributeNS(const DOMString &amp;namespaceURI,
  1049. const DOMString &amp;localName) const</li>
  1050. <li>IDOM_Node* IDOM_NodeIterator::getRoot()</li>
  1051. <li>IDOM_Node* IDOM_TreeWalker::getRoot()</li>
  1052. <li>bool IDOM_Node::hasAttributes() const</li>
  1053. <li>bool IDOM_Element::hasAttribute(const XMLCh* name) const</li>
  1054. <li>bool IDOM_Element::hasAttributeNS(const XMLCh* namespaceURI,
  1055. const XMLCh* localName) const</li>
  1056. </ul>
  1057. <li>To fix [Bug 5570], a copy constructor is added to DOM_Range</li>
  1058. </ul>
  1059. </s4>
  1060. <s4 title="Modified Public API">
  1061. <ul>
  1062. <li>To conform to the SAX2 specification, the namespace-prefixes feature
  1063. in SAX2 is set to off as default.</li>
  1064. <li>To fix [Bug 6330], the Base64::encode and Base64::decode have been modified
  1065. as follows</li>
  1066. <ul>
  1067. <li>static XMLByte* Base64::encode(const XMLByte* const inputData,
  1068. const unsigned int inputLength,
  1069. unsigned int* outputLength);</li>
  1070. <li>static XMLByte* Base64::decode(const XMLByte* const inputData,
  1071. unsigned int* outputLength);</li>
  1072. <li>static XMLCh* decode(const XMLCh* const inputData,
  1073. unsigned int* outputLength);</li>
  1074. </ul>
  1075. <li>To conform to DOM Level 2 specification, the DOM_Node::supports and IDOM_Node::supports
  1076. are modified to</li>
  1077. <ul>
  1078. <li>bool DOM_Node::isSupported(const DOMString &amp;feature, const DOMString &amp;version) const</li>
  1079. <li>bool IDOM_Node::isSupported(const XMLCh* feature, const XMLCh* version) const</li>
  1080. </ul>
  1081. </ul>
  1082. </s4>
  1083. <s4 title="Deprecated Public API">
  1084. <ul>
  1085. <li>No Deprecated Public API in this release.</li>
  1086. </ul>
  1087. </s4>
  1088. </s3>
  1089. </s2>
  1090. <anchor name="Migrateto160"/>
  1091. <s2 title="Migrating from &XercesCName; 1.5.2 to 1.6.0">
  1092. <p>The following section is a discussion of the technical differences between
  1093. &XercesCName; 1.5.2 code base and the &XercesCName; 1.6.0 code base.</p>
  1094. <s3 title="New features in &XercesCName; 1.6.0">
  1095. <ul>
  1096. <li>Full Schema support is available in this release.
  1097. See <jump href="schema-&XercesC3Series;.html">the Schema page</jump> for details.</li>
  1098. <li>New sample SEnumVal to show how to enumerate the markup decls in a Schema Grammar is added.</li>
  1099. </ul>
  1100. </s3>
  1101. <s3 title="Public API Changes in &XercesCName; 1.6.0">
  1102. <p>The following lists the public API changes between the &XercesCName;
  1103. 1.5.2 and the &XercesCName; 1.6.0 releases
  1104. of the parser. </p>
  1105. <s4 title="New Public API">
  1106. <ul>
  1107. <li>It should not be a fatal error if a schema InputSource is not found.
  1108. Add the following new methods:</li>
  1109. <ul>
  1110. <li>const bool InputSource::getIssueFatalErrorIfNotFound() const</li>
  1111. <li>void InputSource::setIssueFatalErrorIfNotFound(const bool flag</li>
  1112. </ul>
  1113. <li>Allow code to take advantage of the fact that the length of the prefix and
  1114. local name are known when constructing the QName.
  1115. Add the following new methods:</li>
  1116. <ul>
  1117. <li>void QName::setNPrefix(const XMLCh*, const unsigned int)</li>
  1118. <li>void QName::setNLocalPart(const XMLCh*, const unsigned int)</li>
  1119. </ul>
  1120. <li>To support schemaLocation and noNamespaceSchemaLocation to be specified outside the
  1121. instance document, the following new methods are added:</li>
  1122. <ul>
  1123. <li>XMLCh* DOMParser::getExternalSchemaLocation() const</li>
  1124. <li>XMLCh* DOMParser::getExternalNoNamespaceSchemaLocation() const</li>
  1125. <li>void DOMParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li>
  1126. <li>void DOMParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li>
  1127. <li>XMLCh* IDOMParser::getExternalSchemaLocation() const</li>
  1128. <li>XMLCh* IDOMParser::getExternalNoNamespaceSchemaLocation() const</li>
  1129. <li>void IDOMParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li>
  1130. <li>void IDOMParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li>
  1131. <li>XMLCh* SAXParser::getExternalSchemaLocation() const</li>
  1132. <li>XMLCh* SAXParser::getExternalNoNamespaceSchemaLocation() const</li>
  1133. <li>void SAXParser::setExternalSchemaLocation(const XMLCh* const schemaLocation)</li>
  1134. <li>void SAXParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)</li>
  1135. <li>and the following properties are recognized by SAX2XMLReader:</li>
  1136. <ul>
  1137. <li>http://apache.org/xml/properties/schema/external-schemaLocation</li>
  1138. <li>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation</li>
  1139. </ul>
  1140. </ul>
  1141. <li>To support identity constraints, the following new method is added:</li>
  1142. <ul>
  1143. <li>QName* XMLAttr::getAttName() const</li>
  1144. </ul>
  1145. </ul>
  1146. </s4>
  1147. <s4 title="Modified Public API">
  1148. <ul>
  1149. <li>To support attribute constraint checking, the constant values in XMLAttDef::DefAttTypes have been re-ordered.</li>
  1150. </ul>
  1151. </s4>
  1152. <s4 title="Deprecated Public API">
  1153. <ul>
  1154. <li>Root Element check is moved from XMLValidator to XMLScanner. Thus XMLValidator::checkRootElement() is deprecated.</li>
  1155. </ul>
  1156. </s4>
  1157. </s3>
  1158. </s2>
  1159. <anchor name="Migrateto152"/>
  1160. <s2 title="Migrating from &XercesCName; 1.4.0 to 1.5.2">
  1161. <p>The following section is a discussion of the technical differences between
  1162. &XercesCName; 1.4.0 code base and the &XercesCName; 1.5.2 code base.</p>
  1163. <s3 title="New features in &XercesCName; 1.5.2">
  1164. <p>Schema subset support and an experimental IDOM are available
  1165. in this release.
  1166. </p>
  1167. <s4 title="Schema Subset Support">
  1168. <ul>
  1169. <li>New function "setDoSchema" is added to DOM/SAX parser.</li>
  1170. <li>New feature "http://apache.org/xml/features/validation/schema" is recognized by SAX2XMLReader.</li>
  1171. <li>New classes such as SchemaValidator, TraverseSchema ... are added.</li>
  1172. <li>The Scanner is enhanced to process schema.</li>
  1173. <li>New sample data files personal-schema.xml and personal.xsd.</li>
  1174. <li>New command line option "-s" for samples.</li>
  1175. </ul>
  1176. <p>
  1177. See <jump href="schema-&XercesC3Series;.html">the Schema page</jump> for details.
  1178. </p>
  1179. </s4>
  1180. <s4 title="Experimental IDOM">
  1181. <p>The experimental IDOM API is a new design of the C++ DOM API. Please note that
  1182. this experimental IDOM API is only a prototype and is subject to change.
  1183. </p>
  1184. </s4>
  1185. </s3>
  1186. <s3 title="Changes required to migrate to &XercesCName; 1.5.2">
  1187. <p>There are some architectural changes between the &XercesCName;
  1188. 1.4.0 and the &XercesCName; 1.5.2 releases
  1189. of the parser, and as a result, some code has undergone restructuring
  1190. as shown below. </p>
  1191. <s4 title="Validator directory Reorganization">
  1192. <ul>
  1193. <li>common content model files such as DFAContentModel ...
  1194. are moved to a new directory called src/validators/common</li>
  1195. <li>DTD related files are moved to a new directory called src/validators/DTD</li>
  1196. <li>new directory src/validators/Datatype is created to store all datatype validators</li>
  1197. <li>new directory src/validators/schema is created to store Schema related files</li>
  1198. </ul>
  1199. </s4>
  1200. <s4 title="DTDValidator">
  1201. <p> DTDValidator was design to scan, validate and store the DTD in &XercesCName; 1.4.0
  1202. or earlier. In &XercesCName; 1.5.2, this process is broken down into three components:
  1203. </p>
  1204. <ul>
  1205. <li>new class DTDScanner - to scan the DTD</li>
  1206. <li>new class DTDGrammar - to store the DTD Grammar</li>
  1207. <li>DTDValidator - to validate the DTD only</li>
  1208. </ul>
  1209. </s4>
  1210. </s3>
  1211. </s2>
  1212. <anchor name="Migrateto140"/>
  1213. <s2 title="Migrating from XML4C 2.x to &XercesCName; 1.4.0">
  1214. <p>The following section is a discussion of the technical differences between
  1215. XML4C 2.x code base and the new &XercesCName; 1.4.0 code base.</p>
  1216. <s3 title="Summary of changes required to migrate from XML4C 2.x to &XercesCName; 1.4.0">
  1217. <p>There are some major architectural changes
  1218. between the 2.3.x and &XercesCName; 1.4.0 releases
  1219. of the parser, and as a result the code has undergone
  1220. significant restructuring. The list below mentions the public
  1221. api's which existed in 2.3.x and no longer exist in
  1222. &XercesCName; 1.4.0. It also mentions the
  1223. &XercesCName; 1.4.0 api which will give you the
  1224. same functionality. Note: This list is not exhaustive. The
  1225. API docs (and ultimately the header files) supplement this
  1226. information.</p>
  1227. <ul>
  1228. <li><code>parsers/[Non]Validating[DOM/SAX]parser.hpp</code><br/>
  1229. These files/classes have all been consolidated in the new
  1230. version to just two files/classes:
  1231. <code>[DOM/SAX]Parser.hpp</code>. Validation is now a
  1232. property which may be set before invoking the
  1233. <code>parse</code>. Now, the
  1234. <code>setDoValidation()</code> method controls the
  1235. validation processing.</li>
  1236. <li>The <code>framework/XMLDocumentTypeHandler.hpp</code>
  1237. been replaced with
  1238. <code>validators/DTD/DocTypeHandler.hpp</code>.</li>
  1239. <li>The following methods now have different set of
  1240. parameters because the underlying base class methods have
  1241. changed in the 3.x release. These methods belong to one of
  1242. <code>XMLDocumentHandler</code>,
  1243. <code>XMLErrorReporter</code> or
  1244. <code>DocTypeHandler</code> interfaces.</li>
  1245. <ul>
  1246. <li><code>[Non]Validating[DOM/SAX]Parser::docComment</code></li>
  1247. <li><code>[Non]Validating[DOM/SAX]Parser::doctypePI</code></li>
  1248. <li><code>[Non]ValidatingSAXParser::elementDecl</code></li>
  1249. <li><code>[Non]ValidatingSAXParser::endAttList</code></li>
  1250. <li><code>[Non]ValidatingSAXParser::entityDecl</code></li>
  1251. <li><code>[Non]ValidatingSAXParser::notationDecl</code></li>
  1252. <li><code>[Non]ValidatingSAXParser::startAttList</code></li>
  1253. <li><code>[Non]ValidatingSAXParser::TextDecl</code></li>
  1254. <li><code>[Non]ValidatingSAXParser::docComment</code></li>
  1255. <li><code>[Non]ValidatingSAXParser::docPI</code></li>
  1256. <li><code>[Non]Validating[DOM/SAX]Parser::endElement</code></li>
  1257. <li><code>[Non]Validating[DOM/SAX]Parser::startElement</code></li>
  1258. <li><code>[Non]Validating[DOM/SAX]Parser::XMLDecl</code></li>
  1259. <li><code>[Non]Validating[DOM/SAX]Parser::error</code></li>
  1260. </ul>
  1261. <li>The following methods/data members changed visibility
  1262. from <code>protected</code> in 2.3.x to
  1263. <code>private</code> (with public setters and getters, as
  1264. appropriate).</li>
  1265. <ul>
  1266. <li><code>[Non]ValidatingDOMParser::fDocument</code></li>
  1267. <li><code>[Non]ValidatingDOMParser::fCurrentParent</code></li>
  1268. <li><code>[Non]ValidatingDOMParser::fCurrentNode</code></li>
  1269. <li><code>[Non]ValidatingDOMParser::fNodeStack</code></li>
  1270. </ul>
  1271. <li>The following files have moved, possibly requiring
  1272. changes in the <code>#include</code> statements.</li>
  1273. <ul>
  1274. <li><code>MemBufInputSource.hpp</code></li>
  1275. <li><code>StdInInputSource.hpp</code></li>
  1276. <li><code>URLInputSource.hpp</code></li>
  1277. </ul>
  1278. <li>All the DTD validator code was moved from
  1279. <code>internal</code> to separate
  1280. <code>validators/DTD</code> directory.</li>
  1281. <li>The error code definitions which were earlier in
  1282. <code>internal/ErrorCodes.hpp</code> are now split up into
  1283. the following files:</li>
  1284. <ul>
  1285. <li><code>framework/XMLErrorCodes.hpp </code> - Core XML errors</li>
  1286. <li><code>framework/XMLValidityCodes.hpp</code> - DTD validity errors</li>
  1287. <li><code>util/XMLExceptMsgs.hpp </code> - C++ specific exception codes.</li>
  1288. </ul>
  1289. </ul>
  1290. </s3>
  1291. <s3 title="The Samples">
  1292. <p>The sample programs no longer use any of the unsupported
  1293. util/xxx classes. They only existed to allow us to write
  1294. portable samples. But, since we feel that the wide character
  1295. APIs are supported on a lot of platforms these days, it was
  1296. decided to go ahead and just write the samples in terms of
  1297. these. If your system does not support these APIs, you will
  1298. not be able to build and run the samples. On some platforms,
  1299. these APIs might perhaps be optional packages or require
  1300. runtime updates or some such action.</p>
  1301. <p>More samples have been added as well. These highlight some
  1302. of the new functionality introduced in the new code base. And
  1303. the existing ones have been cleaned up as well.</p>
  1304. <p>The new samples are:</p>
  1305. <ol>
  1306. <li>PParse - Demonstrates 'progressive parse' (see below)</li>
  1307. <li>StdInParse - Demonstrates use of the standard in input source</li>
  1308. <li>EnumVal - Shows how to enumerate the markup decls in a DTD Validator</li>
  1309. </ol>
  1310. </s3>
  1311. <s3 title="Parser Classes">
  1312. <p>In the XML4C 2.x code base, there were the following parser
  1313. classes (in the src/parsers/ source directory):
  1314. NonValidatingSAXParser, ValidatingSAXParser,
  1315. NonValidatingDOMParser, ValidatingDOMParser. The
  1316. non-validating ones were the base classes and the validating
  1317. ones just derived from them and turned on the validation.
  1318. This was deemed a little bit overblown, considering the tiny
  1319. amount of code required to turn on validation and the fact
  1320. that it makes people use a pointer to the parser in most cases
  1321. (if they needed to support either validating or non-validating
  1322. versions.)</p>
  1323. <p>The new code base just has SAXParer and DOMParser
  1324. classes. These are capable of handling both validating and
  1325. non-validating modes, according to the state of a flag that
  1326. you can set on them. For instance, here is a code snippet that
  1327. shows this in action.</p>
  1328. <source>void ParseThis(const XMLCh* const fileToParse,
  1329. const bool validate)
  1330. {
  1331. //
  1332. // Create a SAXParser. It can now just be
  1333. // created by value on the stack if we want
  1334. // to parse something within this scope.
  1335. //
  1336. SAXParser myParser;
  1337. // Tell it whether to validate or not
  1338. myParser.setDoValidation(validate);
  1339. // Parse and catch exceptions...
  1340. try
  1341. {
  1342. myParser.parse(fileToParse);
  1343. }
  1344. ...
  1345. };</source>
  1346. <p>We feel that this is a simpler architecture, and that it makes things
  1347. easier for you. In the above example, for instance, the parser will be
  1348. cleaned up for you automatically upon exit since you don't have to
  1349. allocate it anymore.</p>
  1350. </s3>
  1351. <s3 title="Moved Classes to src/framework">
  1352. <p>Some of the classes previously in the src/internal/
  1353. directory have been moved to their more correct location in
  1354. the src/framework/ directory. These are classes used by the
  1355. outside world and should have been framework classes to begin
  1356. with. Also, to avoid name classes in the absence of C++ namespace
  1357. support, some of these clashes have been renamed to make them
  1358. more XML specific and less likely to clash. More
  1359. classes might end up being moved to framework as well.</p>
  1360. <p>So you might have to change a few include statements to
  1361. find these classes in their new locations. And you might have
  1362. to rename some of the names of the classes, if you used any of
  1363. the ones whose names were changed.</p>
  1364. </s3>
  1365. <s3 title="Util directory Reorganization">
  1366. <p>The src/util directory was becoming somewhat of a dumping
  1367. ground of platform and compiler stuff. So we reworked that
  1368. directory to better spread things out. The new scheme is:
  1369. </p>
  1370. <s4 title="util - The platform independent utility stuff">
  1371. <ul>
  1372. <li>MsgLoaders - Holds the msg loader implementations</li>
  1373. <ol>
  1374. <li>ICU</li>
  1375. <li>InMemory</li>
  1376. <li>MsgCatalog</li>
  1377. <li>Win32</li>
  1378. </ol>
  1379. <li>Compilers - All the compiler specific files</li>
  1380. <li>Transcoders - Holds the transcoder implementations</li>
  1381. <ol>
  1382. <li>Iconv</li>
  1383. <li>ICU</li>
  1384. <li>Win32</li>
  1385. </ol>
  1386. <li>Platforms</li>
  1387. <ol>
  1388. <li>AIX</li>
  1389. <li>HP-UX</li>
  1390. <li>Linux</li>
  1391. <li>Solaris</li>
  1392. <li>....</li>
  1393. <li>Win32</li>
  1394. </ol>
  1395. </ul>
  1396. </s4>
  1397. <p>This organization makes things much easier to understand.
  1398. And it makes it easier to find which files you need and which
  1399. are optional. Note that only per-platform files have any hard
  1400. coded references to specific message loaders or
  1401. transcoders. So if you don't include the ICU implementations
  1402. of these services, you don't need to link in ICU or use any
  1403. ICU headers. The rest of the system works only in terms of the
  1404. abstraction APIs.</p>
  1405. </s3>
  1406. </s2>
  1407. </s1>