You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Cliffano Subagio <cs...@yahoo.com.au> on 2002/05/27 16:51:14 UTC
str to replace tags
Any recommendation how to replace "<foo>" with "<bar>" using str taglibs?
<str:replace replace="<foo>" with="<bar>">
Kung Foo
</str:replace>
This doesn't work.
I tried to use <foo> instead, and it also failed.
TIA,
=====
Cliffano Subagio
http://travel.yahoo.com.au - Yahoo! Travel
- Plan and book your dream holiday online!
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: str to replace tags
Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
You might try using the regexp taglib substitute tag.
Cliffano Subagio wrote:
>
> Hi Henri,
>
> Sorry about my mistake (forgot to type in the <foo> tag), your example is
> correct.
>
> Basically I want to replace a tag within a long string with another tag.
>
> At the moment, I have a workaround by replacing the name of the tag without the
> angled brackets.
> E.g.: <str:replace replace="foo" with="bar">
> while what it really needs is
> <str:replace replace="<foo>" with="<bar>"> which doesn't work
> or
> <str:replace replace="<foo>" with="<bar>"> which also failed
>
> <str:replace replace="foo" with="bar"> creates problem if the actual non-tag
> string includes the word 'foo'.
>
> --- Henri Yandell <ba...@generationjava.com> wrote: > Just to let you know
> Cliffano. Have read the email and need to go research
> > the idea. I'm assuming that rather than Kung Foo in your example, it
> > should be <kung><foo>KungFoo</foo></kung>??
> >
> > I need to figure out what it is the taglib engine passes to me. Maybe I
> > need a 'tagreplace' tag.
> >
> > Does anyone know if the xsl taglib would provide any support here? That
> > way <foo> and </foo> would both be handled nicely I guess.
> >
> > Hen
> >
> >
>
> =====
> Cliffano Subagio
>
> http://travel.yahoo.com.au - Yahoo! Travel
> - Plan and book your dream holiday online!
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
----------------------------------------------------------------------
Glenn Nielsen glenn@more.net | /* Spelin donut madder |
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network | */ |
----------------------------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: str to replace tags
Posted by Cliffano Subagio <cs...@yahoo.com.au>.
Hi Henri,
Sorry about my mistake (forgot to type in the <foo> tag), your example is
correct.
Basically I want to replace a tag within a long string with another tag.
At the moment, I have a workaround by replacing the name of the tag without the
angled brackets.
E.g.: <str:replace replace="foo" with="bar">
while what it really needs is
<str:replace replace="<foo>" with="<bar>"> which doesn't work
or
<str:replace replace="<foo>" with="<bar>"> which also failed
<str:replace replace="foo" with="bar"> creates problem if the actual non-tag
string includes the word 'foo'.
--- Henri Yandell <ba...@generationjava.com> wrote: > Just to let you know
Cliffano. Have read the email and need to go research
> the idea. I'm assuming that rather than Kung Foo in your example, it
> should be <kung><foo>KungFoo</foo></kung>??
>
> I need to figure out what it is the taglib engine passes to me. Maybe I
> need a 'tagreplace' tag.
>
> Does anyone know if the xsl taglib would provide any support here? That
> way <foo> and </foo> would both be handled nicely I guess.
>
> Hen
>
>
=====
Cliffano Subagio
http://travel.yahoo.com.au - Yahoo! Travel
- Plan and book your dream holiday online!
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: str to replace tags
Posted by Henri Yandell <ba...@generationjava.com>.
Just to let you know Cliffano. Have read the email and need to go research
the idea. I'm assuming that rather than Kung Foo in your example, it
should be <kung><foo>KungFoo</foo></kung>??
I need to figure out what it is the taglib engine passes to me. Maybe I
need a 'tagreplace' tag.
Does anyone know if the xsl taglib would provide any support here? That
way <foo> and </foo> would both be handled nicely I guess.
Hen
On Tue, 28 May 2002, [iso-8859-1] Cliffano Subagio wrote:
> Any recommendation how to replace "<foo>" with "<bar>" using str taglibs?
>
> <str:replace replace="<foo>" with="<bar>">
> Kung Foo
> </str:replace>
> This doesn't work.
>
> I tried to use <foo> instead, and it also failed.
>
> TIA,
>
>
>
> =====
> Cliffano Subagio
>
> http://travel.yahoo.com.au - Yahoo! Travel
> - Plan and book your dream holiday online!
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>