Thanks a lot for your help Michael. That was exactly
what I wanted.
Adam
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of
Michael Kay
Sent: Monday, January 05, 2004 1:31 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] 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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list