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: Generating Non-HTML File Extensions?
Date Wed, 10 Dec 2003 13:05:23 GMT
Marshall Roch wrote:

> Brian Enigma wrote:
> 
>>     What I would really prefer, though, is not to play musical file 
>> extensions.  For consistency (as well as for my own personal sense of 
>> aesthetics), I would like to generate the static content with a .php 
>> file extension.  
> 
> 
> There are a lot of debates about this.  Even .html won't last forever. 
> The best way to deal with it is to not use extensions at all.
> 
> Tim Berners-Lee (creator of HTML and the W3C) wrote something about this 
> a few years ago:
> 
> http://www.w3.org/Provider/Style/URI.html
> 
> and more specifically, http://www.w3.org/Provider/Style/URI.html#remove
> 
> I'm not sure if it's possible with Forrest, but this is something I've 
> done successfully with Apache and PHP in the past, and will be trying 
> with Forrest in a few days.

Forrest should work similarly, and we had discussions on this.

At that time, we had also decided on a format, something like:

  <link href="path-to-file" preferred-type="txt/html">text</link>

so that we could also specify the type of output that was preferred in 
case the client could accept the page in more formats.

This has not yet been done, and IMHO it's the next step to do after 
site.xml WRT linking.

Since we have decided to switch to XHTML2 as a next format, we should 
now see how that defines such a mechanism.

> If you use Apache as a front-end (i.e. Apache takes the request and 
> sends it to Tomcat, which sends it to Forrest), you can use 
> mod_negotiation, which allows you to eliminate file extensions altogether.
> 
> See the 2nd link above for more info on how it works.
> 
> IIRC, all you have to do to turn it on is add "Options +MultiViews" to 
> your .htaccess or httpd.conf file.
> 
> See also: http://www.alistapart.com/articles/urls

Basically, by using site.xml half is done, as content writers use 
indirect linking without extensions.

The rest should be done by Forrest, and Cocoon is very capable of it 
(@see the Cocoon docs http://cocoon.apache.org/). The problem here is 
that Cocoon is being used primarily for generating docs statically, 
while to do this one would need to run Cocoon live.

Thus we would need to have Forrest generate the whole site with all 
content types statically, also with the informations for Apache on how 
to do negotiation.

This would be really awesome, and it's wating for a taker :-)

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


Mime
View raw message