OPAC embed and escape
In this section, we define standard behaviors and functions for embedding external information, and links to external applications, from within an OPAC application. We also discuss issues involved with going the other way: having external applications link into or embedding OPAC displays.
Rationale and general issues
The ILS today includes a public catalog interface (the OPAC) that will continue to be provided and used in many libraries. Users of the OPAC may want to access the additional information and services provided by external applications, either jumping out from the OPAC to these applications, or by embedding application content into OPAC displays, to provide seamless discovery services.
In addition, the OPAC may continue to be the easiest place to provide certain kinds of library services (such as patron requests). In such cases, one might need to be able to carry a user context from an external application into the OPAC, and later back to the external application.
Sample use cases
Some possible use cases include
- Adding links to external resources (e.g. "See comments on this book; buy on Amazon; try this search again on WorldCat")
- Embedding additional information on items (e.g. tags, LibraryThing-like services)
- Embedding alternate formats for reuse (e.g. formatted citations, links to download cites into citation manager, etc.)
- Linking back to an OPAC's book information page or search result from an external application
Abstract Behaviors and Functions
Practically speaking, the ability to embed external information and links into an OPAC application may be better understood as a behavior of an ILS OPAC than a function, and the recommended bindings reflect this understanding. (That is to say, they give a general mechanism for embedding content and links into a user interface, rather than specifying a particular output for a particular input as functions do.) From an abstract point of view, however, it can be useful to consider two kinds of functions that model these behaviors and take different kinds of parameters:
- An outgoing-oriented function that models how external content or links are embedded into a page is essentially a behavior that takes output configuration parameters, which control the final form of output. This could consist of the content to be embedded, for instance, or a second function that transforms the default content into the desired content. Essentially, this kind of function points out of the ILS into an external application.
- An incoming-oriented function that models how ILS applications can be linked to or embedded from external applications is essentially a behavior that takes request parameters, which specify the ILS function or display that is being linked to or embedded. Essentially, this kind of function points into the ILS from an external application.
It is theoretically possible to specify a detailed model of a function that includes both kinds of parameters. Such a model might be interesting from the standpoint of computer science, but is probably not worth detailing in a document intended as a practical interoperability recommendation.
The minimum OPAC supplement profile requires that either OutputRewritablePage or OutputIntermediateFormat be implemented. The robust profile calls for both behaviors.
OutputRewritablePage behavior
Summary: Outputs an OPAC display page in a form that includes embedded links or other content based on the display and on local customization.
Returns:
- A display with appropriate content embedded.
Associated outbound-oriented functions and their request parameters
- OutputRewritableBibliographicPage
- Parameter: bibid (type string; optional)
- Returns: a bibliographic display that includes the bibid in an addressible location.
This function is given as an example; others may be defined as well in later versions of this
recommendation.
Exceptional conditions:
- NotSupported: The type of page requested is not rewritable.
Side effects: None
Rationale: Outputting a page that can be rewritten allows a library to seamlessly add
new services to its displays by embedding or linking them into the OPAC's own display pages.
Possible Bindings:
Below are general notes on possible bindings. A particular ILS system would need to specify a detailed binding describing exactly how an output page could be rewritten.
- HTML/Javascript binding (for outgoing behavior): If an ILS writes out HTML with the option of including library-added header content, then the library can load and execute its own Javascript code to modify the page to include new links and content. The components of the page need to be addressible (which can be done in various ways, including unique and predictable identifiers on each component of the page), as does context required to generate links or content. For example, the OutputRewritableBibliographicPage would need to include, at the very least, the bibid in a well-defined location that would be available for the Javascript to use.
- OpenURL binding (for incoming): OpenURLs may be a useful way of requesting a particular bibliographic, search, or other OPAC display. Details would need to be worked out.
OutputIntermediateFormat behavior
Summary: Outputs an OPAC display page in a semantically-oriented form that can be arbitrarily transformed to user output.
Returns:
- Information in an appropriate structured data format.
Associated outbound-oriented functions and their request parameters
- OutputIntermediateBibliographicPage
- Parameter: bibid (type string; optional)
- Returns: A data structure that includes complete bibliographic information sufficient for translation into a user output page.
This function is given as an example; others may be defined as well in later versions of this
recommendation.
Exceptional conditions:
- NotSupported: The type of page requested is not available.
Side effects: None
Rationale: Outputting a semantic format allows arbitrary rewriting to many different formats, including HTML for web browsers, web pages customized for mobile phones, RSS feeds, components that can be embedded in larger portal viws, or XML elements for Ajax-driven applications.
Possible Bindings:
Below are general notes on possible bindings. A particular ILS would need to specify a detailed binding describing exactly how an output page could be rewritten.
- XML/XSLT binding: (for outgoing behavior) Supporting output of OPAC pages in XML, using a server configuration (such as Cocoon) that allows the inclusion of custom XSLT stylesheets to transform the XML to HTML, is a common way of implementing this sort of behavior in a variety of systems. A fully specified binding would need to give a complete specification of the XML schema used for output.
- OpenURL binding (for incoming): OpenURLs may be a useful way of requesting a particular bibliographic, search, or other OPAC display. Details would need to be worked out.