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

Re: Attribute value templates

Subject: Re: Attribute value templates
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Tue, 27 Oct 1998 10:43:33 +0530
color xsl blue red rgb
Hi! Anders,

>than one elements in the input doc we must select node (on attribute
>value) and value in a single attribute value template.
>
>Is this possible?
Yes it is.

Pl. correct me if I'm wrong , since I'm still new to the XSL world :-)

The original XML file :-

<example>
   <color name="red"   rgb="ff0000"/>
   <color name="green" rgb="00ff00"/>
   <color name="blue"  rgb="0000ff"/>
 </example>

The XSL stylesheet :-

 <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
   <xsl:template match="example">
     <circle bg="{color[attribute(name)='green']/attribute(rgb)}"
fg="{color[attribute(name)='blue']/attribute(rgb)}"/>
   </xsl:template>
 </xsl:stylesheet>

                    Why don't you also look at the XSL spec. section 2.7.2.
It may help





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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.