Why Should I Upgrade?OpenSearch 1.0 was a first attempt at syndicating search results in an open format. OpenSearch 1.1 is a more mature format, including many changes that came about from comments on the first version. It is more powerful, flexible, and extensible. Additionally, more and more software that produces and consumes OpenSearch will make use of the new format. You can see a good listing of these on OpenSearch Readers and OpenSearch Writers. But I don’t want to!This upgrade is actually very simple. Bear in mind that this document explains what is required to upgrade; there are other optional changes that can be made to take advantage of new functionality. XML Namespace
With 1.1, all components of the OpenSearch specification fall under one namespace: Upgrading the DescriptionUrl ElementThis is the most important change. Move the URL from a child text node to the
And here is the new one:
As you can see, there is also a new Example SearchExample searches now use the new unified way of referencing a query. Here is the old method:
And here is the new one:
Format ElementGet rid of the MIME typeOpenSearch Description files should now be served with the Optional Changes
Multiple Upgrading the ResponseOpenSearch 1.1 allows multiple response formats, not just RSS. The only change required for upgrading is the XML namespace, however the new version includes support for suggested searches, among other things. AutodiscoveryAutodiscovery provides a great mechanism for finding OpenSearches for a given website (from HTML pages). It is not a requirement, but strongly recommended. Here is how it might look:
See autodiscovery for complete details. Further ReadingFor complete details about the changes between versions 1.0 and 1.1, please see the changelog. |