# Extensions

The full library of Saxon and EXSLT functions described in extensions.html is available, except for those (such as `saxon:serialize`) that have an intrinsic dependency on an XSLT stylesheet.

An XQuery option declaration is defined allowing a default value to be specified for a query parameter (external variable). The syntax is illustrated below:

    declare namespace saxon="http://saxon.sf.net/";
    declare option saxon:default "20";
    declare variable $x external;

The default value is written as an XPath expression. The surrounding quotes are part of the "declare option" syntax, not part of the expression: therefore, if the default value is to be supplied as a string literal, two sets of quotes are needed. In the above example, the default value is the integer 20, not a string. Perhaps it would be clearer to show this by writing `saxon:default "(+20)"`

Expand | Next