W3C home > Mailing lists > Public > www-international@w3.org > January to March 2006

Re: Regular expressions should support \x{....} escapes

From: Martin Duerst <duerst@it.aoyama.ac.jp>
Date: Mon, 23 Jan 2006 17:39:01 +0900
Message-Id: <6.0.0.20.2.20060123172621.07592d60@localhost>
To: Paul.V.Biron@kp.org, derhoermi@gmx.net
Cc: public-qt-comments@w3.org, www-international@w3.org, www-xml-schema-comments@w3.org

At 08:28 06/01/21, Paul.V.Biron@kp.org wrote:

[Bjoern wrote:]

 >> To exclude e.g. code points designated for private use in Perl would be
 >> [^\x{E000}-\x{F8FF}\x{F0000}-\x{FFFFD}\x{10000}-\x{10FFFD}]. To express
 >> this with the regular expression format in XML Schema 1.0 one would have
 >> to use private use code points which one should not per W3C's character
 >> model
 >
 >I do not believe it would be a violation of the character model to refer
 >to private use code points in this context.

Definitely not. Even the Character Model itself uses the relevant
numbers to say exactly what is excluded. The Character Model makes
it perfectly clear why private use code points SHOULD not be used;
using the boundary codepoints in an expression explicitly to make
sure private codepoints are excluded is the most benign and positive
use of private codepoints one can immagine. The boundaries
of the private use areas change by private agreement.

 >C073 [1] is written as a
 >SHOULD NOT, not as a MUST NOT, and I believe that use of these code points
 >in a schema regex is perfectly appropriate, especially given C040 [2].

C040 is not very relevant here. Its purpose is to make sure that
W3C technology does not disallow the exchange of private use
codepoints in truely private exchanges, i.e. with private agreements.
For the regular expression above no private agreement is needed.

 >>The effect is that this design discourages sharing regular expressions,
 >>developers have to be aware of these subtle problems and convert between
 >>them by adding and subtracting character ranges, which is not unlikely
 >>to either introduce errors or persuade schema authors to use incorrect
 >>expressions so as to not depend on XML 1.1 support of schema validators
 >>(or query processors, or whatever invokes the engine).

I think Bjoern has a very valid point here.


Regards,    Martin.


 >[1] http://www.w3.org/TR/charmod/#C073
 >[2] http://www.w3.org/TR/charmod/#C040 
Received on Tuesday, 24 January 2006 00:45:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:06 GMT