Hi for every one,
I have a problem with evaluation of XPath queries in Java which contain parehtesis like the following example :
/root/(child1 | child2)
I don't want to divise query to sub-queries like : /root/child1 | /root/child2 because in my case i compute a query in a polinomial time but by dividing it to sub-qeury it may be for an exponential time.
My problem is that evaluate this query in java cause the following exception :

Error during evaluation of Query :
/root/(a1 | a2)/*
javax.xml.transform.TransformerException: Une étape d'emplacement était attendue après le jeton ''/'' ou ''//''.
at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:612)
I don't know how to deal with this bug because i must use the syntax described in the example above, I use the xerces Parser
Thank you for help me