You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ka...@pass-consulting.com on 2000/10/19 14:29:47 UTC

Problem with variables

Hi everybody,

I know that this isue was on the list before, but I just cant find it in the
archive. So please give me a hint.

Below you see some code. My problem is how to retrieve the variable "ID"
outside the <option> tag.
Thats all.
Thanky you

Kai



<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="/">

<body bgcolor="orange">

	<form id="Level5" action="../request.xml" method="post"
target="_top">
	
		<select name="K5" style="width=120"
onchange="form.submit()">
			<optgroup label="category 5">
				<option value="0">select</option>
				<xsl:for-each select="page / ROWSET / ROW">
				<xsl:variable name="ID"><xsl:value-of
select="CATID"/></xsl:variable>
				<option value="{$ID}">
					<xsl:value-of
select="NAME"></xsl:value-of>
				</option>

			</xsl:for-each>
			</optgroup>
		</select>
	</form>
</body>
</xsl:template>

</xsl:stylesheet>

Persistent object with cocoon

Posted by Konstantin Piroumian <KP...@flagship.ru>.
I have seen a similar question before, but did not find the answer to it.

Is there a possibility to create some objects and keep them in memory,
f.e.: a Properties object with some application settings.
And I want to be able to refer this object from any page.

Thank for any help.

Regards,
-------------------------------------------------------------
Konstantin Piroumian
Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com
-------------------------------------------------------------



Re: Problem with variables

Posted by Konstantin Piroumian <KP...@flagship.ru>.
Do you mean this:

<xsl:value-of select="$ID"/>?

Kot.

----- Original Message -----
From: <Ka...@pass-consulting.com>
To: <co...@xml.apache.org>
Sent: 19 ??????? 2000 ?., ??????? 16:29
Subject: Problem with variables


> Hi everybody,
>
> I know that this isue was on the list before, but I just cant find it in
the
> archive. So please give me a hint.
>
> Below you see some code. My problem is how to retrieve the variable "ID"
> outside the <option> tag.
> Thats all.
> Thanky you
>
> Kai
>
>
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >
> <xsl:template match="/">
>
> <body bgcolor="orange">
>
> <form id="Level5" action="../request.xml" method="post"
> target="_top">
>
> <select name="K5" style="width=120"
> onchange="form.submit()">
> <optgroup label="category 5">
> <option value="0">select</option>
> <xsl:for-each select="page / ROWSET / ROW">
> <xsl:variable name="ID"><xsl:value-of
> select="CATID"/></xsl:variable>
> <option value="{$ID}">
> <xsl:value-of
> select="NAME"></xsl:value-of>
> </option>
>
> </xsl:for-each>
> </optgroup>
> </select>
> </form>
> </body>
> </xsl:template>
>
> </xsl:stylesheet>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>