You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hugh Sparks <hu...@csparks.com> on 2008/08/02 05:17:09 UTC
[C2.2] Passing sitemap parameters to blocks - a mess?
I have a transform implemented in a block that I call using servletService:
<map:generate src="myStuff"/>
<map:transform type="servletService">
<map:parameter name="service" value="servlet:myBlock:/myTransform?p1=xxx&p2=yyy"/>
</map:transform>
In the actual sitemap, when the list of request parameters is
long or if the values are verbose, the pipeline code is a total mess.
Because the line is so long, the document is impossible to read,
print, or display on a webpage. Packing the request line this
way is not very consistent with how other parameters are passed.
It can't even be fixed up with line continuations because its a literal string.
It would be nice, I think, if the transform could be called like this:
<map:generate src="myStuff"/>
<map:transform type="servletService">
<map:parameter name="service" value="servlet:myBlock:/myTransform"/>
<map:parameter name="P1" value="value one"/>
<map:parameter name="P2" value="value two"/>
...
<map:parameter name="PN" value="value N"/>
</map:transform>
The servletService transform would strip off the first parameter
to locate the service and then forward the rest to the transform.
The source code in the pipeline would look a lot better.
Is there already some better way to clean this up?
Thanks,
-Hugh Sparks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org