Hi,
I got the following response and am not sure where the problem is:
Query: doc("XPath test.xml")//*[contains(./(@*),"e")] Error: Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Windows XP, x86 Stack Trace: java.lang.ClassCastException: org.basex.query.path.AxisPath cannot be cast to org.basex.query.path.AxisStep org.basex.query.path.Path.optSteps(Path.java:154) org.basex.query.path.MixedPath.compPath(MixedPath.java:47) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.func.FuncCall.comp(FuncCall.java:64) org.basex.query.expr.Preds.comp(Preds.java:50) org.basex.query.path.AxisStep.comp(AxisStep.java:98) org.basex.query.path.AxisPath.compPath(AxisPath.java:108) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.QueryContext.compile(QueryContext.java:260) org.basex.query.QueryProcessor.compile(QueryProcessor.java:106) org.basex.core.cmd.AQuery.query(AQuery.java:78) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.gui.GUI.exec(GUI.java:416) org.basex.gui.GUI$5.run(GUI.java:366)
Query: doc("XPath test.xml")//*[contains(string(./(@*)),"e")] Error: Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Windows XP, x86 Stack Trace: java.lang.ClassCastException: org.basex.query.path.AxisPath cannot be cast to org.basex.query.path.AxisStep org.basex.query.path.Path.optSteps(Path.java:154) org.basex.query.path.MixedPath.compPath(MixedPath.java:47) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.func.FuncCall.comp(FuncCall.java:64) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.func.FuncCall.comp(FuncCall.java:64) org.basex.query.expr.Preds.comp(Preds.java:50) org.basex.query.path.AxisStep.comp(AxisStep.java:98) org.basex.query.path.AxisPath.compPath(AxisPath.java:108) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.QueryContext.compile(QueryContext.java:260) org.basex.query.QueryProcessor.compile(QueryProcessor.java:106) org.basex.core.cmd.AQuery.query(AQuery.java:78) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.gui.GUI.exec(GUI.java:416) org.basex.gui.GUI$5.run(GUI.java:366)
Query: doc("XPath test.xml")//*[string(./(@*))="2e"] Error: Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Windows XP, x86 Stack Trace: java.lang.ClassCastException: org.basex.query.path.AxisPath cannot be cast to org.basex.query.path.AxisStep org.basex.query.path.Path.optSteps(Path.java:154) org.basex.query.path.MixedPath.compPath(MixedPath.java:47) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.func.FuncCall.comp(FuncCall.java:64) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.expr.CmpG.comp(CmpG.java:135) org.basex.query.expr.Preds.comp(Preds.java:50) org.basex.query.path.AxisStep.comp(AxisStep.java:98) org.basex.query.path.AxisPath.compPath(AxisPath.java:108) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.QueryContext.compile(QueryContext.java:260) org.basex.query.QueryProcessor.compile(QueryProcessor.java:106) org.basex.core.cmd.AQuery.query(AQuery.java:78) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.gui.GUI.exec(GUI.java:416) org.basex.gui.GUI$5.run(GUI.java:366)
Query: doc("XPath test.xml")//*[./(@*)="2e"] Error: Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Windows XP, x86 Stack Trace: java.lang.ClassCastException: org.basex.query.path.AxisPath cannot be cast to org.basex.query.path.AxisStep org.basex.query.path.Path.optSteps(Path.java:154) org.basex.query.path.MixedPath.compPath(MixedPath.java:47) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.expr.Arr.comp(Arr.java:36) org.basex.query.expr.CmpG.comp(CmpG.java:135) org.basex.query.expr.Preds.comp(Preds.java:50) org.basex.query.path.AxisStep.comp(AxisStep.java:98) org.basex.query.path.AxisPath.compPath(AxisPath.java:108) org.basex.query.path.Path.comp(Path.java:83) org.basex.query.QueryContext.compile(QueryContext.java:260) org.basex.query.QueryProcessor.compile(QueryProcessor.java:106) org.basex.core.cmd.AQuery.query(AQuery.java:78) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.gui.GUI.exec(GUI.java:416) org.basex.gui.GUI$5.run(GUI.java:366)
The following one is good and shows the right answer:
Query: doc("XPath test.xml")//*[(@*)="2e"] Compiling: - pre-evaluating fn:doc("XPath test.xml") - optimizing descendant-or-self step(s) - applying attribute index Result: db:attribute("XPathtest", "2e")/parent::* Timing: - Parsing: 0.59 ms - Compiling: 30.36 ms - Evaluating: 1.67 ms - Printing: 0.17 ms - Total Time: 32.79 ms Result: - Results: 1 Item - Updated: 0 Items - Printed: 24 Bytes Query plan: <AxisPath> <IndexAccess data="XPathtest" type="ATTRIBUTE"> <Item value="2e" type="xs:string"/> </IndexAccess> <IterStep axis="parent" test="*"/> </AxisPath>
Important : This message is intended only for the recipient(s) identified above by the originator or forwarder of this message and may contain information that is confidential, proprietary and/or legally privileged. If you have any reason to believe or suspect that this message may have come to you in error, please notify the originator of this message of your receipt of it, refrain from sharing this message with anyone else, delete it from each computer or server on which it is stored (without copying it or printing it out) and take no other action based on its content. Thank you.