W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2016

[Bug 29445] New: [XT30] select-2305, concatenation of sequences of strings

From: <bugzilla@jessica.w3.org>
Date: Wed, 10 Feb 2016 20:08:07 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29445-523@http.www.w3.org/Bugs/Public/>

            Bug ID: 29445
           Summary: [XT30] select-2305, concatenation of sequences of
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The essential part of this evolves around the following instruction:

   <t:sequence select="('a','b','c','d')"/>

xsl:value-of has a seqtor that contains an xsl:sequence. I think this is
supposed to work as follows:

1) the @select is evaluated, returning a sequence of four strings
2) the xsl:value-of's seqtor is evaluated, which returns the result of
xsl:sequence, which is a sequence of four strings
3) section 5.7.2 Constructing Simple Content kicks in because the instruction
creates a text node, this goes as:

3.1) zero-length text nodes are discarded, adjacent text nodes joined (n/a)
3.2) sequence is atomized and cast to a string (n/a, already seq of strings)
3.3) strings are concatenated with a default separator: #x20
3.4) the result is "a b c d"

This then becomes a text node, which is appended to <a> following "Constructing
Complex Content".

The crux is, I think, that this construct does not return a sequence of four
text nodes (which would then be concatenated without spaces), but a sequence of
one text node, already created by xsl:value-of.

This test has been around for a while (4 years) and I only noticed it today
because we fixed a similar bug in another location (principle result tree with
build-tree options) leading to this test failing. I think we were having it
wrong all along.

If you would agree, I'll update the expected result.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 10 February 2016 20:08:16 UTC

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