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

[Bug 29407] New: [QT3] analyze-string-008, nested grouping

From: <bugzilla@jessica.w3.org>
Date: Sat, 30 Jan 2016 04:34:14 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29407-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29407

            Bug ID: 29407
           Summary: [QT3] analyze-string-008, nested grouping
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

I have trouble understanding why the expected test result is correct here. The
test is: analyze-string("banana", "(a(n?))")

This can be interpreted as:
b  -- non-match
an -- match, group 1: an, group 2: n
an -- match, group 1: an, group 2: n
a  -- match, group 1: a, group 2: <empty> or absent

A valid outcome, I think, is the following:

<fn:analyze-string-result xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <fn:non-match>b</fn:non-match>
    <fn:match>
        <fn:group nr="1">an<fn:group nr="2">n</fn:group></fn:group>
    </fn:match>
    <fn:match>
        <fn:group nr="1">an<fn:group nr="2">n</fn:group></fn:group>
    </fn:match>
    <fn:match>
        <fn:group nr="1">a<fn:group nr="2" /></fn:group>
    </fn:match>
</fn:analyze-string-result>

This is not the same as the current expected outcome, which assumes that "n" is
not part of group 1.

I'm unsure whether the spec mandates that an empty group *must* be specified,
or *may* be absent. Though I see no harm in doing so, I can't readily find this
in the spec.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 30 January 2016 04:34:33 UTC

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