cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Schneider" <volker.schnei...@danet.de>
Subject RE: XSP question: How to set tag attributes dynamically?
Date Thu, 25 Apr 2002 14:53:00 GMT
Hi Artur,

thank you very much, that works fine.

Best regards,
Volker

-----Original Message-----
From: Artur Bialecki [mailto:artur@digitalfairway.com]
Sent: Donnerstag, 25. April 2002 16:27
To: cocoon-users@xml.apache.org
Subject: RE: XSP question: How to set tag attributes dynamically?



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:volker.schneider@danet.de]
> Sent: Thursday, April 25, 2002 9:57 AM
> To: cocoon-users@xml.apache.org
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message