From: William Billingsley <whb21@ca...> - 2005-07-23 15:47:32
I think this is the same problem Gary Larsen and Dan Ochs have had, but
I haven't seen any replies posted to their posts in the last 10 days, so
I thought I'd post this.
Using eXist in embedded mode -
XMLResource xmlResource = (XMLResource)collection.getResource(documentId);
Node n = xmlResource.getContentAsDOM();
and then running an XSLT on the returned document (to stream
interactively with a linux process that talks an XML dialect). Any
XPaths involving namespaced elements, eg //mt:tileSet, are failing as if
the getContentAsDOM() used a non-namespace-aware documentBuilder, or the
namespace declaration was lost from the DOM.
Testing by running the same XSLT and document through 4xslt shows that
neither the document nor the stylesheet are faulty. Working around by
getting the document content as a string and reparsing also works but is
awkward + slower.
Is there any chance of a patch / solution? If not, I'm just another
person registering his interest in this bug being fixed, but who sadly
doesn't have time to examine the eXist code closely enough to fix it
From: William Billingsley <whb21@ca...> - 2005-07-23 16:03:12
Further to this, I have had a quick look through the code, and it
appears that in
org.exist.memtree.DocumentImpl method expandRefs()
the namespaces are not copied from the old document to the new document.
Sorry I don't have time to do the fix (nor the CVS access to commit it