So I'm back doing some work with xindice and I've come across a couple of
issues with regards to query results.

Namespace searches work the appropriate nodes are selected. The problem is
that the namespace declarations are missing from the returned elements.
For example if you store a document

<a xmlns="example.com">
  <b>foo</b>
</a>

then query /x:a/x:b (with x mapped to "example.com")  

<b>foo</b> will be returned and the namespace of b is lost.

Store the following:

<n:a xmlns:n="example.com">
  <n:b>foo</n:b>
</n:a>

then query /x:a/x:b (with x mapped to "example.com")  

<n:b>foo</n:b> will be returned. Calling getContentAsDOM() on the
XMLResource returned throw an exception indicating that the prefix n has
not been declared.

There's also an issue if the result is not an element as CollectionImpl in
the embeded database attempts to cast the resulting node to an Element.
This is wasy to avoid by checking the type of the node before casting it.

I'm a little unsure of how to handle the issue of the namespaces for the
element. Any ideas?

-k.

-k.

Reply via email to