<template:switch prioritized="true">
  <html>
    <template:meta default-text-matching="regex"/>
    
    <DIV id="R30">
      <DIV class="html_div">
        <div id="R001">
          <img t:condition="not(matches(@src,'/[0-9]Sterne.gif'))">{book.image-url:=resolve-uri(@src)}</img>
        </div>
      </DIV>
    </DIV>?

    <t:switch-prioritized>
      <input title="Zurück zur Trefferliste">{backButtonName := uri-encode(@name)}</input>
      <input t:condition="contains(@title, 'zur Trefferliste')">{backButtonName := uri-encode(@name)}</input>
    </t:switch-prioritized> 
    
    {goback := form(//form, x"{$backButtonName}.x=0&{$backButtonName}.y=0"),
     if (//input[@type="submit" and contains(@value, 'Bestell')]) then book.orderable := true() else ()
    }    

 
        
      
<!--    <DIV id="main">
      <DIV class="inside">
        <DIV class="block">
          <DIV class="fsgrp">-->
              <DIV class="aDISListe">
                <DIV class="html_div">
                  <DIV class="aDISListe">
                    <TABLE class="gi">
                      <t:loop>
                        <t:switch>
                        <TR>
                          <TH>Titel</TH>
                          <TD>{book.title:=if (contains(., "/")) then extract(., "(.*)/", 1) else .}</TD>
                        </TR>
                        
                        <TR>
                          <TH>Person|Autor</TH>
                          <TD>{book.author:=.}</TD>
                        </TR>
  
                        <TR>
                          <TH>erschienen</TH>
                          <TD>{
                            book.year:=if (contains(., "/")) then translate(substring-after(., "/"), "[]", "")  (: translate for cases like [2009]? :)
                                       else if (contains(., ",")) then translate(extract(., ",[^,0-9]*([0-9]+)[^,0-9]*$", 1), "[]", "")
                                       else $book.year,  
                            book.location:=if (contains(., ":")) then substring-before(., ":") else $book.location, 
                            book.publisher:=if (contains(., ":") and contains(., "/")) then substring-before(substring-after(., ":"), "/") 
                                            else if (contains(., ":") and contains(., ",")) then substring-before(substring-after(., ":"), ",") 
                                            else $book.publisher
                            }</TD>
                        </TR>
  
                        <TR>
                          <TD><a href="{$book.home-url}">Zitierlink</a></TD>
                        </TR>

                        <TR>
                          <TH>{name:=translate(normalize-space(.), ".", "")}</TH>
                          <TD><t:read source="if (./a and contains(./a/@href, '://')) then x'{.} ( {./a/@href} )' else ."  var="book.{$name}!"/></TD>
                        </TR>
                        </t:switch>
                      </t:loop>
                    </TABLE>*
                  </DIV>
                </DIV>
              </DIV>
  
            <DIV class="rTable_div" template:optional="true">
              <TABLE class="rTable_table">
                <thead><tr><t:siblings-header>
                  <th>Bibliothek|Library</th>?
                  <th>Standort|Location</th>?
                  <th>Signatur|Shelfmark</th>?
                  <th>Mediennummer|Barcode</th>?
                  <th>Ausleihtyp|Bestellmöglichkeit|Leihfrist|Circulation type|Order possibility</th>?
                  <th>Status|Verfügbarkeit</th>?
                  <th/>*
                  </t:siblings-header></tr>	
                </thead>
                <TR>{$holding := {"orderable": false()}}<t:siblings>
                  <td>{$holding.libraryBranch}</td>
                  <td>{$holding.libraryLocation}</td>
                  <td>{$holding.id}</td>
                  <td>{$holding.barcode}</td>
                  <td>{$holding("Ausleihtyp!") := .}</td>
                  <td>{$holding.status}</td>
                  <td>{$holding("und!") := .}</td>
                </t:siblings>{$book.holdings[] := $holding}</TR>*
              </TABLE>
            </DIV>
  
       <!--   </DIV>
        </DIV>
      </DIV>
    </DIV>-->
    
    </html>
    
  <h1>Wir haben seit einiger Zeit<t:s>vl:raise-timeout(.)</t:s></h1>
  <h1>Ihre Sitzung wurde beendet<t:s>vl:raise-timeout(.)</t:s></h1>     
    
    
</template:switch>