|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Attribute value templates
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








