Berkeley DB XML 1.2.0 Change Log
Upgrade Requirements:
- The container format has changed. Containers created with version
1.1.0 of Berkeley DB XML must be upgraded by calling the
XmlContainer::upgrade() method. Attempting to open a 1.1.0 version
container with the 1.2.0 library will return a VERSION_MISMATCH
exception.
New Features:
- New API to perform in-place modification of documents, based on
query results has been added. It addes XmlContainer::modifyDocument()
and XmlDocument::modifyDocument(), along with a new class to specify the
modification, XmlModify.
General Functionality Changes:
- Fix a query planner bug that would generate an incorrect plan when
edge indices were enabled and the query included the text() function.
Queries such as '/a/b/text()', where b is edge indexed, would generate
a plan looking for edges a.b and b.b. [#8527]
- Fix a query planner bug where it tried to map an XPath equality
sub-expression onto an appropriate equality index, but if not avaliable
did not look for a suitable presence index instead. [#8566]
- Fix a bug where variable references in parsed query expressions only
worked the first time. Each subsequent use of the expression would fail
to make use of the current value defined in the query context. [#8585]
- Fix a bug where the XPath expression parser did not allow node names
to have axis names, for example child, parent, etc. [#8781]
- Fix a bug where queries of the form /a[b/c='foo'], where 'c' is
indexed, always resulted in a sequential scan instead of an index
lookup. [#8819]
- Fix a bug where XPath queries of the form /ns:div and /ns:mod were
not supported. [#8840]
- Modify XPath functions substring-before and substring-after to make
use of a substring index. [#8875]
- Modify XPath function starts-with to make use of a substring index,
if an equality index is not available. [#8875]
- Remove support for XmlValue types NODELIST and ATTRIBUTE. They have
been replaced with the type NODE. An XPath query that matches a list of
nodes within a document will now return a list of XmlValue objects with
type NODE. The XmlValue methods isNodeList, isAttribute, asNodeList, and
asAttribute, have been replaced by isNode and asNode. [#8884]
- Substring indices are now created using a normalized node value.
All whitespace and punctuation characters are removed, and all upper
case characters are converted to their lower case equivalents, except
UTF-8 characters which are not changed. Each key is now three characters
rather than three bytes, as a UTF-8 character can theoreticaly occupy
as many as six bytes. Queries against substring indices will still
return the same results. This change improves the performance of the
indexer and reduces the storage space requiements of the substring
index. The container format has changed meaning that containers created
with version 1.1.0 of Berkeley DB XML must be upgraded by calling the
XmlContainer::upgrade() method. [#8906]
- Fix a bug where the namespace prefix was not stored with document
metadata items. This had the consequence of the metadata item not being
reflected into the document when retrieved as a DOM. [#8967]
- Fix a bug where numeric comparisons were precision limited. [#8967]
- Fix a bug where QueryContext should have been holding a reference
to Xerces. [#9050]
- Fix the query processor to correctly identify opportunities to make
use of edge indices. Queries such as /a[b and c] would not make use of
edge indices for a.b or a.c. [#9009][#9334]
API Changes:
- Add XmlDocument::queryWithXPath(XmlQueryExpression...). Previously
available on XmlContainer, but not XmlDocument. [#8591]
- Add an option to XmlDocument::getDOM() for adoption of the contained
DOM. [#8229]
- Remove support for XmlValue types NODELIST and ATTRIBUTE. They have
been replaced with the type NODE. An XPath query that matches a list of
nodes within a document will now return a list of XmlValue objects with
type NODE. The XmlValue methods isNodeList, isAttribute, asNodeList, and
asAttribute, have been replaced by isNode and asNode. [#8884]
- DB_CHKSUM_SHA1 is now DB_CHECKSUM.
- The DbTxn argument has been removed from the XmlResults::next()
iterators. It is not needed. Compatibility has been maintained for C++,
but not for Java and scripting languages; some code may need to be
changed. [#8903]
- New API to perform in-place modification of documents, based on
query results has been added. It addes XmlContainer::modifyDocument()
and XmlDocument::modifyDocument(), along with a new class to specify the
modification, XmlModify. The operations available are intended to
provide the same update capabilities as those specified by XUpdate, except via API rather
than an XML language. This API is not an implementation of the XML::DB
API, but could be used as a basis for such an implementation.
- XmlQueryContext::setWithMetaData(bool) has been added to allow an
application to query a document, or documents, without including the
document metadata as attributes on the root node. There is cost
associated with adding metadata as attributes, and if they are not
required for correctness of a query, it is more efficient to leave them
out. The default, for compatibility, is to include the metadata in
queries. There is a corresponding getWithMetaData() function, as well.
Java-specific API Changes:
- Fix memory leaks. [#8555]
- XmlContainer::queryWithXPathExpression renamed to
XmlContainer::queryWithXPath.
- XmlContainer::deleteByID renamed to XmlContainer::deleteDocument.
- XmlResults::close removed in favor of XmlResults::delete.
Python-specific API Changes:
- Fix memory leaks. [#8555]
Tcl-specific API Changes:
- Fix memory leaks. [#8555]
Utility Changes:
None.
Configuration, Documentation, Portability and Build Changes:
- The XPath union operator bug has been fixed in Pathan 1.2 release
2. [#8528]
- Fix test suite to pass in transactional mode and to work against
Xerces-C++ version 2.3. [#8679]
- Improve configure to deal with solaris configurations better.
[#8810]
- Fix creation of JNI library for Mac OS/X with the required extension
of .jnilib. [#9013]
- Test with Berkeley DB 4.2.52.
- Test with Xerces 2.3 from download, Xerces 2.3 from CVS, and Xerces
2.4.
- Test with Pathan 1.1 release 2.
- Update DB XML Getting Started Guide for C++.
- Add DB XML Getting Started Guide for Java.
Known Issues
- Perl build on OS X may fail. If you run into this (or fix it!),
please let Sleepycat know.
- Gcc 3.3 -- if you are using gcc 3.3, the build of Pathan1.2, release
2 may fail. If so, it's necessary to get the code directly from the CVS
tree.
- There is a bug in Python's use of overloaded functions in the class,
XmlContainer, specifically, those that take a DbTxn * as the first
argument -- deleteDocument() and queryWithXPath(). The error is a
failure to find a matching function overload. It only occurs when the
DbTxn is other than "None." This is fixed, and will be released in
1.2.1.