I\'m rather new to coding xslt and have got rather stuck trying to do the following.
I have an xml file that has breeding info for horses broken into two main sectio
You need to use current():
current() gives you the context node as it is outside of the current XPath expression; in this case, the current element selected by xsl:apply-templates. Inside the predicate, the context node is the element that's being tested against the predicate expression.
Notes:
@ in there that you don't want; @ID refers to an ID attribute.descendant::/ with ////foo[barID = current()/ID].