Question
I have an XInclude
that includes a node-set resulting from the specified xpointer
attribute's expression.
Is it possible to select, with the xpointer
, an empty node-set, so to not include anything?
Issue
The reason is that my xincluded & xpointed node could exist and could NOT exist; so I'm getting a:
XInclude error : XPointer evaluation failed
in the case the pointed node does not exist.
Example
The expression is something like:
xmlns(ns=urn:my:namespace)
xpointer(/ns:element1/*[ns:elementA | ns:elementB])
I would like to change the XPointer so that the XInclude does NOT include anything (without raising the error) in the case the node is not found.
Something like:
xmlns(ns=urn:my:namespace)
xpointer(/ns:element1/*[ns:elementA | ns:elementB | NOT_FOUND_NODES ])
Is there any way to accomplish that?