list — Selects the first item of every argument sequence and returns the sequence of the selected items


sequence list ( seq1 sequence ,
  seq2 sequence ,
  ... ,
  seqN sequence );


This function calculates all given arguments from left to right, and creates a sequence which contains the first item of the first calculated sequence, then the first item of the second calculated sequence and so on. If the value of an argument is not a sequence, but a scalar, the scalar is treated as one-element sequence so it is added into the result. If the value of an argument is an empry sequence, nothing is added into the result (unlike function tuple() that adds an empty string in this case).

This function is not a part of XPATH 1.0 or XQUERY 1.0 libraries of standard functions.



The sequence of items, first of its items will be used as I-tn item of the resulting sequence

Return Types



Example 24.599. 

Compose a sequence of the first title in the document, then the first abstract, then the first introduction

list(/title, /abstract, /intro)