File: Data.xml
Getting Started with Microsoft Visual C++
Java
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Is product the ancestor of 'Java'?
test="name(//node()[. = 'Java']/ancestor::product) = 'product'">
Yes
Output:
Is product the ancestor of 'Java'?
Yes