VI · 42

OpenURL & COinS

COinS embeds an OpenURL ContextObject in an HTML page using <span class="Z3988">. Wikipedia's citation templates emit one for every formatted 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 is not itself a Z39.88-2004 transport: it embeds a KEV ContextObject in a page, and the client software that reads it then sends that ContextObject to the user's resolver as an ordinary Inline OpenURL (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 &amp; 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; it is a community convention, published around 2005, that reuses the KEV ContextObject format.
  • 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 convention predates schema.org and JSON-LD. Wikipedia's citation templates still emit COinS spans, which is why searches for "Z3988" lead to Wikipedia.

Sources