Il 15/12/2011 18:27, Simone Tripodi ha scritto:
Hi Grosso!!!
Anyway, could you think of a way for using this new component inside
sitemap?
ehm... yes, so... I was think about... ehm... yes I know how, yes...
ehm... don't know yet :P

jokes a part, what's your usecase using Stringtemplate inside the
sitemap? We could start replicating the same behavior, just for
start...

Well, just consider the way how StringTemplate transformer is currently included in cocoon-sample's sitemap:

<map:match wildcard="string-template/transformer">
<map:generate src="string-template/template.xml"/>
<map:transform type="string-template">
<map:parameter name="parameter" value="Another value"/>
<map:parameter name="booleanParameter" value="{jexl:false}"/>
</map:transform>
<map:serialize/>
</map:match>

where template.xml is something like:

<html>
<head>
<title>StringTemplate demo</title>
</head>
<body>
<h3>StringTemplate demo</h3>
<p>parameter=$parameter$</p>
$if(booleanParameter)$
<p>booleanParameter was TRUE</p>
$else$
<p>booleanParameter was FALSE</p>
$endif$
</body>
</html>

I don't expect, of course, that VariableExpander could handle the stuff related to booleanParameter: anyway, it should instead replace $parameter$ white "Another value".

Anyway, I am just realizing that using a "foreign" component like VariableExpander adds much more value in a Java pipeline than inside sitemap...

Regards.

--
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to