Reading the Syntax Diagrams
This book includes syntax diagrams as an option for readers who want a more visual representation of XQuery expression syntax. Each syntax diagram is accompanied by explanatory text and examples. Figure P-1 illustrates the components of a syntax diagram, showing the schema import syntax as an example.

Figure P-1. Example syntax diagram
Rules for interpreting the syntax diagrams are:
Parts of the diagram in
constant widthfont are literal values. In Figure P-1,import schemaandatshould appear literally in your query.Quotes that appear in syntax diagrams also must appear in your query. Figure P-1 shows that the
<namespace-name>must be surrounded by quotes, whereas the<prefix>must not. Either single or double quotes can be used in XQuery, but only double quotes are included in the diagrams for simplicity.Where you can specify a value, such as a name, a descriptive name for that value appears in constant width italic and is surrounded by angle brackets. Figure P-1 shows that you fill in the
<namespace-name>,<prefix>, and<location>with your own values.Multiple options are indicated by parallel lines in the diagram. Figure P-1 shows that you may choose to specify a namespace prefix or
default element namespace.Optional parts of the expression are indicated by an arrow that bypasses the main arrow. In Figure P-1, it is not necessary to include ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access