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

[Bug 15545] New: [QT3] Possible error in re00972?

From: <bugzilla@jessica.w3.org>
Date: Fri, 13 Jan 2012 16:09:11 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-15545-523@http.www.w3.org/Bugs/Public/>

           Summary: [QT3] Possible error in re00972?
           Product: XPath / XQuery / XSLT
           Version: Member-only Editors Drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
        AssignedTo: benjie.nguyen@gmail.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

This test is as follows:

(every $s in tokenize('33a33', ',') satisfies matches($s,
) and (every $s in tokenize('33a34', ',') satisfies not(matches($s,

Part of this involves checking that

matches('33a33', '^(?:(\d*){0,2}a\1)$') 

is true.

If I understand the spec correctly, (\d*) can be matched 0 to 2 times.
\d* matches '33' once, then matches '' (the empty string) on a second pass. 
The spec states that:

"If a sub-expression matches more than one substring (because it is within a
construct that allows repetition), then only the last substring that it matched
will be captured."

thus, the back reference \1 has the value '', not the (presumably expected)
value '33'.

If my understanding is correct, there are related problems in the following


Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 13 January 2012 16:11:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:47 UTC