I seem to be unable to understand this thing. Is it possible to have the following key?
<xsl:key name="kMatchSentenceID_withTokId" match="sentences/sentence/@ID"
use="--and here return the 'sentences' node--"/>
I don’t understand how “use” works, shouldn't that be the value you return when the match matches?
I see that it use="."returns the attribute value in my case. (Why? Is this a coincidence? .Means node()?, Not node()/@)
But most importantly, why I can not do something like this: use="parent::sentence[@ID=name()]"
How would I do that? I need a match on @ID, but return its parent (more specifically, the parent id).
Thank.
source
share