- From: Michael Kay <mike@saxonica.com>
- Date: Mon, 17 Dec 2007 10:38:05 -0000
- To: "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <www-xml-schema-comments@w3.org>, <bugzilla@wiggum.w3.org>
> I just looked at this bug text and one of the things it > recommends is using \d instead of [0-9]. However, as I > understand it, (sadly!) \d is equivalent to Unicode \p{Nd}, > which matches digits in many languages such as ARABIC-INDIC > DIGIT ZERO at character code 0660 and so on. Yes, I think you are right - [0-9] should not be replaced with \d. (Of course, if you're defining a restriction of a string that is already constrained then this doesn't matter. People, including the authors of the spec, often overlook the fact that when you're restricting a string that is already constrained, your regular expression doesn't need to repeat the constraints that are already present. For example, if you want to restrict xs:integer to be five digits, the pattern "....." is quite adequate.) Michael Kay http://www.saxonica.com/
Received on Monday, 17 December 2007 10:38:19 UTC