Hello,

String yourString = "blah";
...
<xsp:element>
  <xsp:param name="name"><xsp:expr>youString</<xsp:expr></xsp:param>
  <xsp:attribute name="whatever">
    <xsp:exrp>yourString</xsp:expr>
  </xsp:attribute>
</xsp:element>

will create:

<blah whatever="blah">
</blah>

I hope ;)

For more info look in:
cocoon-2.0.2/src/java/org/apache/cocoon/components/language/xsp/java
xsp.xsl - for all xsp tags
<others>.xsl - for how they can be used.

Artur...

> -----Original Message-----
> From: Volker Schneider [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 9:57 AM
> 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