In this case you could use XSLT, so that you generate some xml, maybe like
so

<language><xsp:expr>getLanguage()</xsp:expr></language>

and then in your transformation you do
<xsl:template match="/">
        <hello language="{language}"></hello>
</xsl:template>

you can then transform the result of that into whatever...

Graeme

-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
.org]On Behalf Of Volker Schneider
Sent: 25 April 2002 14:57
To: [EMAIL PROTECTED]
Subject: XSP question: How to set tag attributes dynamically?


Dear colleagues,

does anybody know how I can set a tag attribute within xsp, for example

...
String theLanguage = "en";
<hello language="en"></hello>
...

How can I fill the "en" into the language attribute from the JAVA variable?

The same problem is to set dynamic tags:

<xsp:element name="???">...</xsp:element>

How can I fill the ??? from JAVA?

Thank you, best regards
- Volker -

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to