Re: [xsl] Attribute as a Variable

Subject: Re: [xsl] Attribute as a Variable
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 11 Oct 2002 21:45:05 +0100
Hi Suvarna,

> I dont know the attribute name beforehand but is avaiable as a
> variable $currAttr.

Select all of the attributes on the $currNode:

  $currNode/@*

and then filter them with a predicate that tests whether their name()
is equal to $currAttr:

  $currNode/@*[name() = $currAttr]

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread