source: trunk/templates/node_rdf.tt @ 1034

Last change on this file since 1034 was 1016, checked in by kake, 15 years ago

Move node RDF generation from inline strings in OpenGuides::RDF to its own template; also make sure all weird characters are encoded.

File size: 2.8 KB
Line 
1<?xml version="1.0"?>
2<rdf:RDF
3  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4  xmlns:dc="http://purl.org/dc/elements/1.1/"
5  xmlns:dcterms="http://purl.org/dc/terms/"
6  xmlns:foaf="http://xmlns.com/foaf/0.1/"
7  xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
8  xmlns:chefmoz="http://chefmoz.org/rdf/elements/1.0/"
9  xmlns:wn="http://xmlns.com/wordnet/1.6/"
10  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
11  xmlns:os="http://downlode.org/rdf/os/0.1/"
12  xmlns:owl="http://www.w3.org/2002/07/owl#"
13  xmlns="http://www.w3.org/2000/10/swap/pim/contact#"
14>
15
16  <rdf:Description rdf:about="">
17    <dc:title>[% site_name %]: [% node_name %]</dc:title>
18    <dc:date>[% timestamp %]</dc:date>
19    <dcterms:modified>[% timestamp %]</dcterms:modified>
20
21    <dc:contributor>
22      <foaf:Person rdf:ID="[% user_id %]">
23        <foaf:nick>[% username %]</foaf:nick>
24      </foaf:Person>
25    </dc:contributor>
26
27    <dc:source rdf:resource="[% node_uri %]" />
28    <wiki:version>[% version %]</wiki:version>
29    <foaf:topic rdf:resource="#obj" />
30  </rdf:Description>
31
32  <[% obj_type %] rdf:ID="obj" dc:title="[% node_name %]">
33
34    [% IF summary %]
35      <dc:description>[% summary %]</dc:description>
36    [% END %]
37
38    [% IF categories %]
39      <!-- categories -->
40
41      [% FOREACH category = categories %]
42        <dc:subject>[% category.name %]</dc:subject>
43      [% END %]
44    [% END %]
45
46    [% IF is_geospatial %]
47      <!-- address and geospatial data -->
48
49      [% IF address %]
50        <address>[% address %]</address>
51      [% END %]
52      [% IF city %]
53        <city>[% city %]</city>
54      [% END %]
55      [% IF postcode %]
56        <postalCode>[% postcode %]</postalCode>
57      [% END %]
58      [% IF country %]
59        <country>[% country %]</country>
60      [% END %]
61
62      [% FOREACH locale = locales %]
63        <foaf:based_near>
64          <wn:Neighborhood rdf:ID="[% locale.id %]">
65            <dc:title>[% locale.name %]</dc:title>
66          </wn:Neighborhood>
67        </foaf:based_near>
68      [% END %]
69
70      [% IF latitude AND longitude %]
71        <geo:lat>[% latitude %]</geo:lat>
72        <geo:long>[% longitude %]</geo:long>
73      [% END %]
74
75      [% IF os_x AND os_y %]
76        <os:x>[% os_x %]</os:x>
77        <os:y>[% os_y %]</os:y>
78      [% END %]
79
80    [% END %]
81
82    [% IF phone OR fax OR website OR opening_hours_text %]
83      <!-- contact information -->
84      [% IF phone %]
85        <phone>[% phone %]</phone>
86      [% END %]
87      [% IF fax %]
88        <fax>[% fax %]</fax>
89      [% END %]
90      [% IF website %]
91        <foaf:homepage rdf:resource="[% website %]" />
92      [% END %]
93      [% IF opening_hours_text %]
94        <chefmoz:Hours>[% opening_hours_text %]</chefmoz:Hours>
95      [% END %]
96    [% END %]
97
98    [% IF redirect %]
99      <owl:sameAs rdf:resource="[% redirect %]" />
100    [% END %]
101
102  </[% obj_type %]>
103</rdf:RDF>
Note: See TracBrowser for help on using the repository browser.