Please excuse if I'm misunderstanding what you are trying to do. I assume you want to search both, persName and placeName, if both parameters are set? In this case you need to combine the two selections, e.g. with a union:

let $name-predicate := local:get-name-predicate(request:get-parameter('people',''))
let $place-predicate := local:get-name-predicate(request:get-parameter('place',''))

    (if($name-predicate) then (collection('/db/punch/data')//tei:persName[@corresp=$name-predicate]) else ())
    (if($place-predicate) then (collection('/db/punch/data')//tei:placeName[@corresp=$place-predicate]) else ())


I think you could also avoid the union altogether. Wolfgang, would this be more efficient? 

let $corresp := (local:get-name-predicate(request:get-parameter('people','')),  local:get-name-predicate(request:get-parameter('place,''))) return

Thats the beauty of a language without null's where an empty sequence is a perfectly valid 'thing' to operate upon :-p

Adam Retter

eXist Developer
{ United Kingdom }