Hi,
Has anything changed between Xerces 3.0 and 3.1 regarding
resolution of XPath expressions?
It may seem strange, but very fundamental expressions like selecting
root element seems to work differently.
A very simple XML sample:
# cat bookstore.xml
<?xml version="1.0" encoding="utf-8"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
Here is quick test with the DOMPrint utility from Xerces C++ 3.1
# domprint -xpath=/bookstore bookstore.xml
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
# domprint -xpath=bookstore bookstore.xml
#
Correct me if I'm wrong please, but shouldn't the second
command without explicit / anchor select root tree - it is evaluated
against the root anyway, right?
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org