cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schlichtherle" <>
Subject Cannot access sitemap parameters using Velocity and JXTemplate
Date Thu, 31 May 2007 02:46:14 GMT
in my sitemap, I have this:
            <map:match pattern="*.xsl">
                <map:generate type="jx" src="{1}.xsl">
                    <map:parameter name="select" value="start"/>
                    <map:parameter name="data-type" value="text"/>
                    <map:parameter name="order" value="ascending"/>
                    <map:parameter name="contextPath"
                <map:serialize type="xml"/>

In the stylesheet, I have this:
                <p>Jexl select: ${}</p>
                <p>Jexl data-type: ${cocoon.parameters['data-type']}</p>
                <p>Jexl order: ${cocoon.parameters.order}</p>

unfortunately, the output of this processing is always empty.
When I change the stylesheet to the following, however:
                <p>Jexl select: ${cocoon.parameters}</p>
                <p>Jexl data-type: ${cocoon.parameters}</p>
                <p>Jexl order: ${cocoon.parameters}</p>

I get a textual representation (.toString() I guess) of the parameters map,
with all parameters contained.
The same applies if I switch from JXTemplate to Velocity with the following
                <p>Velocity select: $</p>
                <p>Velocity data-type: $</p>
                <p>Velocity order: $parameters.order</p>

What's wrong? Any hint would be very much appreciated. I'm a Cocoon newbie.
Ah, yes: I am using Cocoon 2.1.10 with vanilla build (all blocks) and
configuration (cocoon.xconf, sitemap.xmap, etc).
Kind regards,
Christian Schlichtherle
Schlichtherle IT Services
Wittelsbacherstr. 10a
10707 Berlin
Tel: +49 (0) 30 / 34 35 29 29
Mobil: +49 (0) 173 / 27 12 470 <> 

View raw message