Changeset 1166


Ignore:
Timestamp:
Jun 11, 2008, 4:23:07 PM (14 years ago)
Author:
Earle Martin
Message:

Link dc:contributor items in RDF output to actual URIs that exist in our system; closes #250.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r1164 r1166  
    33More detailed changelogs can be found at
    44<http://dev.openguides.org/log/trunk>.
     5
     60.63
     7        Link dc:contributor items in RDF output to actual URIs that exist in
     8          our system.
    59
    6100.62    8 June 2008
  • trunk/lib/OpenGuides/RDF.pm

    r1163 r1166  
    183183                    INCLUDE_PATH => "$custom_template_path:$template_path" } );
    184184
     185    $tt_vars{full_cgi_url} = $config->script_url . $config->script_name;
     186
    185187    my $rdf;
    186188    $tt->process( "node_rdf.tt", \%tt_vars, \$rdf );
  • trunk/t/21_rdf.t

    r1081 r1166  
    9999    "sets the title correctly" );
    100100
    101 like( $rdfxml, qr|<foaf:Person rdf:ID="Kake">|,
     101like( $rdfxml, qr|id=Kake;format=rdf#obj"|,
    102102    "last username to edit used as contributor" );
    103 like( $rdfxml, qr|<foaf:Person rdf:ID="Anonymous">|,
     103like( $rdfxml, qr|id=Anonymous;format=rdf#obj"|,
    104104    "... as well as previous usernames" );
    105105
  • trunk/templates/node_rdf.tt

    r1133 r1166  
    2121
    2222    [% FOREACH contributor = contributors.values %]
    23     <dc:contributor>
    24       <foaf:Person rdf:ID="[% contributor.user_id %]">
    25         <foaf:nick>[% contributor.username %]</foaf:nick>
    26       </foaf:Person>
    27     </dc:contributor>
     23    <dc:contributor rdf:resource="[% full_cgi_url %]?id=[% contributor.user_id %];format=rdf#obj" foaf:name="[% contributor.user_id %]" />
    2824    [% END %]
    2925
Note: See TracChangeset for help on using the changeset viewer.