<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
     xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Search: {{query.pattern}}</title>
    <link>{{query.unpaginatedQuery}}&amp;format=xml&amp;start={{results.start}}&amp;pageLength={{pagination.itemsPerPage}}</link>
    <description>Search result for {{query.pattern}}</description>
    <opensearch:totalResults>{{results.count}}</opensearch:totalResults>
    <opensearch:startIndex>{{results.start}}</opensearch:startIndex>
    <opensearch:itemsPerPage>{{pagination.itemsPerPage}}</opensearch:itemsPerPage>
    <atom:link rel="search" type="application/opensearchdescription+xml" href="{{searchProtocolPrefix}}/searchdescription.xml"/>
    <opensearch:Query role="request"
      searchTerms="{{query.pattern}}"{{#query.lang}}
      language="{{query.lang}}"{{/query.lang}}
      startIndex="{{results.start}}"
      count="{{pagination.itemsPerPage}}"
    />
    {{#results.items}}
    <item>
      <title>{{title}}</title>
      <link>{{absolutePath}}</link>
      {{#snippet}}
        <description>{{>snippet}}...</description>
      {{/snippet}}
      {{#bookTitle}}
        <book>
          <title>{{bookTitle}}</title>
        </book>
      {{/bookTitle}}
      {{#wordCount}}
        <wordCount>{{wordCount}}</wordCount>
      {{/wordCount}}
    </item>
    {{/results.items}}
  </channel>
</rss>
