In the current spec it is not allowed to use a tag inside another tag.
If you need to use results from a tag processing in another tag, currently
you must expose it as a bean in some scope and then access that bean in the
other tag.

Wellington

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: how to quote nested tags


A collegue asked me a question that I can't answer. Maybe someone
reading this list can help. The question is how to nest tags in a way
that they expand to their attribute values.

An example: assume I have the following tags:

<my:foo a='value' />
<my:bar b='other' />
<my:baz c='stuff' />

When I want to nest two of this tags, I can use alternating single and
double-quotes like this. This works and the expansion of the tags is
no problem:

<my:foo a='<my:bar b="stuff"/>' />
                     ^-----^
          ^-------------------^


But what when I want to nest the tags deeper, alternating single-
and double quotes will not work, because the 2nd single quote will end
the 1st one and the taglib processor recognized this wrong structure:

<my:foo a='<my:bar b="<my:baz c='stuff' />" />' />
          ^---------------------^     ^-------^

My question now is: Is there a "right way" to do this? (Maybe using
&quot; or some form of temporary variable to hold an immediate value)

Thanks for Your help!

-Felix

Reply via email to