Commit d89a1557 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

throw error for multiple usage of an id

parent 7d966f4e
......@@ -147,6 +147,7 @@ else
declare function local:get-list-by-id($id as xs:string)
as xs:string {
let $entity := collection($index:dataPath)/id($id)
let $test := if($entity[2]) then error(QName("FONTANE", "INDEX-API3"), "Entity »" || $id || "« has more then one occurence." ) else ()
return
switch ( $entity/local-name() )
case "event" return "listEvent"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment