O'Reilly logo

Querying XML by Stephen Buxton, Jim Melton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C

Grammars

C.1 Introduction

In this appendix, we provide the grammar of SQL/XML and of XQuery. Both are presented in a variation of Backus-Naur Form (BNF) and both of these variations are called “extended BNF” (which XQuery calls EBNF). In each section, we summarize the meanings of the notations used in the grammar. We do not present the grammar for XPath 2.0, largely because it is a subset of the XQuery grammar.

C.2 XQuery Grammar

The XQuery grammar1 (which is used by all W3C specifications) involves a variation of EBNF that uses a notation derived from regular expressions. For example, in the XQuery grammar, the BNF nonterminal symbol digits is defined to be any sequence of one or more instances of the characters 0, 1, 2, 3, 4, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required