Changeset 1714

Show
Ignore:
Timestamp:
01/10/06 04:05:27
Author:
miyagawa
Message:

0.02; OpenSearch? 1.1 support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Kwiki-OpenSearch-Service/trunk/Changes

    r1534 r1714  
    11Revision history for Perl extension Kwiki::OpenSearch::Service 
     2 
     30.02  Mon Jan  9 19:03:44 UTC 2006 
     4        - Upgraded to OpenSearch 1.1 response format. 
     5          No Auto-Discovery support yet, since Kwiki doesn't allow doing 
     6          it easily. 
    27 
    380.01  Thu Mar 31 00:06:47 2005 
  • Kwiki-OpenSearch-Service/trunk/lib/Kwiki/OpenSearch/Service.pm

    r1534 r1714  
    11package Kwiki::OpenSearch::Service; 
    22use strict; 
    3 our $VERSION = 0.01
     3our $VERSION = 0.02
    44 
    55use Kwiki::Plugin '-Base'; 
     
    2020 
    2121sub opensearch_service { 
    22     $self->hub->headers->content_type('application/xml'); 
     22    $self->hub->headers->content_type('application/rss+xml'); 
    2323    $self->template_process( 
    2424        "opensearch_rss.xml", 
     
    2929 
    3030sub opensearch_description { 
    31     $self->hub->headers->content_type('application/xml'); 
     31    $self->hub->headers->content_type('application/opensearch+xml'); 
    3232    $self->template_process("opensearch_description.xml"); 
    3333} 
     
    9191__template/tt2/opensearch_rss.xml__ 
    9292<?xml version="1.0" encoding="UTF-8" ?> 
    93 <rss version="2.0" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"> 
     93<rss version="2.0" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"> 
    9494<channel> 
    9595<title>[% site_title | html %]: [% q | html %]</title> 
     
    110110__template/tt2/opensearch_description.xml__ 
    111111<?xml version="1.0" encoding="UTF-8"?> 
    112 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearchdescription/1.0/"> 
    113   <Url>[% script_name %]?action=opensearch_service&amp;q={searchTerms}</Url> 
    114   <Format>http://a9.com/-/spec/opensearchrss/1.0/</Format> 
     112<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 
     113  <Url type="application/rss+xml" template="[% script_name %]?action=opensearch_service&amp;q={searchTerms}" /> 
    115114  <ShortName>[% site_title | html %]</ShortName> 
    116115  <LongName>[% site_title | html %]</LongName> 
     
    118117  [% IF tags %]<Tags>[% tags %]</Tags>[% END %] 
    119118  [% IF logo_image.match("https?://") %]<Image>[% logo_image %]</Image>[% END %] 
    120   <SampleSearch>[% sample_search %]</SampleSearch
     119  <Query role="example" searchTerms="[% sample_search %]" /
    121120  <Developer>[% developer | html %]</Developer> 
    122121  <Contact>[% contact | html %]</Contact>