O'Reilly logo

XQuery from the Experts: A Guide to the W3C XML Query Language by Philip Wadler, Jim Tivy, Jérôme Siméon, Michael Rys, Jonathan Robie, Michael Kay, Mary Fernández, Denise Draper, Don Chamberlin, Howard Katz - Editor

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

Literals and Comments

XQuery uses “smiley faces” to begin and end comments. This cheerful notation was originally suggested by Jeni Tennison. Here is an example of a comment:

(: Thanks, Jeni! :)

Note that XQuery comments are comments found in a query. XML documents may also have comments, like the comment found in an earlier example:

<!— document order —>

XQuery comments do not create XML comments—XQuery has a constructor for this purpose, which is discussed later in the section on constructors.

XQuery supports three kinds of numeric literals. Any number may begin with an optional + or – sign. A number that has only digits is an integer, a number containing only digits and a single decimal point is a decimal, and any valid floating-point ...

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