<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29079</bug_id>
          
          <creation_ts>2015-08-24 11:02:07 +0000</creation_ts>
          <short_desc>[xslt 3.0] Support for arrays in XSLT 3.0</short_desc>
          <delta_ts>2015-10-29 12:42:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>122745</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-08-24 11:02:07 +0000</bug_when>
    <thetext>In the xsl:where-populated instruction, if XPath 3.1 is in use, an empty array should be treated as &quot;empty&quot; 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 &quot;constructing complex content&quot; do if the result of the sequence constructor contains an array?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123184</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-14 09:40:38 +0000</bug_when>
    <thetext>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 &quot;atomization&quot; 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 &quot;deemed-empty&quot;: An array whose size (number of members) is zero.

Changes to section 19 (Streamability) will be addressed separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123599</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-07 20:54:35 +0000</bug_when>
    <thetext>The proposed changes were accepted and have been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>