Explain the concept of XQuery - Sequence,
Atomization, Quantification, Type promotion - March 09, 2009 at
11:00 AM by Amit Satpute
Explain the concept of XQuery - Sequence, Atomization,
Quantification, Type promotion
Sequence
-
A sequence can be constructed by using the comma operator, which evaluates each
of its operands and concatenates the resulting sequences into a single
sequence.
-
Empty parentheses denote an empty sequence.
-
A sequence can contain duplicate atomic values or nodes
-
A sequence is never an item in another sequence.
-
A sequence resulted out of the concatenation of two or more sequences contain
all the items of the input sequences. Its length is the sum of those sequences.
Atomization
-
Atomization of a sequence is defined as the result of invoking the data
function on the sequence.
-
The semantics of some XQuery operators depend on a process called atomization.
-
When the value is used in a context in which a sequence of atomic values is
required, atomization is applied to a value.
-
The result of atomization is either a sequence of atomic values or a type
error.
Quantification
-
A quantified expression begins with a quantifier like 'some' or 'every'. It is
followed by one or more in-clauses that are used to bind variables.
-
A binding sequence for a variable is a variable that is associated with each
in-clause expression that returns a sequence of items.
-
The in-clauses generate tuples of variable bindings.
Type promotion
Type promotion is used in evaluating:
-
function calls
-
order by clauses
-
operators that accept numeric or string operands.
Under certain circumstances, an atomic value can be promoted from one type to
another.
|