{$book.image-url:=@src}?
{css("span.results_summary") ! ( let $subspans := span[span[contains(@class, "label")]] return ( (if (empty($subspans)) then . else join(head($subspans)/preceding-sibling::node())), $subspans!data())! ($book(substring-before(., ":") || "!") := normalize-space(substring-after(., ":")) ) )}
{$book.holdings := tr!{| for $td in td return tokenize($td/@class, " ")!(switch(.) case "itype" return {"Medientyp": $td} case "location" return {"libraryBranch": $td} case "collection" return {"Sammlung!": $td} case "call_no" return {"Regal!": string($td) ! (if (contains(., "(")) then normalize-space(substring-before(., "(")) else . )} case "status" return {"statusId": $td/span/tokenize(@class," ")!(switch (.) case "available" return "available" case "checkedout" return "lend" default return ())} case "date_due" return let $duedate := string($td/span[1]/@title) where boolean($duedate) return {"dueDate": parse-date($duedate)} case "barcode" return {"barcode": $td} case "holds_count" return let $holds := extract($td,"[0-9]+") where $holds return {"Vormerkungen!": $holds} default return ()) |} }
?
{$book.orderTitle:="vormerken"}