W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2014

[Bug 27463] [XQ31] Arrays within element constructors

From: <bugzilla@jessica.w3.org>
Date: Fri, 28 Nov 2014 12:00:54 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-27463-523-hU6r5PL8eD@http.www.w3.org/Bugs/Public/>

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
The XQuery 3.1 specification states that when an array appears within the
content of an element constructor, it is atomized. For example

<a>{[<b/>, <c/>, <d/>]}</a>

produces the output


This seems to conflict with the decision we made for serialization, where we
said that if nodes appear within an array during JSON serialization, the nodes
are expanded using XML serialization. It also seems counter-intuitive since
element constructors do not normally atomize any nodes appearing within their
content; it seems odd to treat enclosed nodes differently just because they
appear within an array.

I think it would cause fewer surprises if an array appearing in such a context
were recursively flattened (that is, replacing $A by $A?*) rather than being

Incidentally, there is also a problem with the way the rules are given in
section rule 1.e.ii should appear before 1.e.i, because otherwise,
arrays are rejected by virtue of the fact that they are functions.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 28 November 2014 12:00:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:51 UTC