xml-xsp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sergeant <m...@sergeant.org>
Subject Re: setting response headers with XSP
Date Tue, 19 Jun 2001 14:09:40 GMT
On Tue, 19 Jun 2001, Zeljko Rajic wrote:

> Hi,
> I'm currently trying to find out how to set response headers within Cocoon,
> respectively XSP in general. Reading the Cocoon respectively Cocoon's XSP
> documentation and FAQs I couldn't find any information about this topic.
> So I still got some open questions and would appreciate it if somebody could
> give me some further information or could point me to a resource. My questions
> are:
> 1. Where in the XSP document do I have to place the <xsp-response:set-header
> .../> tag? Does it matter where I place this tag?
> Concerning HTTP, it is necessary to send any header information prior any
> content/data. Thus, does Cocoon buffer the content/data and then writes header
> information and content/data in a 'single' run?
> Having a look at the generated Java source, shows that it generates/fires SAX
> events and thus makes me wonder how the response headers currently being set!?
> 2. The same probably applies to cookies, thus the same question for cookies:
> Where in the XSP document is it allowed to set a cookie using the
> <xsp-cookie:cookie> tag?

These two questions are really implementation dependant, and belong on
Cocoon-Users. My take on it, is that it doesn't matter in AxKit or Cocoon
1, because both use the "build a DOM" method. It probably matters in
Cocoon 2 though. I think the C2 solution is to cache to a certain extent
and hope you try and send the header early enough in the XSP file that it
just works :-) But I await to be corrected on that.

> 3. Does any specification exists for XSP?  Often it's not possible to say
> whether some XSP constructs do not work because of wrong usage or because of a
> bug in Cocoon's XSP implementation.  An specification also would allow to
> build an XSP verifier - or does a verifier already exist?

I think an XSP verifier would be very hard to write. Certainly not
possible in W3C Schemas. Though perhaps possible in Schematron or RELAX.

As for a spec, there is nothing formal as yet. We really need to get
around to doing that.

The problem though, is that with taglibs the XSP set of tags is infinite,
and the way you can put them to use is also infinite. The upshot of this
is just about any XML document is a valid XSP document, with the exception
of items in the XSP namespace itself, which may have to appear in a
certain hierarchy.


    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
    //  \\

View raw message