[Zope-dev] HTTP content negotiation-- has anyone tried this in Zope?

2002-11-13 Thread Craeg Strong
Hello:

I try to keep tabs on other open source CMSs, in particular Apache Cocoon, and
I noticed this message:

http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103717736917834w=2

talking about software that, in effect, enables one to configure a server to respond
to
the HTTP headers having to do with content negotiation: preferred charset, preferred
language, and content-type.

This is way cool stuff-- imagine an application capable of returning an XML
representation
of a resource instead of a human-readable XHTML simply based on the HTTP
header-- same URL.

ASIDE: This is in line with TBL's original vision of the web and
is being adopted by high profile organizations like google-- it has supported
Accept-Language
for at least a year-- change the list of acceptable languages to demonstrate it in a
browser...

Question: has anyone tried to support this kind of thing using Zope yet?  I imagine
it should be possible, b/c you should have access to everything you need in the
REQUEST object, right?

If one agrees that this is a good idea, then wouldn't it be cool to have a set of
ready-made components in Zope3 to facilitate switching on relevant HTTP
headers-- either for mime type, I18N, etc.?

Thoughts?

--Craeg


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HTTP content negotiation-- has anyone tried this in Zope?

2002-11-13 Thread Heiichiro NAKAMURA

On Wed, 13 Nov 2002 16:14:11 -0800
Craeg Strong [EMAIL PROTECTED] wrote:

 Hello:
 
 talking about software that, in effect, enables one to configure a server to respond
 to
 the HTTP headers having to do with content negotiation: preferred charset, preferred
 language, and content-type.

 Question: has anyone tried to support this kind of thing using Zope yet?  I imagine
 it should be possible, b/c you should have access to everything you need in the
 REQUEST object, right?
 
 If one agrees that this is a good idea, then wouldn't it be cool to have a set of
 ready-made components in Zope3 to facilitate switching on relevant HTTP
 headers-- either for mime type, I18N, etc.?


As far as I know, Zope3 already has some implementation of
content negotiation mechanism regarding with:
   preferred-language
  and
   preferred charset

There's some description about it:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/LanguageNegotiationFramework


I have implemented experimental multilingual locale support for Zope 2.5.1
which will manipulate Content-Type header (I haven't disclosed it yet though).


---
Heiichiro NAKAMURA [EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HTTP content negotiation-- has anyone tried this in Zope?

2002-11-13 Thread Joachim Werner
Hi!

We've talked a lot about that when we discussed Zope I18N some time ago.
Most of this is relatively easy to accomplish even now.

Regarding language negotiation: Both Localizer and ZBabel do this. The
problem in my practical experience is that most people do not configure
their browsers correctly. This is especially true with people having English
instead of localized browser versions (e.g. in large corporations), but at
the same time not expecting
to get The Web in English only ... -- I hope that this will change ...

With regard to content type: I had a proposal some time ago that I still
think to be cool, but that didn't get too much attention:

If we used object names without any .whatever suffixes, we could easily
provide handlers for different output formats.

An example:

Let's say you upload an OpenOffice text file in XML format. It is called
myFile.sxw. It will actually be stored as a folderish object called
myFile that contains all the items of an OpenOffice file (which is a
zipped folder of content, stylesheet, and image files). You could then
retrieve it as HTML, using myFile.sxw, as a MS Word document, using
myFile.doc, etc. etc.

This might not be the right thing as a Zope default. But in a document
management context this would just be marvelous. The decision what file
format to return could be handled via content type negotiation, or via an
explizit URL containing the suffix. The only thing that still is not quite
obvious to me is how to handle FTP or WebDAV requests. One could display ALL
options, or just the default one.

 I try to keep tabs on other open source CMSs, in particular Apache Cocoon,
and
 I noticed this message:

 http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103717736917834w=2

 talking about software that, in effect, enables one to configure a server
to respond
 to
 the HTTP headers having to do with content negotiation: preferred charset,
preferred
 language, and content-type.

 This is way cool stuff-- imagine an application capable of returning an
XML
 representation
 of a resource instead of a human-readable XHTML simply based on the HTTP
 header-- same URL.

 ASIDE: This is in line with TBL's original vision of the web and
 is being adopted by high profile organizations like google-- it has
supported
 Accept-Language
 for at least a year-- change the list of acceptable languages to
demonstrate it in a
 browser...

 Question: has anyone tried to support this kind of thing using Zope yet?
I imagine
 it should be possible, b/c you should have access to everything you need
in the
 REQUEST object, right?

 If one agrees that this is a good idea, then wouldn't it be cool to have a
set of
 ready-made components in Zope3 to facilitate switching on relevant HTTP
 headers-- either for mime type, I18N, etc.?

 Thoughts?

 --Craeg


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )