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

External Functions and Variables

XQuery implementations are often embedded in an environment such as a Java or C# program or a relational database. The environment can provide external functions and variables to XQuery. To access these, a query must declare them in the prolog:

define function outtie($v as xs:integer) as xs:integer external

define variable $v as xs:integer external

XQuery does not specify how such functions and variables are made available by the external environment, or how function parameters and arguments are converted between the external environment and XQuery.

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