[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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: Mike Brown <mike@xxxxxxxx>
Date: Wed, 22 Nov 2000 00:15:35 -0700 (MST)
what is atribute
Rosa I-Ting Cheng wrote:
> 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:
> 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>

I suspect you really want the value of the Property that has a certain
Caption attribute value. It happens to be the 2nd one and you could select it
just on that basis alone by replacing the [...] below with [2], but this is
probably more what you want:

  <xsl:for-each select="/Entities/Entity">
    <option value="{Properties/Property[@Caption='Operational Number']/@Value}">
      <xsl:value-of select="Properties/Property[@Caption='Name'/@Value"/>

   - Mike
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.