Compiling the expression
//. | /
throws a java.util.NoSuchElementException
As near as I can figure the problem occurs in JaxenHandler.endUnionExpr when the second call to pop() is made.
public void endUnionExpr(boolean create) throws JaxenException
{
if ( create )
{
Expr rhs = (Expr) pop();
// FIXME this next line is dying with a NoSucElementException
// with the XPath expression //. | /
Expr lhs = (Expr) pop();
push( getXPathFactory().createUnionExpr( lhs,
rhs ) );
}
}
Possibly however this is just a symptom of an earlier bug.
The equivalent expression / | //. does not cause a problem.