functx:precedes-not-ancestor

Whether an XML node precedes another without being its ancestor

Description

The functx:precedes-not-ancestor function returns a boolean value indicating whether $a precedes $b without being its ancestor. If either argument is the empty sequence the function returns false.

Parameters

Description

a:node()

the first node

b:node()

the second node

Examples

XPath

Results

functx:precedes-not-ancestor($in-xml//author[1],$in-xml//author[2])

true

functx:precedes-not-ancestor($in-xml//author[1], $in-xml//author[1]/fName)

false

functx:precedes-not-ancestor($in-xml//author[2],$in-xml//author[1])

false

See Also