cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Burgess <le...@red-bean.com>
Subject Specifying an XSL in a Cocoon Request
Date Wed, 26 Apr 2000 15:12:03 GMT

Another question:

I need to be able to pass to Coccon, in the request URL, a parameter
for a specific XSL to use, rather than the one indicated in the XML.

I have perused this list and the user list and found a couple of
possible solutions that people have come up with.

One is to write a custom Producer that adds the proper PIs to the XML.

Another is to use XSP to call the methods necessary to specify the
desired XSL.

While both of these seem to work, I wonder if they are the right way
to do this?

For example, what if I don't want to use XSP; that is, I don't want
that kind of logic in my XML?

A custom Producer seems the way to go, but that is a pain because one
essentially has to add an extra layer of file parsing and/or object
instantiation just to set the xml-stylesheet PI in the XML before it
gets sent off to the Processor.  The XML basically ends up getting
parsed twice: once in the custom Producer and then again in the course
of normal cocoon processing.

I guess what I am hoping for is for someone to prove me wrong
(indicate the right way to do this), or tell me that this feature will
be implemented in Cocoon.  It sure would be nice to just request:

http://www.myhost.org/data.xml?xsl=sheet.xsl&parm1=foo&parm2=bar

I have looked into the cocoon code and I might be able work something
out along these lines.  Does anyone have any objections to me taking a
shot at this and submitting a patch?

-- 
Lee P. W. Burgess  <<!>>  The first rule of Lefty is: you do not talk
Programmer         <<!>>  about Lefty.
Red Bean Software  <<!>>  The second rule of Lefty is: YOU DO NOT TALK
lefty@red-bean.com <<!>>  ABOUT LEFTY.






Mime
View raw message