Appendix E. Grammar
Introduction
This appendix provides an EBNF grammar for the XQuery language. This grammar differs from the official one printed in the standard only in presentation (for example, some names have been changed and some productions cleaned up to make the grammar easier to read).
XQuery borrows two definitions from the XML 1.0 and XML Names specifications: Char
and NCName
. Because these definitions involve large character tables, I didn't include them here but instead refer you to the URLs in the grammar below.
The XQuery grammar requires that characters be recognized and parsed differently in certain contexts (i.e., a context-sensitive lexer). For example, within element or attribute content, characters are parsed differently than ...
Get XQuery: The XML Query Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.