W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2007

[Bug 5251] [FO] Minimal match in starts-with(), ends-with()

From: <bugzilla@wiggum.w3.org>
Date: Tue, 06 Nov 2007 00:24:24 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1IpCEy-0002xC-BP@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5251

           Summary: [FO] Minimal match in starts-with(), ends-with()
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The rules for starts-with say that the value of $arg1 must start with a
sequence of collation units that provides a minimal match to the collation
units of $arg2.

Consider starts-with(" banana", " b") where space is an ignorable collation
unit. There is a match at the start of the string, but it is not a minimal
match. The first minimal match starts at the second character, "b". It
therefore seems that starts-with() should return false. This is
counter-intuitive, and surely not what the working group intended.

The same applies to ends-with(). I don't think that the other
substring-matching functions (contains, substring-before, substring-after) have
similar problems.
Received on Tuesday, 6 November 2007 00:24:31 UTC

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