{declare function local:parse-column($element){ $element/normalize-space(string-join(node() except span[contains(@class, "oclc-module-label")])) }; culture := (//input[contains(@name, "Culture")]/@value, "de-DE")[1], userRndId := //input[ends-with(@name, "PatronRndId")]/@value otherwise $username, vl:delete-current-books() } {extendableCheck := extract(resolve-uri(@href), "^.*PatronAccountModule[/\\]") || "PatronAccountService.asmx/IsCatalogueCopyExtendable"}
{ $user-form := form(., {"": {"kind": "submit"}}), $renew-button := (//input[ends-with(@name, "BtnExtendMediums")])[1]/{"__EVENTTARGET": @name}, $cancel-ordered-button := (//input[ends-with(@name, "BtnCancelReservations")])[1]/{"__EVENTTARGET": @name}, $cancel-provided-button := (//input[ends-with(@name, "BtnCancelReadyForPickup")])[1]/{"__EVENTTARGET": @name}, let $split := extract($raw, 'LoadExtensionsAsync *\( *["'']([^"'']*?/IsCatalogueCopyExtendable)["''] *, *["'']([^"'']*?)["''] *, *["'']([^"'']*?)["''] *(\)|, *["'']([^"'']*?)["''])', (1,2,3,5)) return ( $extendableCheck := $split[1][.] otherwise (//link[contains(@href, 'PatronAccountModule')])[1]/(extract(resolve-uri(@href), "^.*PatronAccountModule[/\\]") || "PatronAccountService.asmx/IsCatalogueCopyExtendable"), $portalId := $split[2][.] otherwise extract($raw, 'eonportalid *= *[''"]([0-9]+)[''"]', 1)[.] otherwise "0", $localResourceFile := $split[4][contains(., "DesktopModules")] otherwise $split[3][.] otherwise "/DesktopModules/OCLC.OPEN.PL.DNN.PatronAccountModule/App_LocalResources/NormalView" ) } {$account-expiration}? {book:={}}
? ? *
{$book.image-url := .//(img,input[type="image"])!(@src, tokenize(@sources, "[|]")[contains(.,"://")]), $book.image-url!extract(., "(amazon.*/(ASIN|P)/|isbn=|cover/)([-0-9]{8,})([./&]|[.]jpg)", 3)[.][1]!($book.ISBN := .) } {book.title := local:parse-column(.)} {book.author := local:parse-column(.)} {book.category := local:parse-column(.)} {book.libraryBranch := local:parse-column(.)} {book.duedate := parse-date(extract(., "[0-9./-]{6,}"))} { .//input/( if (@type = "checkbox") then $book._renewid := @name else if (contains(@name, 'CopyId')) then ( book._copyId := @value, book.id := @value ) else () ) }
*
{book := {"_cancelid": @name, "statusId": "ordered", "cancelable": true()}} {book.title := local:parse-column(.)} {book.author := local:parse-column(.)}
*
{book := {"_cancelid": @name, "statusId": "provided", "cancelable": true()}} {book.title := local:parse-column(.)} {book.author := local:parse-column(.)}
{vl:raise(.)}