Patrick Desjardins
Patrick Desjardins

Reputation: 140993

XSLT transformation problem with dynamic attribute

This is something that work:

$curRow[1]/@gridClose

but let say that I do not know the attribute name "gridclose". I will loop and get this attribute with the code.

With the debugger I can get the value "gridClose" with : $curCol/@id. So I am trying to get something like :

$curRow[1]/@{$curCol/@id}

But it doesn't work. Any idea how I can do that?

Upvotes: 1

Views: 422

Answers (1)

David
David

Reputation: 34573

Maybe something like this:

$curRow[1]/@*[ name() = $curCol/@id ]

Upvotes: 6

Related Questions