Write errors to stderr
[phinde.git] / data / templates / opensearch.htm
1 <?xml version="1.0" encoding="UTF-8"?>
2 <feed xmlns="http://www.w3.org/2005/Atom"
3       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
4   <title>"{{query}}" search results</title>
5   <link rel="self" href="{{fullUrl}}" type="application/atom+xml"/>
6   {% set fullUrls = pager.getFullUrls() %}
7   {% if fullUrls.first %}
8   <link rel="first" href="{{fullUrls.first}}" type="application/atom+xml"/>
9   {% endif %}
10   {% if fullUrls.prev %}
11   <link rel="prev" href="{{fullUrls.prev}}" type="application/atom+xml"/>
12   {% endif %}
13   {% if fullUrls.next %}
14   <link rel="next" href="{{fullUrls.next}}" type="application/atom+xml"/>
15   {% endif %}
16   {% if fullUrls.last %}
17   <link rel="last" href="{{fullUrls.last}}" type="application/atom+xml"/>
18   {% endif %}
19
20   <updated>{{"now"|date("c")}}</updated>
21   <id>{{fullUrl}}</id>
22   <opensearch:totalResults>{{hitcount}}</opensearch:totalResults>
23   <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
24   {% for hit in hits %}
25     {% set doc = hit._source %}
26     <entry>
27      <title>{{doc.title}}</title>
28      <link href="{{doc.url}}"/>
29      <id>{{doc.url}}</id>
30      {% if doc.status.modate %}
31      <updated>{{doc.status.modate|date('c')}}</updated>
32      {% endif %}
33      <content type="text">{{doc.htmlText|striptags}}</content>
34     </entry>
35   {% endfor %}
36 </feed>