In fact Saxon doesn't accept any kind of constructor (direct or computed) after a leading "/", and it doesn't accept an ordered{} or unordered{} expression either, all of which are legal according to the BNF. 
 
I think there is room for debate on what is legal here, and I have therefore raised a bug against the spec: see
 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5727
 
I won't change the Saxon parser until the WG rules on this bug.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Rademacher, Gunther
Sent: 01 June 2008 21:24
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: [saxon] XQuery syntax error

Saxon's XQuery parser apparently does not accept a direct constructor
following a leading slash in a path expression, as in

    document{<a/>}/(/<b/>)

The resulting expression may not be particularly useful, but isn't it
valid per the grammar in the XQuery recommendation?

Best regards,
Gunther


Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany, – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/ Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), David Broadbent, Mark Edwards, Dr. Peter Kürpick,Arnd Zinnhardt; - Aufsichtsratsvorsitzender/ Chairman of the Supervisory Board: Frank F. Beelitz - http://www.softwareag.com