This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Naming an attribute as the atribute value of a HTML tag...
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: Naming an attribute as the atribute value of a HTML tag...
- From: Rosa I-Ting Cheng <Rosa at ceanet dot com dot au>
- Date: Wed, 22 Nov 2000 16:53:18 +1100
- Reply-To: xsl-list at mulberrytech dot com
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