functx:follows-not-descendant

Whether an XML node follows another without being its descendant

Description

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

Parameters

Description

a:node()

the first node

b:node()

the second node

Examples

The examples below use this input document:

<xsl:variable name="in-xml" as="item()*">
  <authors>
     <author>
        <fName>Kate</fName>
        <lName>Jones</lName>
     </author>
     <author>
        <fName>John</fName>
        <lName>Doe</lName>
     </author>
  </authors>
</xsl:variable>

XPath

Results

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

true

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

false

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

false

See Also