LP#1405812: Relate contributors to the id.loc.gov relator vocab
authorDan Scott <dscott@laurentian.ca>
Fri, 26 Dec 2014 16:57:37 +0000 (11:57 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 16 Feb 2015 09:29:05 +0000 (04:29 -0500)
If we have relator codes (subfield 4), then we can specify the
nature of the contribution being played much more accurately
for machines than just schema:contributor by including the
relator code as a second value of the @property.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>

Open-ILS/src/templates/opac/parts/record/authors.tt2

index 51fbe8f..735b3ef 100644 (file)
@@ -105,10 +105,14 @@ BLOCK build_author_links;
             END;
         ELSIF type == 'added';
             IF tag.substr(1,2) == '00';
-                iprop = ' typeof="Person" property="contributor"';
+                iprop = ' typeof="Person" property="contributor';
             ELSE;
-                iprop = ' typeof="Organization" property="contributor"';
+                iprop = ' typeof="Organization" property="contributor';
             END;
+            IF relcode;
+                iprop = iprop _ ' http://id.loc.gov/vocabulary/relators/' _ relcode;
+            END;
+            iprop = iprop _ '"';
         END;
         authtml = ' <span class="rdetail-author-div"' _ iprop _ ' resource="' _ contrib_ref _ '"><a href="' _ url _ '"><span resource="' _ contrib_ref _ '">';
         IF iprop; authtml = authtml _ '<span property="name">'; END;