On Wed, Jan 8, 2014 at 11:44 AM, David Carlisle <dav...@nag.co.uk> wrote:
> On 08/01/2014 11:36, Ihe Onwuka wrote: > >> No. I am saying that if the expression is an attrtibute constructor then >> atomization should be atomic. >> > > > OK so I'm completely lost as I don't understand what you expect. > > <person>{$thing/@name}</person> > > simply copies an attribute node from wherever it is to the newly > constructed <person> element. Atomization is just not relevant, the node is > already an attribute node (with a value that is atomic) the node is just > copied to the tree being generated. > > <things> <thing name="Peter" sex="M"/> <thing name="Pan" sex="M"/> <thing name="Jemma" sex="F"/> <thing name="Janice" sex="F"/> <things> for $t in things/thing group by $sex:=$t/@sex return <something>{$t/@sex}</something> the effect of the group by turns {$t/@sex} into a sequence of attribute nodes and the processor (at least eXist) will barf about duplicate attributes instead of atomizing them. Why barf - duplicate atttributes are not allowed and demand an explicit atomization? It is possible that thing/@name may be a sequence of nodes by the time it reaches > >
_______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk