RE: Naming an attribute as the atribute value of a HTML tag...

Subject: RE: Naming an attribute as the atribute value of a HTML tag...
From: "Shlomi Sarfati" <shlomi@xxxxxxxxxx>
Date: Wed, 22 Nov 2000 09:52:28 +0200
Hi
i am not sure that this is the answer that you need but i will try !

<xsl:element name="option">
		<xsl:attribute name = "value"><xsl:value-of
select="@Value"/></xsl:attribute>
</xsl:element>


i hope that it will help


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Rosa I-Ting Cheng
Sent: Wednesday, November 22, 2000 7:53 AM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: Naming an attribute as the atribute value of a HTML tag...


Can anyone please tell me where this will get the result I want? If not can
you please tell me how to get the result I want.
What I want to do is have the value of the 2nd Property as the 'value' in
the <OPTION value=''> tag.  In the browser should look something like this:

SHOWGROUNDS (SP272005)
SHOWGROUND (SP380215)      <=== in a list box.

Here's a snippet of the  XML:
<Entities>
<Entity Id='PV_CAP36066995170023' Class='Substations' Name='SP272005'>
<Properties>
<Property Caption='Name' Value='SHOWGROUNDS'/>
<Property Caption='Operational Number' Value='SP272005'/>
</Properties>
</Entity>
<Entity Id='PV_CAP36066995600004' Class='Substations' Name='SP380215'>
<Properties>
<Property Caption='Name' Value='SHOWGROUND'/>
<Property Caption='Operational Number' Value='SP380215'/>
</Properties>
</Entity>
</Entities>

Here's a snippet of the XSL
	<xsl:choose>
		<xsl:when test="position()=2">
			<xsl:variable name="entON"><xsl:value-of
select="@Value"/></xsl:variable>
			<OPTION value="$entON"><xsl:value-of
select="./preceding-sibling::Property/@Value"/> (<xsl:value-of
select="@Value"/>)</OPTION>
		</xsl:when>
	</xsl:choose>

Thank you for your help (in advance :)).

Rosa


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread