One way, perhaps, would be to have different search templates for each search type (though I don't know if it is valid to have multiple templates of the same Url type). The template parameter would be adopted as a standard convention by OPDS catalogs.For example:General search: <Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?query={searchTerms}"/>Title search: <Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?title={atom:title}"/>Author search: <Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?author={atom:author}"/>Contributor (e.g., narrator) search: <Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?contributor={atom:contributor}"/>In context:<?xml version="1.0" encoding="UTF-8"?><OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"><ShortName>Feedbooks</ShortName><Description>Search for e-books on Feedbooks</Description><InputEncoding>UTF-8</InputEncoding><OutputEncoding>UTF-8</OutputEncoding><Image type="image/x-icon" width="16" height="16">http://www.feedbooks.com/favicon.ico</Image><Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?query={searchTerms}"/><Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?title={atom:title}"/><Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?author={atom:author}"/><Url type="application/atom+xml" template="http://www.feedbooks.com/search.atom?contributor={atom:contributor}"/><Query role="example" searchTerms="robot" /></OpenSearchDescription>Can anyone confirm if this would be a valid OpenDescription document?
Also, is this something that catalog vendors would be willing to support?
Would a @rel attribute help clarify these Url elements at all?
Keith
I don't think that a rel value is actually used at all in Open Search for such elements.
Based on the third example here: http://www.opensearch.org/Specifications/OpenSearch/1.1#Examples_2
It seems that a single URL could contain all the optional parameters too.
Rel attribute strings can contain a space-delimited list of one or more semantically meaningful rel value tokens. An empty rel attribute value should be treated by the client as if the rel attribute was not present at all.
If a client does not recognize the semantic meaning of any rel value token, then the containing Url should be ignored by the client.
Rel value tokens may be either fully qualified tokens (e.g., "http://example.com/rel#foo") or unqualified tokens (e.g., "results").
All fully qualified tokens must be a valid URL. The semantic meaning of any fully qualified token is outside the scope of this specification, but convention dictates that the URL should resolve to a resource that describes the relationship.
All unqualified tokens must be a lowercase alphanumeric string of the form [a-z][a-z\-]+. Only those tokens listed below have meaning defined in this specification.
Rel values:
"results" (default)
"suggestions"
"self"
"collection"
--
You received this message because you are subscribed to the Google
Groups "Open Publication Distribution System" group.
To post to this group, send email to ope...@googlegroups.com
To unsubscribe from this group, send email to
openpub+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/openpub?hl=en
--
I agree, the rel value is unnecessary. Though I suppose it would allow us to identify particular search templates, so clients aren't surprised by complex templates like you describe.
"An OPDS Catalog MAY also provide more advanced possibilities for its search endpoint, using one or more fully qualified parameters from the Atom namespace such as:"
<Url type="application/atom+xml;profile=opds-catalog"
xmlns:atom="http://www.w3.org/2005/Atom"
template="http://example.com/search?q={searchTerms}&author={atom:author}&contributor={atom:contributor}&title={atom:title}" />
--