This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29079 - [xslt 3.0] Support for arrays in XSLT 3.0
Summary: [xslt 3.0] Support for arrays in XSLT 3.0
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 11:02 UTC by Michael Kay
Modified: 2015-10-29 12:42 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2015-08-24 11:02:07 UTC
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?
Comment 1 Michael Kay 2015-09-14 09:40:38 UTC
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.
Comment 2 Michael Kay 2015-10-07 20:54:35 UTC
The proposed changes were accepted and have been applied.