Getting Started with Types

We hope by now you are convinced of the value of a static type system. Now that we know what a static type system can do, we will describe how it works. The following sections describe how the type system assigns a type to different kinds of expressions. The expressions described include literals and operators, variables, function calls, conditionals, paths, FLWORs, and element constructors. We begin with a description of XML Schema, XQuery types, and XQuery values, and then explain how they all relate.

XML Schema and XQuery Types

The type system of XQuery is based on XML Schema, so to understand types in XQuery, we must first understand XML Schema. XML Schema has so many features, however, that we can only describe ...

Get XQuery from the Experts: A Guide to the W3C 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.