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

Re: Attribute Matching

Subject: Re: Attribute Matching
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 7 Jan 2007 21:30:05 GMT
Re:  Attribute Matching
> <xsl:copy-of select="$field[@flg=$drvr/@*[.=name()]]"/>

.=name() is true if the value of the node is the same as its name, so
something like id="id" would test true.

so

$drvr/@*[.=name()]

selects all attributes of the elements in $drvr that have the same name
as their value.

so

@flg=$drvr/@*[.=name()]

is true if there is a flg attribute on the current element that has the
same value as the attribute in $drvr that has the same name as its
value.

It seems like you want something like

<xsl:template match="row">
 <Field flg="{name(@*[.=1])}"/>
</xsl:template>


David

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.