[xquery-talk] Query provides results which dont match
Michael Kay
mhk at mhk.me.uk
Thu Aug 5 12:58:34 PDT 2004
>
> 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")]
There is no match-all() function in XQuery. This must be something peculiar
to your particular product vendor.
>
> 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.
You will have to ask questions about the match-all() function
to whoever provided the function.
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
There is no &= operator in XQuery. I don't know what language you are using,
but it's not XQuery.
Michael Kay
More information about the talk
mailing list