I don't think you can do this with an InputModule. Certainly not checking on 
words in text I think

Some time ago I wrote a highlighttransformer using a Map of words to lookup for 
matches and when a match was found, some customizable tag and attributes could 
be set (for example the href of the lookup xml was placed on a "a" element)

This is almost the same you should write, except that your problem is still a 
little harder, because when finding a match, you do not have to set a tag with 
some attributes, but you have to change a tag that is already there (and which 
has been sax parsed already)...

Well, you could use the highlighttransformer, set just a tmp tag with the 
correct href, and afterwards do an xsl transformation removing the parent 
element (the <a href="foo">) of the tmp tags. Pretty dirty, but do not know 
another easy solution

Regards AS

PS useage of the highlighttransformer can be found in dev list with subject 
"New Highlighttransformer". Have not yet shared the code, so if you like, let 
me know

> 
> 
> Hola,
> I'm not sure about what I'm saying :D, but I think that you can do a
> InputModule, like
> src/blocks/portal/java/org/apache/cocoon/components/modules/in
> put/PortletURLModule.java
> used in portal block. This component work with linkrewriter, a little
> description can be found here [1] and in the component doc.
> 
> Regards,
> Daniele.
> 
> 
> > Hi all. I must do a link rewriteron an HTML file tha i have 
> form tidy
> > generator. I must rewite the link by using some values 
> contained in a
> > java.util.Map; i have this Map populated by the content in 
> the tag "<a";
> > i.e if the link is <a href="controllo.html"> controllo 
> criminale</a> in
> > the Map i have done a similar thing:
> >
> > Map m = new HasMap();
> > m.put( "controllo criminale", "pageId=2" );
> >
> > By this linkrewriter i want to do a similar thing:
> >
> > to take the value of the tag a (that is the String 
> controllo criminale)
> >
> > to check if this string is present in the map (if 
> m.contains("controllo
> > criminale"))
> >
> > to change the href value from href="controllo.html" to
> > href="invoke?pageId=2"
> >
> >
> > Can i do a similar thing by using SAX or must i use DOM. If 
> i can use
> > SAX... can anyone show me how i can do?
> >
> > Thanks to all.
> >   Angelo.
> >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> [1] http://wiki.apache.org/cocoon/CocoonAppAsJSR168Portlet
> 
> -- 
> The box said "Requires Windows 95/98/Me/Nt/2k/XP or better" .... so I
> installed Linux !
> -o=|=o-
> 
> Daniele Madama
> 
> Pro-netics s.r.l.
> Via Elio Lampridio Cerva 127/c
> Roma
> Tel. 0651530849
> http://www.pronetics.it
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]