<?xml version="1.0" encoding="UTF-8"?>
<zs:searchRetrieveResponse xmlns:zs="http://www.loc.gov/zing/srw/">
  <zs:numberOfRecords>{search-result-count := ., search-next-page-available := get("position",1) + get("maximumRecords",1) &lt;= $search-result-count }</zs:numberOfRecords>
  <zs:records t:test="$search-result-count gt 0">
    <template:switch-prioritized>
      <zs:record>
        <zs:recordSchema>dc</zs:recordSchema>
        <zs:recordData xmlns:dc="http://purl.org/dc/elements/1.1/">{book := {}}
<!--          <record xmlns:dc="http://purl.org/dc/elements/1.1/">  or  <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">-->
          <template:switch>
            <dc:title>{$book.title := concat($book.title, " ", .)}</dc:title>
            <dc:creator>{$book.author := concat($book.author, " ", .)}</dc:creator>
            <dc:contributor>{$book.author := concat($book.author, " ", .)}</dc:contributor>
            <dc:date>{$book.year}</dc:date>
            <dc:publisher>{$book.publisher}</dc:publisher>
            <dc:identifier>{$book.isbn}</dc:identifier>
            <dc:description>{$book.description := .}</dc:description>
<!--            <t:if><t:s>temp:=name()</t:s><t:read var="book.{}</t:if>-->
          </template:switch>*
        <!--</record>--></zs:recordData>
      </zs:record>    
      
      <zs:record>
        <zs:recordSchema>marcxml</zs:recordSchema>
        <zs:recordData>{book := {}}
          <record>
          <template:switch>
            <controlfield tag="001">{$book.ppn}</controlfield>
            <controlfield tag="008">{$book.year := substring(., 8, 4)}</controlfield>
            <datafield tag="100"><subfield code="a">{$book.author}</subfield></datafield>
            <datafield tag="110"><subfield code="a">{$book.author}</subfield></datafield>
            <datafield tag="245">
              <subfield code="a">{$book.title}</subfield>
              <subfield code="b">{$book.title := concat($book.title, " ", .)}</subfield>? <!-- sub title?? -->
            <!--  <subfield code="c">{$book.title := concat($book.title, " ", .)}</subfield> autor??-->
            </datafield>
            <datafield tag="020">
              <subfield code="a">{$book.isbn}</subfield>
            </datafield>
            <datafield tag="260">
              <subfield code="a">{$book.location}</subfield>?
              <subfield code="b">{$book.publisher}</subfield>?
              <subfield code="c">{$book.year}</subfield>?
            </datafield>
            <datafield tag="700"><subfield code="a">{$book.author := if ($book.author) then concat($book.author, "; ", .) else .}</subfield></datafield>
<!--            <t:if><t:s>temp:=name()</t:s><t:read var="book.{}</t:if>-->
          </template:switch>*
        </record></zs:recordData>
      </zs:record>    
      
    </template:switch-prioritized>*
  </zs:records>
</zs:searchRetrieveResponse>