RDFa Lite is more easily extensible and as accepted as microdata.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
stop_parms = ['expand','cnoffset','copy_offset','copy_limit'];
ctx.record_attrs = attrs; # capture for JS
%]
-<div id='canvas_main' class='canvas' itemscope itemtype='[% args.schema.itemtype %]'>
- <link itemprop="additionalType" href="http://schema.org/Product" />
+<div id='canvas_main' class='canvas' vocab="http://schema.org" typeof='[% args.schema.itemtype %] Product'>
[%- INCLUDE "opac/parts/record/navigation.tt2" %]
[%- IF ctx.bib_is_dead %]
<div id='rdetail_deleted_exp'>
ou_name = cp_org_unit.name;
displayed_ous.$ou_name = 1;
%]
- <li itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer">
- <meta itemprop="offerCount" content="[% ou_avail %]">
- <meta itemprop="seller/library" content="[% ou_name | html %]">
+ <li property="offers" typeof="AggregateOffer">
+ <meta property="offerCount" content="[% ou_avail %]">
+ <meta property="seller/library" content="[% ou_name | html %]">
[% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
[%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
IF ou_avail > 0 && this_depth != ctx.copy_depth %]
UNLESS depth < 0 || displayed_ous.exists(ou_name);
%]
[%- IF attrs.plib_copy_counts.$depth.count > 0; %]
- <li class="preferred" itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer">
- <meta itemprop="offerCount" content="[% ou_avail %]">
- <meta itemprop="seller" content="[% ou_name | html %]">
+ <li class="preferred" property="offers" typeof="AggregateOffer">
+ <meta property="offerCount" content="[% ou_avail %]">
+ <meta property="seller" content="[% ou_name | html %]">
[%-
l('[_1] of [quant,_2,copy,copies] available at [_3].',
attrs.plib_copy_counts.$depth.available,
<tr><td header='copy_header_shelfloc'>
[%- bib_lib_name = ctx.get_aou(bib.target_copy.circ_lib).name | html;
l("[_1] (foreign item)", bib_lib_name); -%]
- <ul><li itemprop="isRelatedTo" itemscope itemtype="http://schema.org/Product">
+ <ul><li property="isRelatedTo" typeof="Product">
<span class="bib_peer_type">[% bib.peer_type.name | html %]</span>:
- <a itemprop="url" href="[% mkurl(ctx.opac_root _ '/record/' _ bib.target_copy.call_number.record) %]">
- <span class="bib_peer_title" itemprop="name">[% peer.title | html %]</span> /
+ <a property="url" href="[% mkurl(ctx.opac_root _ '/record/' _ bib.target_copy.call_number.record) %]">
+ <span class="bib_peer_title" property="name">[% peer.title | html %]</span> /
<span class="bib_peer_author">[% peer.author | html %]</span>
</a>
</li></ul>
callnum = callnum _ " " _ callnum_suffix;
END;
-%]
- <tr itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <tr property="offers" typeof="Offer">
[%- IF serial_holdings %]<td header='copy_header_holding_label' class='rdetail-issue-issue'>
[%- copy_info.holding_label | html; -%]
</td>
- [%- ELSE %]<td header='copy_header_library' itemprop="seller/library">
+ [%- ELSE %]<td header='copy_header_library' property="seller/library">
[%-
org_name = ctx.get_aou(copy_info.circ_lib).name;
lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
IF lib_url; '</a>'; END;
-%]
</td>[% END %]
- <td header='copy_header_callnumber'><span itemprop="sku/callNumber">[% callnum | html %]</span> [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
+ <td header='copy_header_callnumber'><span property="sku/callNumber">[% callnum | html %]</span> [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
[%- IF has_parts == 'true' %]
<td header='copy_header_part'>[% copy_info.part_label | html %]</td>
[%- END %]
- <td header='copy_header_barcode' itemprop="serialNumber/barcode">
+ <td header='copy_header_barcode' property="serialNumber/barcode">
[%- IF ctx.is_staff -%]
<a href="javascript:void(0)" onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})">[% copy_info.barcode | html %]</a>
[%- ELSE -%][% copy_info.barcode | html %]
[%- END -%]
[%- IF attrs.gtin13;
- '<meta itemprop="gtin13/isbn13" content="' _ attrs.gtin13 _ '" />';
+ '<meta property="gtin13/isbn13" content="' _ attrs.gtin13 _ '" />';
END; -%]
</td>
- <td header='copy_header_shelfloc' itemprop="availableAtOrFrom/shelvingLocation">[% copy_info.copy_location | html %]</td>
+ <td header='copy_header_shelfloc' property="availableAtOrFrom/shelvingLocation">[% copy_info.copy_location | html %]</td>
[%- IF ctx.is_staff %]
<td header='copy_header_age_hold'>
[% copy_info.age_protect ?
<td header='copy_header_status'>[%-
# Hard-coded to match defaults in config.copy_status
IF (copy_info.status_code == 0 OR copy_info.status_code == 7);
- '<link itemprop="availability" href="http://schema.org/InStock" />';
+ '<link property="availability" href="http://schema.org/InStock" />';
ELSIF copy_info.status_code == 1;
- '<link itemprop="availability" href="http://schema.org/OutOfStock" />';
+ '<link property="availability" href="http://schema.org/OutOfStock" />';
ELSIF copy_info.status_code == 9;
- '<link itemprop="availability" href="http://schema.org/PreOrder" />';
+ '<link property="availability" href="http://schema.org/PreOrder" />';
ELSIF copy_info.status_code == 12;
- '<link itemprop="availability" href="http://schema.org/InStoreOnly" />';
+ '<link property="availability" href="http://schema.org/InStoreOnly" />';
END;
copy_info.copy_status | html;
-%]</td>
attrs = {marc_xml => bib};
PROCESS get_marc_attrs args=attrs %]
[%- IF attrs.bibid != ctx.bre_id; %]
- <li itemprop="isRelatedTo/boundWith" itemscope itemtype="http://schema.org/Product">
- <a itemprop="url" href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]">
- <span class="bib_peer_title" itemprop="name">[% attrs.title | html %]</span>
+ <li property="isRelatedTo/boundWith" typeof="Product">
+ <a property="url" href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]">
+ <span class="bib_peer_title" property="name">[% attrs.title | html %]</span>
/ <span class="bib_peer_author">[% attrs.author | html %]</span>
</a>
</li>
<img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
</div>
[%- END %]
- <h1 id='rdetail_title' itemprop="name">[% attrs.title_extended | html %]</h1>
+ <h1 id='rdetail_title' property="name">[% attrs.title_extended | html %]</h1>
[%-
FOR link880 IN attrs.graphic_titles;
FOR alt IN link880.graphic;
[%- IF num_uris > 1 %]<ul>[% END %]
[%- FOR uri IN merged_uris %]
[%- IF num_uris == 1 -%]
- <p class="rdetail_uri" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <p class="rdetail_uri" property="offers" vocab="http://schema.org" typeof="Offer">
[%- ELSE -%]
- <li class="rdetail_uri" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <li class="rdetail_uri" property="offers" vocab="http://schema.org" typeof="Offer">
[%- END -%]
<a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
- <link itemprop="availability" href="http://schema.org/OnlineOnly" />
- [%- IF attrs.gtin13; '<meta itemprop="gtin13" content="' _ attrs.gtin13 _ '" />'; END; %]
+ <link property="availability" href="http://schema.org/OnlineOnly" />
+ [%- IF attrs.gtin13; '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />'; END; %]
[%- IF num_uris == 1 %]</p>[% ELSE %]</li>[% END %]
[%- END %]
[%- IF num_uris > 1 %]</ul>[% END %]
[%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
<li class='rdetail_isbns'>
<strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
- <span class='rdetail_value' itemprop='isbn'>[% isbn | html %]</span>
+ <span class='rdetail_value' property='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' itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
+ <span class='rdetail_value' property="publisher" typeof="Organization">
[%- IF attrs.pubplace; %]
- <span itemprop="location">[% attrs.pubplace | html; %]</span>
+ <span property="location">[% attrs.pubplace | html; %]</span>
[%- END; %]
- <span itemprop="name">[% attrs.publisher | html; %]</span>
+ <span property="name">[% attrs.publisher | html; %]</span>
</span>
[%- IF attrs.pubdate; %]
- <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
+ <span property="datePublished">[% attrs.pubdate | html; %]</span>
[%- END; %]
[%-
IF attrs.graphic_pubinfos.size > 0;