
<FORM name="loansForm" id="loansForm">{renew-form:=form(., .//input[@name="renew"])}
  <DIV class="bodydiv">
    <TABLE class="resultset">
          <template:meta default-text-matching="regex"/>
          
         
          <TR>
            <td class="rec_checkbox">{
              let $renew := .//input[@type="checkbox" and @name="volumeNumbersToRenew"]
              return 
              book:= {"renewId": $renew/@value, 
                      "statusId": if ($renew/@disabled) then "critical" else "curious",
                      "status": ""
                     }
            }</td>
            <TD class="rec_title">
              <DIV>
                <SPAN class="titleLine">{
                  let $title-authoryear := extract(., "^(.*)/(.*)|(.*)", (1,2,3))
                  let $author-year := extract($title-authoryear[2], "^\s*(.*)\((.*)\)|(.*)", (1,2,3))
                  return (
                    book.title := $title-authoryear[1] || $title-authoryear[3],
                    book.author:= $author-year[1] || $author-year[3],
                    book.year  := $author-year[2]
                  )
                  }</SPAN>
                  <!--Derzeit : 	ausgeliehen      
                      Ausleihtyp : 	Standardausleihe
                      Publikationsform : 	Buch/Zeitschrift
                      Abteilung : 	Staats- und Universitätsbibliothek Hamburg
                      -->
                 <t:loop><t:switch>
                   <tr><td>Ausleihfrist in Tagen</td>  <td></td></tr>
                   <tr><td>Ausleihfrist|Leihfristende|ausgeliehen bis</td>  <td>{book.duedate := parse-date(.)}</td></tr>
                   <tr><td>Theke</td>         <td>{$book.libraryBranch}</td></tr>
                   <tr><td>Signatur</td>      <td>{$book.id}</td></tr>
                   <tr><td>Verlängerungen</td><td>{$book.renewCount}</td></tr>
                   <tr><td>Mahnungen</td>     <td>{$book.status[] := x"Mahnungen: {.}"}</td></tr>
                   <tr><td>{$temp}</td>       <td>{$book.status[] := x"{normalize-space(translate($temp, ":", ""))}: {.}"}</td></tr>
                </t:switch></t:loop>
                <SPAN class="error">{$book.status := (., $book.status)}</SPAN>?
                <t:s>$book.status := join($book.status!normalize-space()[.], " ; ")</t:s>
              </DIV>
            </TD>
          </TR>+
       
 
    </TABLE>
  </DIV>
</FORM>