www.alphaworks.ibm.comwww.ibm.com/developerwww.ibm.com

Home

Readme
Download

Build Instructions









Releases

Feedback

Y2K Compliance


CVS Repository
Mail Archive

Migrating from XML4C 1.4.0 to XML4C 3.5.1
 

This document is a discussion of the technical differences between XML4C 1.4.0 code base and the new XML4C 3.5.1 code base.

Topics discussed are:


General Improvements
 

The new version is improved in many ways. Some general improvements are: significantly better conformance to the XML spec, cleaner internal architecture, many bug fixes, and faster speed.

Compliance
 

Except for a couple of the very obscure (mostly related to the 'standalone' mode), this version should be quite compliant to XML 1.0. It also tracks the latest changes to DOM, SAX and Namespace Specification. We have more than a thousand tests, some collected from various public sources and some IBM generated, which are used to do regression testing. The C++ parser is now passing all but a handful of them.


Bug Fixes
 

This version has many bug fixes since last release. Some of these were reported by users and some were brought up by way of the conformance testing.


Speed
 

Much work was done to speed up this version. Some of the new features, such as experiemental IDOM ended up eating up some of these gains, but overall the new version is significantly faster than previous versions, even while doing more.



Changes required to migrate to XML4C 3.5.1
 

There are some architectural changes between the XML4C 1.4.0 and the XML4C 3.5.1 releases of the parser, and as a result, some code has undergone restructuring as shown below.

Validator directory Reorganization
 
  • common content model files such as DFAContentModel ... are moved to a new directory called src/validators/common
  • DTD related files are moved to a new directory called src/validators/DTD
  • new directory src/validators/Datatype is created to store all datatype validators
  • new directory src/validators/schema is created to store Schema related files

DTDValidator
 

DTDValidator was design to scan, validate and store the DTD in XML4C 1.4.0 or earlier. In XML4C 3.5.1, this process is broken down into three components:

  • new class DTDScanner - to scan the DTD
  • new class DTDGrammar - to store the DTD Grammar
  • DTDValidator - to validate the DTD only


New features in XML4C 3.5.1
 

Schema subset support is provided in this release. See supported schema features in XML4C 3.5.1.. An experiemental IDOM is also available as well.

Schema Subset Support
 
  • Schema Subset support is added
    • New function "setDoSchema" is added to DOM/SAX parser.
    • New feature "http://apache.org/xml/features/validation/schema" is recognized by SAX2XMLReader.
    • New classes such as SchemaValidator, TraverseSchema ... are added.
    • The Scanner is enhanced to process schema.
  • New sample data files personal-schema.xml and personal.xsd.
  • New command line option "-s" for samples.

See Schema Usage


Experiemental IDOM
 

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 IDOM programming guide. Please note that this experimental IDOM API is only a prototype and is subject to change.



Migration Archive
 

For migration information from XML4C 2.x to XML4C 1.4.0, please refer to Migration Archive.


Footer