RE: ORA-XQ-410-B: nested sequences

> SECTION 2: Basics
> 
> The language should allow for nested sequences. Nested 
> sequences (a.k.a sequences of sequences) will help in 
> returning a set of related values easily. The current 
> mechanism requires one to put those values inside an XML 
> element which removes node identities, typing etc. 
> 
>  Allowing nested sequence in later versions might be quite 
> hard because of implicit rules governing atomization, 
> normalization and concatenation of sequences.
> 

Actually, allowing nested sequences isn't impossible to graft on. You
can do it by defining a third kind of item: a sequence-reference. Then
you just need a pair of functions to create a reference to a sequence
and to dereference a seqref; and of course you need to review all the
existing functions and operators to say what they do when they encounter
a seqref; and of course you need some enhancements to the type system.
Which means that it's probably worth allocating a couple of years to the
task.

Michael Kay

Received on Friday, 20 February 2004 14:12:37 UTC