for $resource in collection('/db/Profiles/<RES_TYPE ISdefault ='' />')//Resource
where $resource/ID/string() eq '<RES_ID/>'
return $resource