[xquery-talk] Query provides results which dont match

Wolfgang Meier wolfgang at exist-db.org
Thu Aug 5 13:00:06 PDT 2004


this is an eXist-specific question as you are using some extensions, so you 
should better post it to the exist-open mailing list. I'm forwarding it 

Anyway, we had quite a lot of bug fixes since the last release, so it would be 
a help to know which version you are using?


On Thursday 05 August 2004 06:49 am, Tina Gey wrote:
> Hey,
> I am a newbie to xquery and working with the xml
> database exist. In there i have documents with the
> following structure:
> <dokument id="XY">
>  <titel></titel>
>  <schritt nr="">
>   <taetigkeit />
>   <mitarbeiter />
>  </schritt>
> </dokument>
> Now I am trying the following simple query:
> collection("/db/qm")//dokument[match-all(.,
> "Testroutine", "Entwickler")]
> I thought this would only provide the documents which
> have both string within the "dokument"-Tag.
> but this does not happen. There are also shown
> documents which obviously don't match even one of the
> string. I have the feeling that my data might be
> corrupt, cause nothing works. I also tried queries
> like:
> for $x in collection(...) let $y:= $x/dokument where
> $y[. &= "Testroutine Entwickler"] return $y
> or even:
> for $x in collection(...)//dokument let $y:= ($x/titel
> union $x/schritt) where $y[. &= "Testroutine
> Entwickler"] return $y
> everything...Please help me! Thanks

More information about the talk mailing list