Hi all,

 

I would need some sort of search and replace functionality for my XML templates, resorting to XSLT for this seems beyond my reach.

Basically if a template contains

 

<test>

<url value=http://mycom.com/?param=myparam/>

<title value="myparam"/>

</test>

 

Then I would like to replace all occurrences of myparam with a value of my own. How would this fit into cocoon? Should I be looking at creating my own transformer eg:

<map:transform type="regex">

<map:parameter regex="s/myparam/myvalue/g">

or

<map:parameter op="replace" what="myparam" with="myvalue"/>

 

</map:transform>

 

Does this seem all too crazy? Is there a better way of doing this?

 

Rgds

Jorg

Reply via email to