This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the xsl:where-populated instruction, if XPath 3.1 is in use, an empty array should be treated as "empty" for the purposes of the xsl:where-populated instruction. This appears to be the first case where we have to consider what happens if XPath 3.1 is enabled and XPath expressions are called that return arrays. There are probably other cases, e.g. what should "constructing complex content" do if the result of the sequence constructor contains an array?
I was asked to look more generally at what is needed to support arrays in XSLT 3.0, assuming that the XPath 3.1 option is implemented. The following changes are proposed: Section 2.1: Terminology When introducing the term "atomization" add a statement that the definition of atomization is extended in XPath 3.1 to apply to arrays, and that the extended definition applies to an XSLT processor that supports XPath 3.1. Section 2.1: Terminology Introduce SequenceType as a defined term, defined by reference to either XPath 3.0 or XPath 3.1 as appropriate; and replace links throughout the spec where SequenceType links directly to XPath 3.0 by a reference to this defined term. (This has the effect of making it clear that array types are allowed wherever we allow a SequenceType, provided XPath 3.1 is supported). Section 5.7.1: Constructing complex content Add before list item 2, a new rule: 2. Any array in the sequence is flattened by applying the array:flatten function. (With a suitable note that points out this only arises if XPath 3.1 is supported). Note: array:flatten replaces an array by the sequence-concatenation of its members, recursively. It does not atomize any nodes contained in the array. Section 6.7: Built-in template rules Handle arrays as described in https://lists.w3.org/Archives/Public/public-xsl-wg/2015Sep/0004.html Section 8.4.1: add to the set of things that are "deemed-empty": An array whose size (number of members) is zero. Changes to section 19 (Streamability) will be addressed separately.
The proposed changes were accepted and have been applied.