Whitespace in Queries
Whitespace (spaces, tabs, and line breaks) is allowed almost anywhere in a query to break up expressions and make queries more readable. You are required to use whitespace to separate keywords from each other—for example, order by cannot be written as orderby. Extra whitespace is acceptable, as in order by. By contrast, you are not required to use whitespace as a separator when using nonword symbols such as = and (. For example, you can use a=b or a = b.
In most cases, whitespace used in queries has no significance. Whitespace is significant in quoted strings, e.g., in the expression "contains spaces", and in constructed elements and attributes.
No special end-of-line characters are required in the XQuery language as they might be in some programming languages. Newline and carriage return characters are treated like any other whitespace.
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