Maps and arrays Functions

Introduction

XPath 3.1 introduces maps and arrays. Orbeon Forms does not support XPath 3.1 yet, however it implements a subset of operations on maps and arrays.

Availability

[SINCE Orbeon Forms 2017.2]

Maps

Introduction

Orbeon Forms does not support the native XPath 3.1 syntax to create maps. But you can create a new map as follows using the map:merge() and map:entry() functions:

map:merge(
    (
        map:entry('number',   42),
        map:entry('string',   'forty-two'),
        map:entry('node',     instance()),
        map:entry('sequence', 1 to 10)
    )
)

map:entry()

XPath 3.1 documentation.

map:merge()

XPath 3.1 documentation.

map:get()

XPath 3.1 documentation.

Arrays

Introduction

Orbeon Forms does not support the native XPath 3.1 syntax to create arrays. But you can create a new array as follows using the array:join() and array:append() functions:

array:size()

XPath 3.1 documentation.

array:get()

XPath 3.1 documentation.

array:put()

XPath 3.1 documentation.

array:append()

XPath 3.1 documentation.

array:join()

XPath 3.1 documentation.