The union operator (|) in XPath requires both operands to
be node-sequences, but your second operand is a number.
You can use the comma operator (,) in XPath 2.0. The result
will then be a sequence of nodes followed by a number. This is not a type that
XPath 1.0 recognizes, so you can't handle it using the JAXP interface. But it
would work fine using s9api.
In s9api it would work like this:
Processor proc = new Processor();
DocumentBuilder builder =
XdmNode document = builder.build(....);
XPathCompiler xpc =
for (XdmItem xi : xps)
... process the next item in the
I want to sent more then one expression to xpath something like
problem my evaluation function expects a NodeSet and for the sum a String.
Ofcourse I can split those on the' | ' character en use two return
types XPathConstants.NodeSet and
XPathConstants.Number. But I prefer to handle this
in one expression. So I thought XPath 2.0 can to this for me.
is the file I used from Saxon http://kickjava.com/src/ApplyXPathJAXP.java.htm
Sorry but I dont understand how I can use s9api to solve this