You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2007/11/27 15:18:43 UTC

Filter transformer - default block size?

I am using the filter transformer - which works just fine - 
as follows:
 
<map:transform type="filter">
  <map:parameter name="element-name" value="row"/>
  <use-request-parameters>true</use-request-parameters>
  <map:parameter name="count" value="{request-param:c}"/>
  <map:parameter name="blocknr" value="{request-param:b}"/>
</map:transform>
 
In the case where *no* values are passed for the parameters,
it seems the "count" value defaults to "10".  Is there a way to change
what this default is without passing an actual parameter value to the 
filter transformer (I was thinking perhaps a setting in cocoon.xconf)?
 
Thanks
Derek


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: Filter transformer - default block size?

Posted by Carsten Ziegeler <cz...@apache.org>.
Derek Hohls wrote:
> Carsten
>  
> Thank you for clarifying that.  I do not wish to implement a special version
> only for my own purposes (I can find a work-a-round for now) .  Would it
> be possible that such an amendment be considered for future versions?
> (It does seem like a potentially useful option).
Yes, I think that this addition makes sense, too. If you come up with a
patch
(and add it to Jira) I'm more than happy to apply it.

Thanks
Carsten


> Thanks
> Derek
> 
>>>> Carsten Ziegeler <cz...@apache.org> 2007/12/01 02:48 AM >>>
> Derek Hohls wrote:
>> I am using the filter transformer - which works just fine -
>> as follows:
>> 
>> <map:transform type="filter">
>>   <map:parameter name="element-name" value="row"/>
>>   <use-request-parameters>true</use-request-parameters>
>>   <map:parameter name="count" value="{request-param:c}"/>
>>   <map:parameter name="blocknr" value="{request-param:b}"/>
>> </map:transform>
>> 
>> In the case where *no* values are passed for the parameters,
>> it seems the "count" value defaults to "10".  Is there a way to change
>> what this default is without passing an actual parameter value to the
>> filter transformer (I was thinking perhaps a setting in cocoon.xconf)?
>> 
> Hi,
> 
> no, the current implementation does not provide a way to change the
> default for count.
> 
> You can extend the transformer and make it implement either Configurable
> or Parameterizable to change the default values. An example for this is
> the EncodeURLTransformer which reads default information in the
> "configure" method and then uses these as defaults in the "setup" method.
> 
> 
> HTH
> Carsten
> 
> 
> -- 
> Carsten Ziegeler
> cziegeler@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> -- 
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
> 
> 
> This message has been scanned for viruses and dangerous content by
> *MailScanner* <http://www.mailscanner.info/>,
> and is believed to be clean. MailScanner thanks Transtec Computers
> <http://www.transtec.co.uk/> for their support.
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

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


Re: Filter transformer - default block size?

Posted by Derek Hohls <DH...@csir.co.za>.
Carsten
 
Thank you for clarifying that.  I do not wish to implement a special version
only for my own purposes (I can find a work-a-round for now) .  Would it 
be possible that such an amendment be considered for future versions?
(It does seem like a potentially useful option).
 
Thanks
Derek

>>> Carsten Ziegeler <cz...@apache.org> 2007/12/01 02:48 AM >>>
Derek Hohls wrote:
> I am using the filter transformer - which works just fine - 
> as follows:
>  
> <map:transform type="filter">
>   <map:parameter name="element-name" value="row"/>
>   <use-request-parameters>true</use-request-parameters>
>   <map:parameter name="count" value="{request-param:c}"/>
>   <map:parameter name="blocknr" value="{request-param:b}"/>
> </map:transform>
>  
> In the case where *no* values are passed for the parameters,
> it seems the "count" value defaults to "10".  Is there a way to change
> what this default is without passing an actual parameter value to the 
> filter transformer (I was thinking perhaps a setting in cocoon.xconf)?
>  
Hi,

no, the current implementation does not provide a way to change the
default for count.

You can extend the transformer and make it implement either Configurable
or Parameterizable to change the default values. An example for this is
the EncodeURLTransformer which reads default information in the
"configure" method and then uses these as defaults in the "setup" method.


HTH
Carsten


-- 
Carsten Ziegeler
cziegeler@apache.org 

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Re: Filter transformer - default block size?

Posted by Carsten Ziegeler <cz...@apache.org>.
Derek Hohls wrote:
> I am using the filter transformer - which works just fine - 
> as follows:
>  
> <map:transform type="filter">
>   <map:parameter name="element-name" value="row"/>
>   <use-request-parameters>true</use-request-parameters>
>   <map:parameter name="count" value="{request-param:c}"/>
>   <map:parameter name="blocknr" value="{request-param:b}"/>
> </map:transform>
>  
> In the case where *no* values are passed for the parameters,
> it seems the "count" value defaults to "10".  Is there a way to change
> what this default is without passing an actual parameter value to the 
> filter transformer (I was thinking perhaps a setting in cocoon.xconf)?
>  
Hi,

no, the current implementation does not provide a way to change the
default for count.

You can extend the transformer and make it implement either Configurable
or Parameterizable to change the default values. An example for this is
the EncodeURLTransformer which reads default information in the
"configure" method and then uses these as defaults in the "setup" method.


HTH
Carsten


-- 
Carsten Ziegeler
cziegeler@apache.org

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