Use these Java applets to check your syntax online, or as the basis for your own XPath 2.0 or XQuery implementation. They suport XML Query 1.0, XPath 2.0, and also the Full Text and Update drafts.
The applets are a tool for readers and parser implementers of XQuery 1.0 (http://www.w3.org/TR/xquery/) and XPath 2.0 (http://www.w3.org/TR/xpath20/). You can type in an expression and see the parse tree, or else obtain an error if the expression is syntactically incorrect. The results should not be used as an absolute reference, and may flag legal syntax or errors not intended by the drafts. However, the parser used was generated by processing the XML representation of the grammar, which is also used to produce the EBNF productions in the XPath and XQuery drafts. This parser is also used by the working groups to validate the integrity of the grammar. Implementers may wish to download the XPath 2.0/XQuery 1.0 Parser Build, xgrammar.zip, if they are interested in the parser production, and more details of this process.
This applet checks the grammar (the syntax) of expressions conforming to the W3C XPath 2.0 Recommendation of January 2007. The XML grammar and JavaCC/JJTree files are also linked from the applet page..
Use this applet to check the syntax of expressions written in XQuery 1.0: An XML Query Language, a W3C Recommendation of January 2007. The XML grammar and JavaCC/JJTree files are also linked from the applet page.
XQuery 1.0 and XPath 2.0 Full-Text Grammar Test Page.
This applet tests the grammar of expressions conforming to the May 2007 draft of XQuery 1.0 and XPath 2.0 Full-Text. The XML grammar and JavaCC/JJTree files are also linked from the applet page.
This applet tests the grammar of expressions conforming to the August 2007 draft of the XQuery Update Facility 1.0. The XML grammar and JavaCC/JJTree files are also linked from the applet page.
XQuery 1.0 and XPath 2.0 Formal Semantics Grammar Test Page
This applet tests the grammar of expressions conforming to the January 2007 W3C Recommendation XQuery 1.0 and XPath 2.0 Formal Semantics. The XML grammar and JavaCC/JJTree files are also linked from the applet page.
Internet Explorer users may need to install the Java browser plugin included in the Sun Java 2 Runtime Environment, Standard Edition (JRE): http://java.sun.com/products/plugin/ and may then also need to go to Internet Options and select the Java (Sun) Use JRE 1.5.0_01 for <applet> button as shown in this image.