cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@yahoo.com>
Subject RE: SQL-Transformer, two more parameters
Date Sun, 01 Jul 2001 17:53:36 GMT
> From: Mariano Kamp [mailto:mkamp@codamax.com]
> Sent: Sunday, July 01, 2001 13:09
> To: cocoon-dev@xml.apache.org
> Subject: Re: SQL-Transformer, two more parameters
> 
> 
> Vadim,
> 
>   thanks for applying the patch. Is this the right format to send it in?

"diff -u" is official preferred patch format here :)


>  I understand how to do it the first way (define), but how can I do it the 
> second way?

Oops. That's true with TraxTransformer, but not SQLTransformer...
For TraxTransformer, you can provide parameters (defaults) when defining it:
  <map:transformers default="xslt">
   <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
    <use-store>true</use-store>
    <use-request-parameters>false</use-request-parameters>
    <use-browser-capabilities-db>false</use-browser-capabilities-db>
   </map:transformer>
   ....

And you can override defaults when invoking it:
  <map:match pattern="xxx">
    <map:generate src="slides.xml"/>
    <map:transform src="stylesheets/slides/slides-navigation.xsl">
      <map:parameter name="use-request-parameters" value="true"/>
      <map:parameter name="use-browser-capabilities-db" value="true"/>
    </map:transform>
  </map:match>

For SQLTransformer, only second way works. To implement first,
configure() method should be written as in TraxTransformer.

Vadim

> 
> Mariano
> 
> On Saturday 30 June 2001 04:47 am, Vadim Gritsenko wrote:
> > Mariano,
> >
> > Your patch is applied, thanks.
> > There are two ways to configure transformer:
> >  - provide default parameters when defining transformer,
> >  - provide parameters when using transformer.
> >
> > Your goal is also can be achieved using second way.
> >
> > Thanks,
> > Vadim
> >
> > > -----Original Message-----
> > > From: Mariano Kamp [mailto:mkamp@codamax.com]
> > > Sent: Friday, June 29, 2001 9:48
> > > To: cocoon-dev@xml.apache.org
> > > Subject: SQL-Transformer, two more parameters
> > >
> > >
> > > Hi there,
> > >
> > >   I needed to pass in two more parameters to SQL Transformer. I changed
> > > the code accordingly.
> > >
> > >   I attached the diff. If this is the right approach to pass in the
> > > parameters, feel free to add it. If not, could you please tell me what
> > > would have been the proper approach.
> > >
> > > Mariano
> > >
</skip>

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message