forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Real-life problem: XPI install
Date Sat, 16 Nov 2002 22:25:51 GMT


Jeff Turner wrote:
> On Sat, Nov 16, 2002 at 07:33:10PM +0100, Nicola Ken Barozzi wrote:
> 
>>Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>>   :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>>           It will automatically install the bar :-)
>>
>>I want to put this in the main forrest site, because it's really cool, 
>>but...
>>
>>Bad news:  It needs Javascript on teh top of the page and an
>>   :-(     onclick attribute on the link.
>>
>>How is one supposed to do this :-?
> 
> 
> Today: add a HTML file to src/documentation/content/html, and add a
> custom sitemap rule to the project sitemap.

Actually I want to be able to put something in the xml page that is 
added verbatim to the result only if the xml will be transformed in html.

That is transformation result dependent content.

Pfew!

> In the future: no idea.. CAPs possibly?  We have two possible *.html
> matches:
> 
> <!-- Serve up hand-edited HTML -->
> <map:match pattern="**/*.html">
>   <map:read src="content/{0}"/>
>   <map:serialize/>
> </map:match>
> 
> <!-- Serve up generated HTML -->
> <map:match pattern="**/*.html">
>   <map:generate src="content/{1}/{2}.xml"/>
>   ...
>   <map:serialize/>
> </map:match>

Actually it's alreay doable by putting the html in 
src/documentation/content.
It will pick it up before trying the xml version.

> I think the original use-case for CAPs was determining what stylesheet to apply,
> to transform format X into documentv11:
> 
> <map:match pattern="*.html">
>   <map:act type="CAPAction">
>     <map:parameter name="config" value="doctypes.properties"/>
>     <map:generate src="{1}.xml"/>
>     <map:transform src="stylesheets/{doctype}2docv11.xsl"/>
>     <map:transform src="stylesheets/document2html.xsl"/>
>     <map:serialize/>
>   </map:match>
> 
> 
> But as Steven mentioned a while back:
>   "and have some SetMimeTypeAction which sets mimetype according to
>   file extension (or even better: /etc/mime.types for OSes that care
>   about mimetypes)."
>     <3DD4CB35.80708@outerthought.org>
> 
> So if we knew the MIME type from an Action..
>     
> We'd have something looking very much like a resource-exists test.  A
> great big switch.

Hmmm, it's already there since some time now.
The problem is that when it finds the file it serves it with no correct 
mime-type, thus the webapp works but the crawler chokes on thinking that 
the unknown mimetype means html.

> Just unenlightened ramblings..

keep'em coming...

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message