Product SiteDocumentation Site

6.3. fn:data (aka Atomization)

In XQuery, sequences can be atomized. Atomization is defined by invoking fn:data.
fn:data($arg as item()*) as xs:anyAtomicType*
The error conditions of fn:data($arg) are extended as follows. An error is raised (jerr:JNTY0004) if an item in the sequence is an object or an array.
Example 6.2. Atomization of JSONiq items
          fn:data( {"foo" : 3} )		          jerr:JNTY0004
          fn:data( [1] )			                jerr:JNTY0004
          fn:data( {"foo" : 3, "bar" : 4 } )	jerr:JNTY0004
          fn:data( { } )			                jerr:JNTY0004