Schema.org: improve MusicGroup vs. Person parsing
authorDan Scott <dscott@laurentian.ca>
Sun, 25 Aug 2013 04:39:46 +0000 (00:39 -0400)
committerBen Shum <bshum@biblio.org>
Mon, 26 Aug 2013 16:16:08 +0000 (12:16 -0400)
Take a stricter approach to defining MusicGroups instead of Persons for
the main authors of MusicAlbums. Music groups are generally catalogued
as a 110 or 710 tag, and this avoids defining birthDates and deathDates
for groups (which, however valid that might be in the real world, is not
valid for schema.org).

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 d2adff0..005b48a 100644 (file)
@@ -67,7 +67,7 @@ BLOCK build_author_links;
         
         # schema.org changes
         IF type == 'author';
-            IF args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
+            IF tag.substr(1,2) == '10' && args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
                 iprop = ' itemtype="http://schema.org/MusicGroup" itemscope itemprop="byArtist"';
             ELSIF tag.substr(1,2) == '00';
                 iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="author"';