Hello,

I have a question regarding xquery.

I execute the following query:

string(/bank[name='Dresdner Bank AG']/name)

Against these documents;

<bank>
  <name>Dresdner Bank AG</name>
</bank>
<bank>
  <name>Deutsche Bank</name>
</bank>
<bank>
  <name>Deutsche Bank</name>
</bank>
<bank>
  <name>Some dummy bank</name>
</bank>

The query returns these resources:

<xq:result
  xmlns:xq="http://xml.apache.org/xindice/Query";
  xq:col="/db/banks" xq:key="0100007f626f1e1500000102ca77bb76" />
<xq:result
  xmlns:xq="http://xml.apache.org/xindice/Query";
  xq:col="/db/banks" xq:key="0100007f626f1e1500000102ca7c4773" />
<xq:result
  xmlns:xq="http://xml.apache.org/xindice/Query";
  xq:col="/db/banks"
  xq:key="0100007f626f1e1500000102ca8142c3">Dresdner Bank AG</xq:result>
<xq:result
  xmlns:xq="http://xml.apache.org/xindice/Query";
  xq:col="/db/banks"
  xq:key="0100007f626f1e1500000102d468b1d9" />

What I would expect is only one resoure as a result: the resource containig the name "Dresdner Bank AG".

Am I missing something?

Sincerely

Michael Kastner

Reply via email to