{book := object(),
book.extendid := encode-for-uri(input/@name)
} |
{book.duedate := parse-date(., "dd.mm.yyyy")} |
{book.libraryBranch := .} |
{book.category := extract(text(), "\[([^]]*)\]", 1),
book.title := if (contains(text(), "]")) then extract(text(), "(\] )(.*)", 2) else text(),
if (contains($book.title, "/")) then (
$book.author := substring-after($book.title, "/"),
$book.title := substring-before($book.title, "/")
) else ()
}
{preid := text()}
{book.id := x"{$preid}:{text()}" |
{book.status := deep-text(" ")}
{book.statusId := "critical"}
|