XPath id() ???

wxdqz

New Member
Hi, I'm trying to use the XPath id() function and cannot get anywhere.

Originally, I had the following, which works:

<xsl:value-of select = "/MyDoc/Tables/elt[@id=concat('TF_',current()/@typ)]" />.


But as I understand, this operates a selection on the 'id' attribute, which is not optimized. The <id> attribute being defined as an ID in my DTD, and its values being unique, I thought there might be a smarter and more effective solution. I tried lots of different syntaxes with no success. At the moment I have this:

<xsl:value-of select = "/MyDoc/Tables/elt[id(concat('TF_',current()/@typ))]" />.


but that always returns me the value of the 1st <elt> of <Tables>, I can't understand why?

So I'm feeling very miserable... :(
 
Back
Top