Author: earle Date: 2008-06-11 16:23:07 +0100 (Wed, 11 Jun 2008) New Revision: 1166
Modified: trunk/Changes trunk/lib/OpenGuides/RDF.pm trunk/t/21_rdf.t trunk/templates/node_rdf.tt Log: Link dc:contributor items in RDF output to actual URIs that exist in our system; closes #250.
Modified: trunk/Changes =================================================================== --- trunk/Changes 2008-06-07 23:37:44 UTC (rev 1165) +++ trunk/Changes 2008-06-11 15:23:07 UTC (rev 1166) @@ -3,6 +3,10 @@ More detailed changelogs can be found at http://dev.openguides.org/log/trunk.
+0.63 + Link dc:contributor items in RDF output to actual URIs that exist in + our system. + 0.62 8 June 2008 Allow wiki page links (simple: [[Foo]], title: [[Foo|bar]]) in change summaries.
Modified: trunk/lib/OpenGuides/RDF.pm =================================================================== --- trunk/lib/OpenGuides/RDF.pm 2008-06-07 23:37:44 UTC (rev 1165) +++ trunk/lib/OpenGuides/RDF.pm 2008-06-11 15:23:07 UTC (rev 1166) @@ -182,6 +182,8 @@ my $tt = Template->new( { INCLUDE_PATH => "$custom_template_path:$template_path" } );
+ $tt_vars{full_cgi_url} = $config->script_url . $config->script_name; + my $rdf; $tt->process( "node_rdf.tt", %tt_vars, $rdf ); $rdf ||= "ERROR: " . $tt->error;
Modified: trunk/t/21_rdf.t =================================================================== --- trunk/t/21_rdf.t 2008-06-07 23:37:44 UTC (rev 1165) +++ trunk/t/21_rdf.t 2008-06-11 15:23:07 UTC (rev 1166) @@ -98,9 +98,9 @@ qr|dc:titleWiki::Toolkit Test Site: Calthorpe Arms</dc:title>|, "sets the title correctly" );
-like( $rdfxml, qr|<foaf:Person rdf:ID="Kake">|, +like( $rdfxml, qr|id=Kake;format=rdf#obj"|, "last username to edit used as contributor" ); -like( $rdfxml, qr|<foaf:Person rdf:ID="Anonymous">|, +like( $rdfxml, qr|id=Anonymous;format=rdf#obj"|, "... as well as previous usernames" );
like( $rdfxml, qr|wiki:version2</wiki:version>|, "version picked up" );
Modified: trunk/templates/node_rdf.tt =================================================================== --- trunk/templates/node_rdf.tt 2008-06-07 23:37:44 UTC (rev 1165) +++ trunk/templates/node_rdf.tt 2008-06-11 15:23:07 UTC (rev 1166) @@ -20,11 +20,7 @@ dcterms:modified[% timestamp %]</dcterms:modified>
[% FOREACH contributor = contributors.values %] - dc:contributor - <foaf:Person rdf:ID="[% contributor.user_id %]"> - foaf:nick[% contributor.username %]</foaf:nick> - </foaf:Person> - </dc:contributor> + <dc:contributor rdf:resource="[% full_cgi_url %]?id=[% contributor.user_id %];format=rdf#obj" foaf:name="[% contributor.user_id %]" /> [% END %]
<dc:source rdf:resource="[% node_uri %]" />
openguides-commits@lists.openguides.org