Terry Rosenbaum wrote: Hi again,
or
String xpath = "//[EMAIL PROTECTED]>='...']";
Sorry, i copy-pasted. The code says:
String xpath = "//revision[url='...']";
But this doesn't work, too, although the example works. This is
my code:
// Get the collection to use, with the given configuration or the
// default values, respectively.
col = DatabaseManager.getCollection(rootCollection);
// Retrieve a reference to the XPathQueryService to use with the col. queryService = (XPathQueryService)col.getService("XPathQueryService", "1.0");
// Query for the last revision element in the document with the id 'url'.
String xpath = "/document/revision[url='"+url.toString()+"']";
ResourceSet resultSet = queryService.queryResource(url.toString(), xpath);
logger.debug("Retrieved "+resultSet.getSize()+" revisions");
ResourceIterator results = resultSet.getIterator();
The xpath resolves to /document/revision[url='file://ID101rev1.htm'] But there is no result although /document/revision returns 3 elements with this url value. Can you help?
String xpath = "//[EMAIL PROTECTED]>=0]";
Using index with type="long"? Value comparisons don't work
correctly for any nummeric type of index and can cause unexpected results.
See mailing lists archives and bugzilla.
I will only have a few timstamps. Could I workaround this if the String attributes would do?
Like
String xpath = "//revision[url='ts0']";
..
String xpath = "//revision[url='ts1']";
..
Thanks beforehand again,
David