xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Shand <de...@intrallect.com>
Subject default namespace problems
Date Tue, 27 Apr 2004 16:51:17 GMT
Hi,

I'm having some issues searching documents within a default namespace.

if my document looks like

<node1 xmlns="http://foo.bar.com" >
	<bar>content</bar>
</node1>

I'd assume that I would do service.setNamespace( "",
"xmlns="http://foo.bar.com" )

or even

service.setNamespace( null, "xmlns="http://foo.bar.com" )

neither of these work.
However if I add a prefix to my document like:

<foo:node1 xmlns:foo="http://foo.bar.com" >
	<foo:bar>content</foo:bar>
</foo:node1>

and do service.setNamespace( "foo", "xmlns="http://foo.bar.com" )

my query works fine. Unfortunately this isn't a solution for me.

I came across something in the archives which seemed to say that as
long as I called setNamespace() with the location value, it didn't
really matter what was passed as a prefix. I've tried this and it
certainly doesn't work.

If anybody has some ideas on this I'd appreciate some feedback. It
seems like a very common use-case. I'm sure I must be missing
something.
I'm using the 1.1b4 build.

Thanks.

Steven Shand.


Mime
View raw message