cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby <>
Subject Re: Parsing sitemap from within XSLT Transformer
Date Fri, 18 Aug 2006 18:46:06 GMT
Alain Pannetier wrote:
> Toby wrote:
> > you could put the action around everything, as the first and only
> > child of <map:pipelines>  [...] modify it so that it only computes
> > diagramType on the first request of every session, and then it just
> > returns a cached value.
> This is actually what I started doing but then it finally dawned on me
> that a given document or a given pattern generating various document
> needs to cater for various types of SVG documents.

I don't understand your point very well.

You say that a document or a pattern needs to cater to various SVG
needs.  That's exactly why I suggested passing a parameter to the XSLT.

This is how I think it would work:
- the user opens the browser and goes to your site
- the first HTTP request that gets to Cocoon passes through the action
  (like every other request, if the action is put around everything)
- the action does its computation based on the user agent and sets one
  or more sitemap parameters.  it also stores (caches) those parameters
  in the session object.
- the request goes on to the relevant matcher
- if needed, any XSLT transformer (both XHTML- and SVG-producing ones)
  can make choices based on the parameters set by the action and passed
  to them by the pipeline
- every subsequent request goes through the action, but unless the user
  switches browser, or closes and reopens it, the action just reads the
  cached parameters from the session object.

I'm sure I'm missing something in your problem description, because this
seems much easier to me than writing a custom Xalan extension!


Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message