cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Problems with html output, DCP and <xsl:include>, URL parameters
Date Wed, 24 Nov 1999 20:45:48 GMT
On Wed, 24 Nov 1999, Jens Gohrke wrote:

> 
> > > If I got this one wrong - please yell at me ... it would safe quite some
> > > time.
> > Uh, yeah, I think you did get this one wrong. If you have the following
> > PIs in your initial XML document:
> > 
> > <?cocoon-process type="dcp"?>
> > <?cocoon-process type="xslt"?>
> > <?cocoon-format type="text/html"?>
> > 
> > The DCP processor will be invoked first and the <?dcp-content?> PIs will
> > be expanded. The the XSLT processor will be invoked and the XML tree will
> > be transformed using the XSL stylesheet into an XML results tree, which
> > will then be rendered using HTML rules.
> > 
> > Note that you could just have these in your initial document:
> > 
> > <?cocoon-process type="dcp"?>
> > <?cocoon-format type="text/html"?>
> > 
> > and if your DCP method creates a PI named "cocoon-process" with a
> > type="xslt" attribute, the XSLT processor will still be invoked.
> 
> That was probably my mistake at that time... looked at my old tests
> and found that i somehow dropped that PI in the DCP method. Thanks for
> clarifying that one, Donald.
> 
> Nevertheless, if I do need some more control like in my case (there
> is some quite asynchronous action while creation of the actual content
> which is done on maybe another host) i might want to handle exceptions
> and alike ... I will be forced into writing a Producer rather than
> a DCP method, i am probably right there ?!? :)

Probably you want to write a Processor rather than a Producer to replace
your DCP method. My tired refrain goes:

1. You can only have one Producer involved in a request, but can have
 multiple Processors. If I'd written SQLProcessor as a Producer and
 you wrote your special XML generator as a Producer and then you wanted to
 use them both in the same page, you'd be SOL, no way you could do it.

2. Processors are configured through XML fragments _and_ request 
 parameters. Producers only get request parameters and it's often a pain
 to squeeze  all of your configuration stuff into a URL (e.g. dburl,
 driver, etc.)

- donald


Mime
View raw message