You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bobby Mitchell <bo...@niac.usra.edu> on 2003/05/08 19:13:17 UTC
Need help with ParameterSelector
I'm using Cocoon-2.1-dev, RedHat-8, Sun j2sdk1.4.1_02.
I want to implement the following selector using
test="starts-with({1},'test')
<map:selectors default="parameter">
<map:selector name="parameter"
src="org.apache.cocoon.selection.ParameterSelector"
logger="sitemap.selector.parameter"/>
</map:selectors>
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{1}"/>
<map:when test="starts-with({1},'test')">
<map:generate type="serverpages" src="{1}.xsp"/>
<map:transform src="stylesheets/test2html.xsl"/>
<map:serialize type="xml"/>
</map:when>
</map:select>
If I use test="test" it works, but test="starts-with({1},'test') does not work.
Will ParameterSelector use "starts-with" in the test?
If so, is the syntax correct?
--
Robert J. (Bobby) Mitchell
Systems Administrator
NASA Institute for Advanced Concepts
555A 14th St Atlanta, Ga. 30318
Phone: (404)347-9633 Fax: (404)347-9638
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
AW: Need help with ParameterSelector
Posted by Marco Rolappe <m_...@web.de>.
hi bobby,
AFAIK the ParameterSelector doesn't support any xpath constructs (e.g. the
starts-with function). it deals with plain strings.
you could implement the desired functionality with help of jxpath in a
selector of your own (extending the ParameterSelector).
> -----Ursprungliche Nachricht-----
> Von: cocoon-users-return-50357-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-50357-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Bobby Mitchell
> Gesendet: Donnerstag, 8. Mai 2003 19:13
> An: cocoon-users@xml.apache.org
> Betreff: Need help with ParameterSelector
>
>
> I'm using Cocoon-2.1-dev, RedHat-8, Sun j2sdk1.4.1_02.
>
> I want to implement the following selector using
> test="starts-with({1},'test')
>
> <map:selectors default="parameter">
> <map:selector name="parameter"
> src="org.apache.cocoon.selection.ParameterSelector"
> logger="sitemap.selector.parameter"/>
> </map:selectors>
>
>
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test" value="{1}"/>
>
> <map:when test="starts-with({1},'test')">
> <map:generate type="serverpages" src="{1}.xsp"/>
> <map:transform src="stylesheets/test2html.xsl"/>
> <map:serialize type="xml"/>
> </map:when>
> </map:select>
>
>
> If I use test="test" it works, but test="starts-with({1},'test')
> does not work.
> Will ParameterSelector use "starts-with" in the test?
> If so, is the syntax correct?
>
>
> --
> Robert J. (Bobby) Mitchell
> Systems Administrator
> NASA Institute for Advanced Concepts
> 555A 14th St Atlanta, Ga. 30318
> Phone: (404)347-9633 Fax: (404)347-9638
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org