is_after()
Returns true if the given entity is after the second given entity in document order, otherwise returns false.
boolean is_after()
(
ent1 entity,
ent2 entity);
Description
The function ensures that both ent1 and ent2 are XML entities
and the returns true if ent1 and ent2 are both in the same XML
document and ent1 is strictly after ent2 in document order.
It returns false
if one of them is not an entity but an empty node-set or
if their documents differ or
or if they're equal
or if one of them is an ancestor of other
or if ent1 is simply before ent2 in document order.
Parameters
ent1 –
An XML entity or an node-set whose first node is compared.
ent2 –
An XML entity or an node-set whose first node is compared.
Errors
SQLState |
Error Code |
Error Text |
Description |
XP001
|
XPFB0
|
First argument of XPATH function is-before() or is-after() must be XML entity
|
The value that is neither an XML entity nor an empty node-set may not be compared using document order. |
XP001
|
XPFB1
|
Second argument of XPATH function is-before() or is-after() must be XML entity
|
The value that is neither an XML entity nor an empty node-set may not be compared using document order. |
Examples
Find all chapters that have title after table of content
/book/chapter[is-after(toc,title)]