Skip to content

XForms ~ XPath Function Library ~ Standard Functions

Erik Bruchez edited this page Jul 29, 2015 · 3 revisions

HomeXFormsXForms ~ XPath Function Library

Introduction

The following functions are documented on this page:

  • XForms 2.0 functions
    • xf:valid()
    • xf:bind()
  • XSLT 2.0 functions
    • format-date()
    • format-dateTime()
    • format-time()
    • format-number()
  • eXforms functions
    • exf:relevant()
    • exf:readonly()
    • exf:required()
    • exf:sort()

XForms 2.0 functions

xf:valid()

[SINCE Orbeon Forms 4.3]

xf:valid() as xs:boolean
xf:valid($items as item()*) as xs:boolean
xf:valid($items as item()*, $relevant as xs:boolean) as xs:boolean
xf:valid($items as item()*, $relevant as xs:boolean, $recurse as xs:boolean) as xs:boolean

The valid() function returns the validity of XPath items, including instance data nodes.

xf:bind()

[SINCE Orbeon Forms 4.5]

xf:bind($id as xs:string) as node()*

This function returns the sequence of nodes associated with the bind specified by the id parameter.

XSLT 2.0 functions

The following functions from XSLT 2.0 are available:

The following functions from XSLT 2.0 are available:

eXforms functions

eXForms was a suggested set of extensions to XForms 1.0, grouped into different modules. Orbeon Forms supports the exf:mip module, which includes the following functions:

  • exf:relevant()
  • exf:readonly()
  • exf:required()

NOTE: These functions will be available as part of XForms 2.0 support.

Orbeon Forms also supports the following from the sorting module:

exf:sort(
    $sequence   as item()*,
    $sort-key   as xs:string,
    $datatype   as xs:string?,
    $order      as xs:string?,
    $case-order as xs:string?
) as item()*

Note that the second argument is interpreted as a string, unlike with xxf:sort():

<xf:itemset ref="exf:sort(instance('samples-instance')/file, '@name', 'text', 'ascending')">
    ...
</xf:itemset>

eXForms functions live in the http://www.exforms.org/exf/1-0 namespace, usually bound to the prefix exf or exforms.

Clone this wiki locally