RE: [xsl] Dynamic attribute selection

Subject: RE: [xsl] Dynamic attribute selection
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 5 Sep 2008 14:29:04 +0100
> <xsl:value-of select="p/c[@x]/@y]" />
> 
> That will display 27 as expected and required, and this is 
> exactly the effect I want, however I am having trouble 
> porting it to a template where you can specify as a parameter 
> the name of the attribute you want to ensure is present.

p/c[@*[name()=$param]]/@y

(May need a bit more care if the attribute can be in a namespace)

Michael Kay
http://www.saxonica.com/

Current Thread