views:

46

answers:

1

I want to get all "generateId" values of the text nodes which are a child of a specific node whose attribute "id" value is known. I can i test for this condition using XSL?

+1  A: 

Use an XPath 2.0 expression like this:

//specificNode[@id=$knownValue]/text()/generate-id(.)

You may also use keys (<xsl:key> and the key() function) for more efficient selection of all specificNode-s that have an id attribute with a knownValue.

Dimitre Novatchev
Thanks for you response.
Rachel
@Rachel: Was this the answer that you needed?
Dimitre Novatchev
Yes it works. Thanks.
Rachel