Functions

A function call consists of the name of the function and a list of comma-separated expressions, which are the arguments to the function. Here is an example:

fn:concat("http://www.example.com/auction/", "1001")

This function call applies the built-in function fn:concat to the values of the literal expressions "http://www.example.com/auction/" and "1001" and returns the concatenation of its arguments.

A function's signature specifies the required types of its arguments and the type of its result. The XQuery specifications (see [XQ-FO]) provide the signatures for all built-in XQuery functions. Here is the signature for the function fn:concat:

fn:concat($op1 as xs:string ?, $op2 as xs:string ?) as xs:string

This signature specifies ...

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.