{form:=form(., {"": {"kind": "submit"}}), $loginlink := .//a[@id=('dnn_dnnLOGIN_loginLink', 'dnn_dnnLogin3_enhancedLoginLink')]/@href, if (empty($loginlink)) then $loginlink := get("urlaccount", "") || "?returnurl=" || base-uri() else () }
{prev-page := form-combine($form, .)}? { if ($current-page eq $last-visited-page) then (search-next-page-available := true()) else (), next-page := form-combine($form, .)}? {search-result-count := extract(normalize-space(.), "[0-9]+")}
{book := {"title": ., "_detailId": let $temp := extract(@href, "dnn.*btn.*Value") return if ($temp) then $temp else @href, "_page": $current-page}} {book.title := x"{$book.title}: {.}"}? 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::script or matches(@style, "display *: *none")) then () else if (self::a and not($primary-key)) then (. || (if (contains(@href, "http")) then x" ( {@href} )" else "")) else . )) where $value return $book($key) := $value
{book := {"title": ., "_detailId": extract(@href, "dnn.*btn.*Value"), "_page": $current-page}} {book.title := x"{$book.title}: {.}"}? 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
+
{search-result-count := 0}
{vl:raise(.)}