functx:is-descendant
Whether an XML node is a descendant of another node
Description
The functx:is-descendant function returns a boolean value indicating whether $node1 is a descendant of $node2.
Parameters |
Description |
---|---|
node1:node() |
the first node |
node2:node() |
the second node |
Examples
XPath |
Results |
---|---|
functx:is-descendant($in-xml//author[1]/fName, $in-xml//author[1]) |
true |
functx:is-descendant($in-xml//author[1], $in-xml//author[1]/fName) |
false |
functx:is-descendant($in-xml//author[1]/fName/text(), $in-xml//author[1]/fName) |
true |
functx:is-descendant($in-xml//author[1], $in-xml//author[2]) |
false |