xquery version "1.0"; import module namespace raweb = "http://raweb.inria.fr/" at "raweb-module2.xq"; import module namespace request = "http://exist-db.org/xquery/request"; let $proj := request:get-parameter("proj", "ACACIA") return element {QName("http://www.w3.org/1999/xhtml", "html")} { RAWEB teams summary,

RAWEB teams summary

{ raweb:count-projects() } projects

Count persons for project {$proj}

{ for $project in /raweb/identification let $persons := count($project//person) where string($project/shortname)=$proj return for $p at $i in raweb:list-members(string($proj)) return { if ($i=1) then (, ) else () } }
ProjectPersonsFirstnameLastname
{ string($project/shortname) }{ $persons }{ string($p/firstname) }{ string($p/lastname) }
}