source: trunk/templates/rdf_index.tt @ 644

Last change on this file since 644 was 632, checked in by Earle Martin, 17 years ago

add geo:lat, geo:lon and rss link to items

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1[%- USE CGI -%]
2<?xml version="1.0"?>
3<rdf:RDF
4  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
5  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
6  xmlns:dc="http://purl.org/dc/1.0/"
7  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
8  xmlns:foaf="http://xmlns.com/foaf/0.1/"
9  xmlns="http://purl.org/rss/1.0/"
10>
11
12<rdf:Description rdf:about="">
13[% IF criterion %]
14  <dc:title>[% CGI.escapeHTML(criterion.name) %]</dc:title>
15[% ELSE %]
16  <dc:title>RDF index</dc:title>
17[% END %]
18  <foaf:topic rdf:resource="#listing" />
19</rdf:Description>
20
21<!-- [% nodes.size %] nodes found. -->
22
23<rdf:Bag rdf:ID="listing">
24[%- FOREACH node = nodes %]
25[% metadata = node.node_data.metadata %]
26
27  [%- IF metadata.os_x.list.first || metadata.os_y.list.first || metadata.latitude.list.first || metadata.longitude.list.first ||
28        metadata.locale.list.first || metadata.address.list.first || metadata.postcode.list.first || metadata.map_link.list.first -%]
29    [% nodeType = 'geo:SpatialThing' %]
30  [%- ELSE -%]
31    [% nodeType = 'rdf:Description' %]
32  [%- END -%]
33
34  <rdf:li>
35    <[% nodeType %] rdf:about="[% full_cgi_url %]?id=[% node.param %];format=rdf#obj">
36      <rdfs:seeAlso rdf:resource="[% full_cgi_url %]?id=[% node.param %];format=rdf" />
37      <dc:title>[% node.name %]</dc:title>
38      [% IF metadata.latitude.list.first AND metadata.longitude.list.first %]
39      <geo:lat>[% metadata.latitude.list.first %]</geo:lat>
40      <geo:long>[% metadata.longitude.list.first %]</geo:long>
41      [% END %]
42      <link>[% full_cgi_url %]?[% node.param %]</link>
43    </[% nodeType %]>
44  </rdf:li>
45[% END %]
46</rdf:Bag>
47
48</rdf:RDF>
Note: See TracBrowser for help on using the repository browser.