Chapter 4. Functions and Modules

Introduction

In any programming language, functions are one of the most powerful tools available to a developer. XQuery provides both a large built-in function library and the ability to create your own functions. XQuery also allows implementations to interoperate with externally defined functions from other languages.

Every XQuery function has a qualified name, zero or more typed arguments, and a return type. Together, these constitute a function's signature. User-defined functions also have a function body (an XQuery expression that defines the function's behavior).

This chapter finishes laying the foundation of XQuery by describing how to invoke built-in and external functions and how to create and invoke user-defined ...

Get XQuery: The 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.