|
| | | | Migrating to earlier Releases | | | | |
| |
|
| | | | Migrating from Xerces-C++ 2.1.0 to Xerces-C++ 2.2.0 | | | | |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 2.1.0 code base and the Xerces-C++ 2.2.0.
Topics discussed are:
| | | | New features in Xerces-C++ 2.2.0 | | | | |
| |
- C++ Namespace Support
- Schema 1.0 Errata Implementation
- Experimental Implementation of XML 1.1
- More DOM L3 Core Support:
- DOMNode: baseURI
- DOMAttr: isId, getTypeInfo
- DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo
- DOM Message: make use of the non-standard extension DOMImplementation::loadDOMExceptionMsg
to load the default error text message for the correspond Exception Code.
- New feature XMLPlatformUtils::Initialize(const char* const locale) to set
the locale for message loader. See
Specify locale for Message Loader for details
- Support Build with ICU Message Loader, or Message Catalog Message Loader
- RPM for Linux
- 390: Uniconv390 support
- 390: support record-oriented MVS datasets with the DOM Level 3 serialization APIs
- Support for Linux/390
- Performance: Break Scanner for different functionalities and many other performance improvement
- 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
Xercesc Feature: Byte Order Mark for details
|
| |
Xerces-C++ 2.2.0 now supports C++ Namespace. All Xerces-C++
classes/data/variables are defined in the "namespace xercesc"
if C++ Namespace support is ENABLED.
All the binary distributions of Xerces-C++ 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 Xerces-C++ classes/data/variables
with "xercesc::" or add the
"using namespace xercesc" clause.
See the Programming Guide Using C++ Namespace
for more details.
|
| |
The following lists the public API changes between the Xerces-C++
2.1.0; and the Xerces-C++ 2.2.0 releases
of the parser.
| |
- To support additional DOM L3 functions, the following are added:
- DOMAttr: isId, getTypeInfo
- DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo
- Added DOMTypeInfo class for getTypeInfo class in DOMElement and DOMAttr
- Added getDOMTypeInfoUri, getDOMTypeInfoName to XMLAttDef and XMLElementDecl for use in building DOMTypeInfo
- Added a non-standard extension DOMImplementation::loadDOMExceptionMsg to load the
default error message for the corresponding DOMException code.
- XMLAttr: Added a constructor and a set method to allow creating/setting of
XMLAttr using a rawname.
- Added XMLUri::getUriText to return the URI as a string specification.
- Add XMLString::fixURI to transform an absolute path filename to standard URI form.
- Added XMLString::equals for faster string comparison.
- To allow users to tell the parser to force standard uri conformance,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: get/setStandardUriConformant
- and DOMBuilder/SAX2XMLReader will recognize the feature
http://apache.org/xml/features/standard-uri-conformant
- Add XMLURL::hasInvalidChar() to indicate if the URL has invalid char as per RFC standard
- To allow users to enable/disable src offset calculation,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: get/setCalculateSrcOfs
- and DOMBuilder/SAX2XMLReader will recognize the feature
http://apache.org/xml/features/calculate-src-ofst
- To allow users to select the scanner when scanning XML documents,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: useScanner
- and DOMBuilder/SAX2XMLReader will recognize the property
http://apache.org/xml/properties/scannerName
- Added getSrcOffset to XercesDOMParser/DOMParser/SAXParser/DOMBuilder/SAX2XMLReader to
allow users to get the current src offset within the input source.
|
| |
- The following DOM functions are being added a const modifier.
- DOMImplementation::hasFeature
- DOMNode: isSameNode, isEqualNode, compareTreePosition
- XMLPlatformUtils::Initialize() takes a parameter specifying locale
for message loader, with default value "en_US".
- To fix [Bug 13641], the QName copy constructor is corrected to take
a reference as parameter, i.e. QName(const QName& qname).
- To fix [Bug 12232], the QName operator== has been added a const modified.
- Move XMLUri copy constructor and operator = as public.
- Move XMLUri::isURIString as public.
- For validation purpose, added two more default parameters to
XMLValidator::validateAttrValue.
- To fix [Bug 15802], the getURIText of DOMParser/XercesDOMParser/SAXParser/SAX2XMLReader
are being added a const modifier.
|
| | | | Deprecated/Removed Public API | | | | |
| |
- No Deprecated Public API in this release.
|
|
|
| | | | Migrating from Xerces-C++ 1.7.0 to Xerces-C++ 2.0.0 | | | | |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 1.7.0 code base and the Xerces-C++ 2.0.0.
Topics discussed are:
| | | | New features in Xerces-C++ 2.0.0 | | | | |
| |
- 64 bit binaries distribution
- Follow Unix Shared Library Naming Convention
- Apache Recommended DOM C++ Binding
- Experimental DOM Level 3 subset support, including DOMWriter and DOMBuilder
- Grammar preparsing and Grammar caching
- Optionally ignore loading of external DTD
- Project files for Microsoft Visual C++ .Net
- Codewarrior 8 support
- Option to enable/disable strict IANA encoding name checking
- plus many more bug fixes and performance enhancement
|
| |
The Xerces-C++ UNIX Library now follows the Unix Shared Library Naming Convention (libname.so.soname).
It is now called:
- AIX
- libxerces-c25.0.so
- symbolic link: libxerces-c.so ----> libxerces-c25.so
- symbolic link: libxerces-c25.so ----> libxerces-c25.0.so
- Solaris / Linux
- libxerces-c.so.25.0
- symbolic link: libxerces-c.so ----> libxerces-c.so.25
- symbolic link: libxerces-c.so.25 ----> libxerces-c.so.25.0
- HP-UX
- libxerces-c.sl.25.0
- symbolic link: libxerces-c.sl ----> libxerces-c.sl.25
- symbolic link: libxerces-c.sl.25 ----> libxerces-c.sl.25.0
|
| |
The following lists the public API changes between the Xerces-C++
1.7.0; and the Xerces-C++ 2.0.0 releases
of the parser.
| |
- To support DOM Level 3, the following are added (see
the API documentation page for details).
- DOMNode functions set/getUserData, isSameNode isEqualNode.
- DOMDocument functions renameNode, get/setActualEncoding, get/setEncoding, get/setVersion, get/setStandalone, get/setDocumentURI.
- DOMEntity functions get/setActualEncoding, get/setEncoding, get/setVersion.
- classes AbstractDOMParser, DOMError, DOMErrorHandler, and DOMLocator.
- classes DOMUserDataHandler, DOMImplementationRegistry and DOMImplementationSource.
- classes DOMBuilder, DOMEntityResolver, DOMImplementationLS, DOMInputSource,
Wrapper4DOMInputSource and Wrapper4InputSource.
- classes DOMWriter, DOMWriterFilter, LocalFileFormatTarget, StdOutFormatTarget,
and MemBufFormatTarget
- To support DOMWriter, the following PlatformUtils functions are added
- openFileToWrite, writeBufferToFile
- To have Apache Recommended DOM C++ Binding, the following are added (see
Apache Recommended DOM C++ binding).
- function release() to fix Memory Management problem
- classes DOMDocumentRange and DOMDocumentTraversal
- XMLSize_t is used to represent unsigned integral type in DOM
- IDOM_XXXX classes are renamed to DOMXXXX, and IDOMParser is renamed to XercesDOMParser
as described in DOM Reorganization
- XercesDOMParser::adoptDocument is added so that document can optionally live
outside the parser.
- To support optionally load external DTD, the following are added:
- XercesDOMParser::set/getLoadExternalDTD
- DOMParser::set/getLoadExternalDTD
- SAXParser::set/getLoadExternalDTD
- and SAX2XMLReader will recognize the feature
http://apache.org/xml/features/nonvalidating/load-external-dtd
- To support Preparsing Grammar and Grammar Caching, the following are added:
- XercesDOMParser/DOMParser/SAXParser functions loadGrammar, resetCachedGrammarPool,
cacheGrammarFromParse, isCachingGrammarFromParse, useCachedGrammarInParse,
isUsingCachedGrammarInParse.
- 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.
- To support access to Grammar info, the following are added:
- XercesDOMParser/DOMParser/SAXParser/SAX2XMLReader functions getRootGrammar, getGrammar, getURIText.
- To support strict IANA encoding name checking, the following are added:
- class EncodingValidator.
- PlatformUtils functions strictIANAEncoding, isStrictIANAEncoding.
- XMLTransService functions strictIANAEncoding, isStrictIANAEncoding.
|
| |
- SAXParser::getScanner() is moved from public to protected.
- Grammar::getGrammarType has been added a const modifier.
- Xerces features are renamed from XMLUni::fgSAX2XercesXXXX to XMLUni::fgXercesXXXX
so that they can be shared with DOM parser.
- 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
Reuse Grammar becomes Grammar Caching.
- (in Parser, SAXParser, DOMParser, and XercesDOMParser)
- parse(const InputSource& source, const bool reuseGrammar = false);
- parse(const XMLCh* const systemId, const bool reuseGrammar = false);
- parse(const char* const systemId, const bool reuseGrammar = false);
- (in SAXParser, DOMParser, and XercesDOMParser)
- parseFirst(const InputSource& source, XMLPScanToken& toFill, const bool reuseGrammar = false);
- parseFirst(const XMLCh* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);
- parseFirst(const char* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);
|
| | | | Deprecated/Removed Public API | | | | |
| |
- The old Java-like DOM is now deprecated as described in
DOM Reorganization
- SAX2XMLReader::setValidationConstraint. For consistency, SAX2XMLReader users should
set the feature http://apache.org/xml/features/validation-error-as-fatal" instead.
- SAX2XMLReader::setExitOnFirstFatalError. For consistency, SAX2XMLReader users should
set the feature "http://apache.org/xml/features/continue-after-fatal-error" instead.
- With the new Grammar Caching introduced, the following features will not be
recognized by the SAX2XMLReader:
- http://apache.org/xml/features/validation/reuse-grammar
- http://apache.org/xml/features/validation/reuse-validator
|
|
|
| | | | Migrating from Xerces-C++ 1.6.0 to 1.7.0 | | | | |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 1.6.0 code base and the Xerces-C++ 1.7.0 code base.
| | | | New features in Xerces-C++ 1.7.0 | | | | |
| |
- Support SAX2-ext's DeclHandler.
- Directory sane_include reorganization: add sub-directory 'xercesc' to src / include folder.
See "Directory change in Xerces-C++ 1.7.0"
below for detail.
- More IDOM test cases - port IDOMMemTest, and merge ThreadTest and IThreadTest.
- Support IconvFBSD in multi-threading environment.
- Use IDOM in schema processing for faster performance.
- Add Project files for BCB6.
- Port to Caldera (SCO) OpenServer.
- Support building with new MacOSURLAccessCF NetAccessor that doesn't require
Carbon but can allow Xerces to live solely within CoreServices layer.
|
| | | | Directory change in Xerces-C++ 1.7.0 | | | | |
| |
- A new directory, src/xercesc is created to be the new parent directory of
all src's direct subdirectories.
- And in the binary package, all the headers are distributed in include/xercesc directory.
- Migration considerations:
- Windows application,
either change the include directories setting to
"..\..\..\..\..\src\xercesc" (Projects->settings->C/C++->Preprocessor),
or
change the relevant #include instances in the source/header files, accordingly, eg
#include <util/XMLString.hpp> be changed to
#include <xercesc/util/XMLString.hpp>
- Unix application,
either change the include search path in the Makefile to
" -I <installroot>/include/xercesc",
or
change the relevant #include instances in the source/header files as shown above.
|
| | | | Public API Changes in Xerces-C++ 1.7.0 | | | | |
| |
The following lists the public API changes between the Xerces-C++
1.7.0 and the Xerces-C++ 1.7.0 releases
of the parser.
| |
- Added SAX2-ext's DeclHandler class.
See the API documentation page for details.
- To support SAX2-ext's DeclHandler, the following new methods are added
in classes DefaultHandler and SAX2XMLReader:
- void DefaultHandler::elementDecl(const XMLCh* const name, const XMLCh* const model)
- void DefaultHandler::attributeDecl(const XMLCh* const eName, const XMLCh* const aName,
const XMLCh* const type, const XMLCh* const mode, const XMLCh* const value)
- void DefaultHandler::internalEntityDecl(const XMLCh* const name, const XMLCh* const value)
- void DefaultHandler::externalEntityDecl(const XMLCh* const name, const XMLCh* const publicId,
const XMLCh* const systemId)
- DeclHandler* SAX2XMLReader::getDeclarationHandler() const
- void SAX2XMLReader::setDeclarationHandler(DeclHandler* const handler)
- To conform to DOM Level 2 specification, the following methods are added:
- DOM_Node DOM_NodeIterator::getRoot()
- DOM_Node DOM_TreeWalker::getRoot()
- bool DOM_Node::hasAttributes() const
- bool DOM_Element::hasAttribute(const DOMString &name) const
- bool DOM_Element::hasAttributeNS(const DOMString &namespaceURI,
const DOMString &localName) const
- IDOM_Node* IDOM_NodeIterator::getRoot()
- IDOM_Node* IDOM_TreeWalker::getRoot()
- bool IDOM_Node::hasAttributes() const
- bool IDOM_Element::hasAttribute(const XMLCh* name) const
- bool IDOM_Element::hasAttributeNS(const XMLCh* namespaceURI,
const XMLCh* localName) const
- To fix [Bug 5570], a copy constructor is added to DOM_Range
|
| |
- To conform to the SAX2 specification, the namespace-prefixes feature
in SAX2 is set to off as default.
- To fix [Bug 6330], the Base64::encode and Base64::decode have been modified
as follows
- static XMLByte* Base64::encode(const XMLByte* const inputData,
const unsigned int inputLength,
unsigned int* outputLength);
- static XMLByte* Base64::decode(const XMLByte* const inputData,
unsigned int* outputLength);
- static XMLCh* decode(const XMLCh* const inputData,
unsigned int* outputLength);
- To conform to DOM Level 2 specification, the DOM_Node::supports and IDOM_Node::supports
are modified to
- bool DOM_Node::isSupported(const DOMString &feature, const DOMString &version) const
- bool IDOM_Node::isSupported(const XMLCh* feature, const XMLCh* version) const
|
| |
- No Deprecated Public API in this release.
|
|
|
| | | | Migrating from XML4C 2.x to Xerces-C++ 1.4.0 | | | | |
| |
The following section is a discussion of the technical differences between
XML4C 2.x code base and the new Xerces-C++ 1.4.0 code base.
| |
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.
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.
The new samples are:
- PParse - Demonstrates 'progressive parse' (see below)
- StdInParse - Demonstrates use of the standard in input source
- EnumVal - Shows how to enumerate the markup decls in a DTD Validator
|
| |
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.)
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.
| | | | 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);
}
...
}; | | | | |
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.
|
|
|
|