xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kurz <dr.go...@a1.net>
Subject XPathQueryService.setDefaultNamespace
Date Tue, 21 Oct 2003 21:06:12 GMT

I use Xindice 1.1b1 in combination with JAXB and Cocoon for a project at 
university. The xml files I store in the xindice collections are 
instances of (w3c-)schema documents with a target-namespace (which is 

To retrieve documents from xindice collections, I use the 
XPathQueryService class. Because I specified schemas with target 
namespace I have to use a namespace in xpath queries. I originally 
wanted to use default namespaces with XPathQueryService using:


But this method is no longer present in xindice 1.1b1 (it was in 1.0). 
Then I tried the same using


This should work according to the api-javadoc. The query is executed but 
I always get an empty ResourceSet.

Everything works fine if I specify a prefix using


But then I have to alter the xpath query (for instance 
"/book[@id='1000']" to "/ng:book[@id='1000']"). This is not a real 
problem but I am curious about default namespaces. I really want to know 
why it is not working. Is it a temporary problem of xindice 1.1b1 or is 
the namespace handling with xpath completely changed in version greater 
than 1.0 (most parts seem to be the same)?

nice greetings

View raw message