<?xml version='1.0'?> <?xml-stylesheet type="text/xsl" href="union.xsl"?> <root> <y> <x>blue</x> <z>red</z> </y> <y> <x>yellow</x> </y> </root> 

Is it possible with the help of XPath to select only those nodes x that are inside y containing z ? In this case, one x tag.

    1 answer 1

    You must use the query y[z]/x .