XQUERY/XSLT API DOCUMENTATION
6.0
All XQuery & XSLT Functions
MarkLogic Built-In Functions
Admin (xdmp:)
AppServer (xdmp:)
Classifier (cts:)
Debug (dbg:)
Document Conversion (xdmp:)
DurationDateTime (xdmp:)
Extension (xdmp:)
Documents, Directories, Properties, and Locks Functions
Extension Functions
Function Values Functions
HTTP Functions
JSON Functions
MarkLogic Server Functions
Search Functions
XML Functions
XQuery Context Functions
XSLT Functions
map (map:)
Math (math:)
Profile (prof:)
Search (cts:)
cts:query Constructors Functions
Geospatial Functions
Geospatial Lexicon Functions
Lexicon Functions
Math Lexicon Functions
Search Functions
Search Clustering Functions
Security (xdmp:)
Server Monitoring (xdmp:)
Spell (spell:)
Transaction (xdmp:)
Update (xdmp:)
XQuery Library Modules
Admin Library (admin:)
Actions Functions
Appserver Functions
Cluster Functions
Database Functions
Database Replication Functions
Forest Functions
Group Functions
Host Functions
Mimetypes Functions
Scheduler Functions
Alerting (alert:)
Configuration Packaging (package:)
CPF Functions
Content Processing Framework Functions (cpf)
CSS Conversion Functions (css)
DocBook Conversion Functions (dbk)
Domains Functions (dom)
Excel Conversion Functions (excel)
Generic Conversion Functions (cvt)
Links Functions (lnk)
MSWord Conversion Functions (msword)
PDF Conversion Functions (pdf)
Pipelines Functions (p)
Powerpoint Conversion Functions (ppt)
XHTML Conversion Functions (xhtml)
Custom Dictionary Management (cdict:)
Elastic Compute Cloud (ec2:)
Entity Enrichment (entity:)
Flexible Replication (flexrep:)
Geospatial Supporting Functions
GEO Functions
GeoRSS Functions
GML Functions
KML Functions
MCGM Functions
Information Studio (info:)
Information Studio Developer (infodev:)
JSON (json:)
Library Services (dls:)
cts:query Constructor Functions
Document Management Functions
Document Update Functions
Retention Policy Functions
XInclude Functions
Modular Documents
XInclude Functions
XPointer Functions
PKI (pki:)
Plugin (plugin:)
rest Library (rest:)
Search (search:)
Security-sec (sec:)
Spelling Dictionary Management (spell:)
Thesaurus (thsr:)
Triggers (trgr:)
Views (view:)
WordProcessingML (ooxml:)
ZIP Package (ooxml:)
W3C-Standard Functions
Accessor (fn:)
AnyURI (fn:)
Boolean (fn:)
Context (fn:)
DurationDateTime (xdmp:)
Error and Trace (fn:)
Higher-Order (fn:)
Node (fn:)
Numeric (fn:)
QName (fn:)
Sequence (fn:)
String (fn:)
XSLT (fn:)
REST API Reference
Client API
Management API
Packaging API
W3C XQuery/XSLT Reference
W3C XQuery Functions
W3C XQuery Language
W3C XSLT Language
This page was generated
June 25, 2015
8:17 AM
XQuery & XSLT Built-In & Modules Function Reference
Built-In: Higher-Order
The Higher-Order built-in functions are XQuery functions to support higher-order functions, and are part of the XQuery 3.0 working draft. They are defined in
XPath and XQuery Functions and Operators 3.0
.
Function Summary
fn:filter
Returns those items from the sequence $seq for which the supplied function $function returns true.
fn:fold-left
Processes the supplied sequence from left to right, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.
fn:fold-right
Processes the supplied sequence from right to left, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.
fn:function-arity
Returns the arity of the function(s) that the argument refers to.
fn:function-lookup
Returns a function with the given name and arity, or the empty sequence if none exists.
fn:function-name
Returns the QName of the function(s) that the argument refers to.
fn:head
Returns the first item in a sequence.
fn:map
Applies the function item $function to every item from the sequence $seq in turn, returning the concatenation of the resulting sequences in order.
fn:map-pairs
Applies the function item $function to successive pairs of items taken one from $seq1 and one from $seq2, returning the concatenation of the resulting sequences in order.
fn:tail
Returns all but the first item in a sequence.
Function Detail
fn:filter
(
$function as function(item()) as xs:boolean,
$seq as item()*
) as item()*
Summary:
Returns those items from the sequence $seq for which the supplied function $function returns true. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The function value.
$seq :
The function value.
Example:
fn:fold-left
(
$function as function(item()*, item()) as item()*,
$zero as item()*,
$seq as item()*
) as item()*
Summary:
Processes the supplied sequence from left to right, applying the supplied function repeatedly to each item in turn, together with an accumulated result value. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The fold function value.
$zero :
The zero argument.
$seq :
The sequence to fold
Example:
fn:fold-right
(
$function as function(item(), item()*) as item()*,
$zero as item()*,
$seq as item()*
) as item()*
Summary:
Processes the supplied sequence from right to left, applying the supplied function repeatedly to each item in turn, together with an accumulated result value. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The fold function value.
$zero :
The zero argument.
$seq :
The sequence to fold
Example:
fn:function-arity
(
$function as function(*)
) as xs:integer
Summary:
Returns the arity of the function(s) that the argument refers to. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The function value.
Example:
fn:function-lookup
(
$name as xs:QName,
$arity as xs:integer
) as function(*)?
Summary:
Returns a function with the given name and arity, or the empty sequence if none exists. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$name :
The QName of the function.
$arity :
The number of arguments the function takes.
Example:
fn:function-name
(
$function as function(*)
) as xs:QName?
Summary:
Returns the QName of the function(s) that the argument refers to. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The function value.
Example:
fn:head
(
$seq as item()*
) as item()*
Summary:
Returns the first item in a sequence. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$seq :
The function value.
Example:
fn:map
(
$function as function(item()) as item()*,
$seq as item()*
) as item()*
Summary:
Applies the function item $function to every item from the sequence $seq in turn, returning the concatenation of the resulting sequences in order. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The function value.
$seq :
The function value.
Example:
fn:map-pairs
(
$function as function(item(), item()) as item()*,
$seq1 as item()*,
$seq2 as item()*
) as item()*
Summary:
Applies the function item $function to successive pairs of items taken one from $seq1 and one from $seq2, returning the concatenation of the resulting sequences in order. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$function :
The map function value.
$seq1 :
The first sequence argument.
$seq2 :
The second sequence argument.
Example:
fn:tail
(
$seq as item()*
) as item()*
Summary:
Returns all but the first item in a sequence. For more details, see
XPath 3.0 Functions and Operators
.
Parameters:
$seq :
The function value.
Example:
Copyright © 2013 MarkLogic Corporation. All rights reserved.