[xquery-talk] distinct-values in Where Clauses
Wei, Alice J.
ajwei at indiana.edu
Thu Jan 17 10:06:48 PST 2008
Hi, XQueryers
I am processing some nodes of information using a lot of different "or" in my query structure. Here is the XQuery:
declare boundary-space preserve;
declare variable $text external;
<text>{
for $find in doc("resume.xml")//div,
$note in $find/note,
$head in $find/head,
$desc in $find/p
where
distinct-values((contains($desc,$text)) or (contains($note,$text)) or (contains($head,$text)))
return
<div>
<head>{data($head)}</head>
<p>{data($desc)}</p>
<note>{data($note)}</note>
</div>
}
</text>
The query itself is functional, but the problem is that even though my distinct-values function has been set, there are still duplicates. Can anyone help out?
Thanks to those who can help.
======================================================
Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
ajwei at indiana.edu<mailto:ajwei at indiana.edu>
More information about the talk
mailing list