.. _functx_wrap-values-in-elements:
==============================
functx:wrap-values-in-elements
==============================
Wraps a sequence of atomic values in XML elements
Description
~~~~~~~~~~~
The functx:wrap-values-in-elements function takes a sequence of atomic values
and places each one inside an element with the name specified in $elementName.
The name must be specified as an xs:QName value. QNames can be constructed with
calls to the xs:QName type constructor or the fn:QName function, as shown in the
examples.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - values:string()
- the values to wrap in elements
* - elementName:string()
- the name of the elements to construct
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:wrap-values-in-elements((1,2,3), xs:QName('num'))
- 1 2 3
* - functx:wrap-values-in-elements((1,2,3), xs:QName('new:num'))
- 1 2 3
* - functx:wrap-values-in-elements((1,2,3), QName('http://newns','num'))
- 1 2 3
* - functx:wrap-values-in-elements((1,2,3), QName('http://newns','new:num'))
- 1 2 3