/* Q10. List all persons according to their interest; */
/* use French markup in the result. */
FOR $i IN DISTINCT
document("RainbowCore/Xmark/auction.xml")/people/person/profile/interest/@category
LET $p := {FOR $t IN document("RainbowCore/Xmark/auction.xml")/people/person
WHERE $t/profile/interest/@category = $i
RETURN
$t/gender/text() ,
$t/age/text() ,
$t/education/text(),
$t/income/text()
,
$t/name/text() ,
$t/street/text() ,
$t/city/text() ,
$t/country/text() ,
$t/email/text() ,
$t/homepage/text()
,
$t/creditcard/text()
}
RETURN
$i ,
$p