Bug 22070 - xml-rpc driver merges text node results.
Summary: xml-rpc driver merges text node results.
Alias: None
Product: Xindice
Classification: Unclassified
Component: Driver: XMLRPC (show other bugs)
Version: cvs head (1.1)
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Xindice Developers
Depends on:
Reported: 2003-08-01 21:17 UTC by Kevin O'Neill
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Kevin O'Neill 2003-08-01 21:17:15 UTC
The xml-rpc driver merges text node results.

	public void testGetMultipleTextNodes() throws Exception {
		String query = "//person/first/text()";

		Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
		XPathQueryService xpathservice = (XPathQueryService)
		col.getService("XPathQueryService", "1.0"); ResourceSet resultSet =

		ResourceIterator results = resultSet.getIterator();

		List res = asList(results);
		assertEquals(2, res.size());

Internally two TextImpl nodes are returned to the server. The server puts
these into a result document and sends it back. As it returns it is
serialises the Result document to a text stream. This has the effect of
flattening the two text nodes into one and thus breaking the test (this
doesn't happen with the embeded driver).
Comment 1 Vadim Gritsenko 2004-02-25 13:53:06 UTC
Fixed. Each text node result is wrapped into the <query:result> element, which
has meta information and result text node.