cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo F. Ochoa" <moc...@exa.unicen.edu.ar>
Subject Re: Different Processors
Date Wed, 15 Dec 1999 18:12:12 GMT
Stefano Mazzocchi wrote:

> mochoa@exa.unicen.edu.ar wrote:
> >
> > >I have looked at the SQLProcessor and it is very nice.  We are going to
> > >start work on an LDAPProcessor, and possible a MailServerProcessor soon.
> > >Are these types of processors interesting to anyone out there?  If so, I
> > >will post them when we are through.
> >   This week I will finish with a new Producer for Cocoon 1.5 to generate XML
> > direct from Oracle 8.
> >   This producer is integrated with OWSKiller Servlet engine which emulate Oracle
> > Web Application Server 3.0.
> > >
> > >James Birchfield
> >    Marcelo.
>
> Kool. :)
>
> Please, people, if you have a good and general enough producer that you
> are willing to share, let us know, there is a big change we'll include
> it.

   This producer don't need changes inside the framework, only need add two extra
lines to cocoon.properties file and OWSKiller.jar to CLASSPATH vars.   Ej:
      producer.type.plsql = ows.PLSQLProducer
      producer.properties.plsql = /usr/local/ows/OWSKiller.properties

   Then use URLs like this
http://server:port/servlet/xml/demo.test?producer=plsql&table=emp
    Where demo is package name and test is procedure name of Oracle 8 DB.
    This producer replace xml static files by xml dynamic content generated inside
Oracle 8 DB.
    The great benefits is to separate Logic from presentation, never obtained by
Oracle Web Server.
    Here an example of Stored Procedure:
package body demo is
...
procedure test is
begin
   htp.p('
<?xml version="1.0"?>
<?xml-stylesheet href="http://reptil.arnet.com.ar/xsl/hello.xsl" type="text/xsl"?>
<?cocoon:process type="xslt"?>

<!-- Written by Marcelo Ochoa "mochoa@exa.unicen.edu.ar" -->
<page>
 <title>Hello world</title>
 <content>
  <paragraph>This is my first OWSKiller-Cocoon file!</paragraph>
 </content>
</page>
');
end test;
end demo;

   Let see that only write data dependent code inside the Stored Procedure, the
presentation information is an static file (xml-stylesheet param).

>
>
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <stefano@apache.org>                             Friedrich Nietzsche

    Best Regards, Marcelo.

Mime
View raw message