RE: [xsl] comparing attributes values dynamically

Subject: RE: [xsl] comparing attributes values dynamically
From: Adam Foran <aforan@xxxxxxxxx>
Date: Mon, 5 Jan 2004 14:03:01 -0500
Thanks a lot for your help Michael. That was exactly
what I wanted.

Adam

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Kay
> Sent: Monday, January 05, 2004 1:31 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 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


Current Thread