Advances in OpenSearch Definitions

Screenshot of adding the OSU Libraries Catalog Search

Earlier this month, Ohio State University Libraries launched the OSUL Labs area. (Congratulations and kudos to Eric Schnell and the others at OSU that have taken this step to “include customers as active participants in the development and/or testing of new products and services.”) Their first release is an OpenSearch definition for the library catalog. It has been ages since I’ve messed with OpenSearch, and I didn’t remember (or didn’t know it was possible) to have the function add the OpenSearch definition right from the OpenSearch menu, as shown in this figure from the OSUL announcement of this feature. (What I remember is the “programatic” way of doing this.) The autodiscovery is done with a special <link> tag in the head of the HTML:

<link rel="search"
  type="application/opensearchdescription+xml"
  href="http://library.osu.edu/opensearch.xml"
  title="Add OSU Libraries Catalog search" />

Google Custom Search’s Planet Code4Lib as an OpenSearch Plugin

Earlier I mentioned creating a Google Custom Search for Planet Code4Lib. The Google-supplied markup puts a form on your web page that leads to Google’s server farm. (Alternatively, you can create a custom URL that points to an HTML page at Google which contains the form.) Well, that’s really neat, but not far enough. How about an OpenSearch plugin suitable for Firefox and MSIE7? Here is the plugin markup:

< ?xml version="1.0" encoding="UTF-8"?>
 <opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
   <shortname>Planet Code4Lib</shortname>
   <description>Search the bloggers of Planet Code4Lib using Google Custom Search.</description>
   <inputencoding>UTF-8</inputencoding>
   <tags>code4lib library</tags>
   <contact>peter@OhioLINK.edu</contact>
   <url type="text/html" template="http://www.google.com/cse?q={searchTerms}&amp;cx=017716194421589436379:zdoxzpetaxk&amp;sa=Search&amp;cof=FORID:0">
      <image height="16" width="16" type="image/png">
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRF////s7OzNDQ0SkpKioqKbGxsoaGhe3t7KSkp6enpWFhYHR0dzMzMl5eX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V+x92WLuP5SvmISnlgQLgTTcui/gTMGLi52oSDKMUzFbagQ/CXDqO4zEjwMMO0AihImJmQWEUYdOlwEhpLpC6a80KX04JlV75fC4Za8LvFu9hELmotva+TyfvK/RO5ZZ1Zkplb00q1b2pyI50lpafc9bW8ATdy2l1+1/rhQUihcZntwAAAABJRU5ErkJggg==</image>
      <adultcontent>false</adultcontent>
      <moz :searchform>http://dltj.org/2006/10/google-custom-search-for-planet-code4lib/
   </moz></url>
</opensearchdescription>

Pretty neat, eh? This link will install the search definition in Firefox and MSIE7.

Is this going too far?


One can’t help but to wonder whether this violates the Google Custom Search Terms of Service. Here is a piece of 1.1 Description of Service.