{ declare function local:parse-column($element){ $element/normalize-space(string-join(node() except span[contains(@class, "oclc-module-label")])) }; reserve-request:=() } ? {$book.image-url[] := css(".standardPaddingCover")//(img,input[type="image"])!(@src, tokenize(@sources, "[|]")[contains(.,"://")]) }
{book.orderable := contains(@src, "false.png")} {book.orderable := contains(@src, "false.png")} {$book("Download !") := ../@href} {$book._orderTarget := @name}?
? ? * ? ? ? ? ? ? ? ? * {$holding:={}} {let $orderBtn := .//a[contains(@id, "BtnReserve")] return ( $holding("orderable") := exists($orderBtn), $orderBtn ! ( $holding("_orderTarget") := extract(@href, "'([^']+)'", 1), $holding("orderTitle") := $orderBtn, $book.orderable := false() (: when it can order a specific holding, it does not need to order all :) ) ), $book.holdings[] := $holding }+ if (empty($book._orderTarget) and empty($book.holdings[.("orderable")])) then let $globalOrderBtn := //a[contains(@id, 'BtnReserve')] where exists($globalOrderBtn) return ( $book._orderTarget := translate($globalOrderBtn/@id, "_", "$"), $book.orderable := true() ) else ()
SignaturStatusFristVorbestellungenBarcodeMediengruppeInteressenkreisAusleihhinweis
{$holding.libraryBranch := local:parse-column(.)} {$holding.libraryLocation := normalize-space($holding.libraryLocation || " " || local:parse-column(.))} {$holding.id := local:parse-column(.)} {$holding.statusStr := local:parse-column(.)} {translate(local:parse-column(.), " ", "")[.] ! ( $holding.duedate := parse-date(.) ) } {translate(local:parse-column(.), " ", "")[.] ! ( $holding.pendingOrders := . ) } {$holding.barcode := local:parse-column(.)} {$holding.category := local:parse-column(.)} {$holding.category := local:parse-column(.)} {$holding("Ausleihhinweis!") := local:parse-column(.)}
?
{ for $span in .//span let $idlbl := $span/extract(@id, "_Lbl(.*)$", 1)[.] where exists($idlbl) and not(ends-with($idlbl, "Value")) let $primary-key := exists($search-reverse-keys($idlbl)) let $key := if ($primary-key) then $search-reverse-keys($idlbl) else $span || "!" let $value := join($span!following-sibling::node()!( if (self::a and not($primary-key)) then (. || (if (contains(@href, "http")) then x" ( {@href} )" else "")) else . )) where $value return $book($key) := $value }
{let $target := get("need-reserve-request-target",())[.] where exists($target) return $reserve-request := form((//form)[1], {"__EVENTTARGET": $target, "": {"kind": "submit"}})}
{$book._volumeFirst := resolve-uri(@href), i := 1, $book("Band 1!") := .} {$book(x"Band {$x := $x + 1}!") := .}*
{vl:raise(.)}