[xquery-talk] Collections - family relationships

Andrew Welch andrew.j.welch at gmail.com
Mon Jan 6 06:30:20 PST 2014


This post:

> I want to find all reviews written by people that only wrote 1 review. I
> wrote
>
> collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
>
> but reviews has a @person attribute and that person may have 1 or more
> reviews in another collection - so that doesn't work.
>
> The thing  that seemed most natural to fix this was to supplement the
> predicate to say there should be no sibling review by the same
> reviews/@person.

...followed by this:

>  Note  I did not post asking for code

...is puzzling.  If you post code, don't be surprised if people post
code back.  Even if you don't want it, someone in the archives might.


-- 
Andrew Welch
http://andrewjwelch.com


More information about the talk mailing list