cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans <Jorg.Heym...@12snap.com>
Subject regex transformer
Date Mon, 04 Aug 2003 15:53:02 GMT
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 <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

Mime
View raw message