FOR node IN ctx.marc_xml.findnodes(xpath);
term = '';
qterm = '';
+ iprop = '';
FOR subfield IN node.childNodes;
NEXT UNLESS subfield.nodeName == "subfield";
code = subfield.getAttribute('code');
END;
url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']);
author_type = label | html;
- '<a href="' _ url _ '">' _ term _ '</a> (' _ author_type _ '). ';
+
+ # schema.org changes
+ IF type == 'author';
+ iprop = ' itemprop="accountablePerson"';
+ ELSIF type == 'added';
+ iprop = ' itemprop="contributor"';
+ END;
+ '<a href="' _ url _ '"' _ iprop _ '>' _ term.replace('^\s+', '') _ '</a> (' _ author_type _ '). ';
END;
END;
%]
<div class='rdetail_authors_div'>
[%- FOREACH author IN authors;
NEXT UNLESS author.xpath;
- links = PROCESS build_author_links(xpath=author.xpath, label=author.label);
+ links = PROCESS build_author_links(
+ xpath=author.xpath, label=author.label, type=author.type
+ );
IF links.match('\S') %]
<span class='rdetail-author-div'>[% links %]</span>
[%- END %]
<img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
</div>
[%- END %]
- <h1 id='rdetail_title'>[% attrs.title_extended | html %]</h1>
+ <h1 id='rdetail_title' itemprop="name">[% attrs.title_extended | html %]</h1>
[%- INCLUDE "opac/parts/record/authors.tt2" %]
</div>
</div>
[%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
<li class='rdetail_isbns'>
<strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
- <span class='rdetail_value'>[% isbn | html %]</span>
+ <span class='rdetail_value' itemprop='isbn'>[% isbn | html %]</span>
</li>
[%- END %]
[%- END %]
[%- IF attrs.publisher %]
<li id='rdetail_publisher'>
<strong class='rdetail_label'>[% l("Publisher:") %]</strong>
- <span class='rdetail_value'>[% attrs.publisher | html %] [% IF attrs.pubdate; attrs.pubdate | html; END %]</span>
+ <span class='rdetail_value' itemprop="publisher">[%
+ attrs.publisher | html;
+ %]</span>[% IF attrs.pubdate; %] <span itemprop="datePublished">[%
+ attrs.pubdate | html;
+ END;
+ %]</span>
</li>
[%- END %]
</ul>