This is an old revision of the document!


Requirements

OpenSearch support requires Zotero 2.1b6 or later.

Creating OpenSearch Descriptions

Zotero uses OpenSearch 1.1 and OpenURL with some extensions to allow easy specification of locate engines. For a simple OpenURL endpoint, one can use something like:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>CrossRef</ShortName>
<Description>CrossRef Search Engine</Description>
<Image width="16" height="16" type="image/x-icon">http://crossref.org/favicon.ico</Image>
<Url type="text/html" method="GET"
	xmlns:z="http://www.zotero.org/namespaces/openSearch#" 
	template="http://crossref.org/openurl?{z:openURL}"/>
</OpenSearchDescription>

For a more complicated service:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Google Scholar</ShortName>
<Description>Google Scholar Search Engine</Description>
<Image width="16" height="16" type="image/x-icon">http://scholar.google.com/favicon.ico</Image>
<Url type="text/html" method="GET"
	xmlns:rft="info:ofi/fmt:kev:mtx:journal" 
	xmlns:z="http://www.zotero.org/namespaces/openSearch#" 
	template="http://scholar.google.com/scholar?as_q=&amp;as_epq={z:title}&amp;as_occt=title&amp;as_sauthors={rft:aufirst?}+{rft:aulast?}&amp;as_ylo={z:year?}&amp;as_yhi={z:year?}&amp;as_sdt=1.&amp;as_sdtp=on&amp;as_sdtf=&amp;as_sdts=22&amp;"/>
</OpenSearchDescription>

For more details, see the OpenURL documentation and the OpenSearch documentation.

Advertising Engines

You can advertise locate engines by adding

<link rel="search" type="application/x-openurl-opensearchdescription+xml" title="Engine Name" href="http://www.example.com/myengine.xml" />

to the <head> section of any webpage (with the title and href attribute contents modified). The user can then install the locate engine under the locate menu when visiting the webpage.

dev/creating_locate_engines_using_opensearch.1297226915.txt.gz ยท Last modified: 2011/02/08 23:48 by simon