VI · 41
OpenURL & COinS
COinS embeds an OpenURL ContextObject inside an HTML page using . Wikipedia uses it on every citation.
COinS — Context Objects in Spans — is a microformat for embedding OpenURL ContextObjects inside HTML pages. A browser extension or client-side script reads the page, finds COinS spans, and offers the reader a resolution link through their institutional resolver. COinS uses the Inline transport of Z39.88-2004 (see Transports).
Syntax
A COinS span is an empty <span> element with class Z3988 whose title attribute carries a KEV-form ContextObject:
<span class="Z3988"
title="ctx_ver=Z39.88-2004&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.atitle=Can+Quantum-Mechanical+Description+of+Physical+Reality+Be+Considered+Complete%3F&rft.jtitle=Physical+Review&rft.aulast=Einstein&rft.date=1935&rft.volume=47&rft.spage=777">
</span>
The body of the span is empty by convention. The title attribute holds the KEV ContextObject exactly as it would appear in a query string, less the leading ? and the base URL. Ampersands inside the attribute are escaped as & per HTML rules.
How it is used
A client-side tool — a browser extension such as one provided by a library, or a JavaScript include on a discovery page — scans the page for elements with class Z3988. For each, it extracts the title, prepends the user's resolver base URL, and inserts a clickable link near the span. The user clicks, the resolver does its work, and the user is directed to an appropriate copy.
Where COinS appears
- Wikipedia. Every Wikipedia citation, generated from a template such as
{{cite journal}}or{{cite book}}, emits a COinS span. Library extensions can therefore add OpenURL links to every reference on an article page. - Reference managers. Zotero, in particular, uses COinS as one of several signals for capturing citations from a web page.
- Institutional repositories and some publisher reference lists embed COinS for the same purpose.
Notes
- COinS is not part of Z39.88-2004 proper; it is a community-developed convention that makes use of the Inline transport defined by the standard.
- The class name
Z3988(no hyphen, no period) is the agreed marker. - COinS uses only the KEV serialization. XML COinS spans are not part of the convention.
- The microformat predates many modern semantic-HTML practices; newer linked-data conventions (microdata, JSON-LD, schema.org) have not displaced it in scholarly contexts.