|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: comparing attributes values dynamically
>
> My XSLT code has a template into which I pass the two
> nodes in $newNode and $oldNode but I'm getting compilation
> errors. I know the following code is wrong but hopefully
> it'll be obvious what I'm trying to accomplish with it:
>
> <xsl:for-each select="$newNode/@*">
> <xsl:if test="string(current()) = $oldNode/@{name()}">
XPath expressions *never* contain curly braces. They are only used to
surround an XPath expression that is embedded in an ordinary attribute
value.
You want
test=". = $oldNode/@*[name()=name(current())]"
Michael Kay
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








