Adding OPDS http://opds-spec.org/ support to Koha
[koha:mainline.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-opds.tt
1 <?xml version="1.0" encoding="UTF-8"?>
2 <feed xmlns="http://www.w3.org/2005/Atom"
3       xmlns:dc="http://purl.org/dc/terms/"
4       xmlns:opds="http://opds-spec.org/2010/catalog">
5   <id>[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;sort_by=[% sort_by |html %]&amp;format=opds"</id>
6   <link rel="self"    
7         href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;sort_by=[% sort_by |html %]&amp;format=opds"
8         type="application/atom+xml;profile=opds-catalog"/>
9   <title>Results for [% query_desc |html %]</title>
10   <updated>2010-01-10T10:01:11Z</updated>
11   <author>
12     <name>Spec Writer</name>
13     <uri>http://opds-spec.org</uri>
14   </author>
15 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
16   [% IF SEARCH_RESULT.urls.0 %]
17   <entry>
18     <title>[% SEARCH_RESULT.title |html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield |html %][% END %]</title>
19     <id>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]</id>
20     <updated>2010-01-10T10:01:11Z</updated>
21     <author>
22       <name>[% SEARCH_RESULT.author |html %]</name>
23       <uri>[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |html %]</uri>
24     </author>
25     <dc:language>en</dc:language>
26     <dc:issued>[% SEARCH_RESULT.copyrightdate |html %]</dc:issued>
27 [%#    <category scheme="http://www.bisg.org/standards/bisac_subject/index.html"
28               term="FIC020000"
29               label="FICTION / Men's Adventure"/> %]
30     <summary>[% SEARCH_RESULT.notes |html %]</summary>
31 [%#    <link rel="http://opds-spec.org/image"     
32           href="/covers/4561.lrg.png"
33           type="image/png"/> 
34     <link rel="http://opds-spec.org/image/thumbnail" 
35           href="/covers/4561.thmb.gif"
36           type="image/gif"/>
37  
38     <link rel="alternate"
39           href="/opds-catalogs/entries/4571.complete.xml"
40           type="application/atom+xml;type=entry;profile=opds-catalog" 
41           title="Complete Catalog Entry for Bob, Son of Bob"/>
42 %]
43     [% FOREACH url IN SEARCH_RESULT.urls %]
44     <link rel="http://opds-spec.org/acquisition" 
45           href="[% url.MARCURL %]"
46           type="[% url.mimetype %]"/>
47     [% END %]
48   </entry>
49   [% END %]
50 [% END %]
51 </feed>