source: trunk/templates/node_rdf.tt

Last change on this file was 1232, checked in by Dominic Hargreaves, 13 years ago

Fix RDF encoding (fixes #260); thanks Inigo

File size: 3.6 KB
Line 
1<?xml version="1.0" [%- IF config.http_charset %]encoding="[% config.http_charset %]"[%- END %]?>
2<rdf:RDF
3  xmlns:dc      = "http://purl.org/dc/elements/1.1/"
4  xmlns:dcterms = "http://purl.org/dc/terms/"
5  xmlns:foaf    = "http://xmlns.com/foaf/0.1/"
6  xmlns:geo     = "http://www.w3.org/2003/01/geo/wgs84_pos#"
7  xmlns:map     = "http://downlode.org/Code/RDF/Map/"
8  xmlns:os      = "http://downlode.org/Code/RDF/Ordnance_Survey/schema/1#"
9  xmlns:owl     = "http://www.w3.org/2002/07/owl#"
10  xmlns:rdf     = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
11  xmlns:rdfs    = "http://www.w3.org/2000/01/rdf-schema#"
12  xmlns:wail    = "http://www.eyrie.org/~zednenem/2002/wail/"
13  xmlns:wiki    = "http://purl.org/rss/1.0/modules/wiki/"
14  xmlns:contact = "http://www.w3.org/2000/10/swap/pim/contact#"
15>
16
17<rdf:Description rdf:about="">
18  <dc:title>[% site_name %]: [% node_name %]</dc:title>
19  <dc:date>[% timestamp %]</dc:date>
20  <dcterms:modified>[% timestamp %]</dcterms:modified>
21
22  [%- FOREACH contributor = contributors.values %]
23  <dc:contributor rdf:resource="[% full_cgi_url %]?id=[% contributor.user_id %];format=rdf#obj" />
24  [%- END %]
25
26  <dc:source rdf:resource="[% node_uri %]" />
27  <wiki:version>[% version %]</wiki:version>
28  <foaf:topic rdf:resource="#obj" />
29
30  [%- IF redirect %]
31    <owl:sameAs rdf:resource="[% redirect %]" />
32  [%- END %]
33
34</rdf:Description>
35
36<[% obj_type %] rdf:ID="obj">
37
38  <dc:title>[% node_name %]</dc:title>
39 
40  [%- IF summary %]
41  <dc:description>[% summary %]</dc:description>
42  [%- END %]
43
44  [%- IF node_image %]
45  <foaf:depiction rdf:resource="[% node_image %]" />
46  [%- END %]
47
48  [%- IF categories %]
49  <!-- categories -->
50
51  [%- FOREACH category = categories %]
52  <dc:subject>[% category.name %]</dc:subject>
53  [%- END %]
54  [%- END %]
55
56  [%- IF is_geospatial %]
57  <!-- address and geospatial data -->
58
59  <wail:location>
60    <wail:Address rdf:nodeID="address">
61  [%- IF address %]
62      <wail:streetName>[% address %]</wail:streetName>
63  [%- END %]
64  [%- IF postcode %]
65      <wail:postalCode>[% postcode %]</wail:postalCode>
66  [%- END %]
67  [%- IF city %]
68      <wail:locatedIn>
69        <wail:City rdf:nodeID="city">
70          <wail:name>[% city %]</wail:name>
71          [%- IF country %]
72            <wail:locatedIn>
73              <wail:Country rdf:nodeID="country">
74                <wail:name>[% country %]</wail:name>
75              </wail:Country>
76            </wail:locatedIn>
77          [%- END %]
78        </wail:City>
79      </wail:locatedIn>
80  [%- END %]
81    </wail:Address>
82  </wail:location>
83
84  [%- IF map_link %]
85  <map:shownBy>
86    <map:Map rdf:about="[% map_link %]" />
87  </map:shownBy>
88  [%- END %]
89
90  [%- FOREACH locale = locales %]
91  <foaf:based_near>
92    <wail:Neighborhood rdf:nodeID="[% locale.id %]">
93      <wail:name>[% locale.name %]</wail:name>
94      [%- IF city %]
95        <wail:locatedIn rdf:nodeID="city" />
96      [%- END %]
97    </wail:Neighborhood>
98  </foaf:based_near>
99  [%- END %]
100
101  [%- IF wgs84_lat AND wgs84_long %]
102  <geo:lat>[% wgs84_lat %]</geo:lat>
103  <geo:long>[% wgs84_long %]</geo:long>
104  [%- END %]
105
106  [%- IF os_x AND os_y %]
107  <os:x>[% os_x %]</os:x>
108  <os:y>[% os_y %]</os:y>
109  [%- END %]
110
111  [%- END %]
112
113  [%- IF phone OR fax OR website OR opening_hours_text %]
114  <!-- contact information -->
115  [%- IF phone %]
116  <contact:phone>[% phone %]</contact:phone>
117  [%- END %]
118  [%- IF fax %]
119  <contact:fax>[% fax %]</contact:fax>
120  [%- END %]
121  [%- IF website %]
122  <foaf:homepage rdf:resource="[% website %]" />
123  [%- END %]
124  [%- IF opening_hours_text %]
125  <dc:available>[% opening_hours_text %]</dc:available>
126  [%- END %]
127  [%- END %]
128
129</[% obj_type %]>
130
131</rdf:RDF>
Note: See TracBrowser for help on using the repository browser.