cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bierenfeld <michael.bierenf...@atmiralis.de>
Subject Assigning <xsp:expr> to <xsl:variable>
Date Tue, 23 May 2000 12:12:33 GMT
Hello,

we have implemented some sort of a "rolodex". It looks like this

|tab1|tab2|tab3|
|    |---------------
| content of tab1   |
|                   |
---------------------

switch to tab2 will produce

|tab1|tab2|tab3|
|----|    |----------
| content of tab2   |
|                   |
---------------------

Nice and usefull for eg. you have a Database table and the fields of the
table do not fit on
one screen. But .....

How do i pass the content of an java variable to a xsl:variable ?

I have code like this


<xsl:template match="rolodex">

	<xsp:logic>

		String showTab = request.getParameter ("showtab");

		if (showTab == null) {
			showTab = <xsl:text>"</xsl:text><xsl:value-of
				select="@defaulttab"/><xsl:text>"</xsl:text>;	
		}

		<xsp:content>

			hallo showTab in java *<xsp:expr>showTab</xsp:expr>*

		</xsp:content>

	</xsp:logic>

	<xsl:variable name="showtab">

		<xsp:expr>showTab</xsp:expr>

	</xsl:variable>

The content of xsl:variable "showtab" is allways "showTab" instead of
the content of the java-variable showTab.

Is it possible to use <xsp:expr> in <xsl:variable>? I have the strange
felling that I am somewhat on the wrong way. I have to use
<xsl:variable> cause "showtab" is used later on to perform only those
tabs where the name of the tags is equal "$showtab"

The xml content looks like this :

<rolodex defaulttab="userinfo">

			<tab name = "userinfo" activeimage=
				.. Bla Bla Bla
			</tab>

			<tab name = "nsainfo" activeimage=
				.. Bla Bla Bla
			</tab>
</rolodex>


Regards

Michael

Mime
View raw message