Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RegEx [+\-] or [+-]? [Thread Next] RE: RegEx [+\-] or [+-]?To: "'Rao,Dr.,R.,SNL IT Filialen,4110,DA'" <R.Rao@------------.-->, <xmlschema-dev@--.---> Date: 6/5/2007 6:26:00 PM The Microsoft schema processor (from my observations) allows very many
regular expressions that are not permitted by the XML schema =
specification.
In fact, I believe it just uses the .NET regex parser unchanged.
There's a long and tortuous history of errors, errata, corrections to
errata, and withdrawn errata in the area of hyphens within square =
brackets.
It's my belief that the current intent of the spec is to permit [+-], =
though
there's still a contradiction between the grammar and the text; given =
the
history, it's not at all surprising if you find products that don't =
permit
it.
So:
(a) the fact that Microsoft accept it proves nothing,
(b) [+-] should be OK,
(c) it's not surprising if some (especially older) products reject it
(d) [+\-] should be safe.
Michael Kay
http://www.saxonica.com/
_____
From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] =
On
Behalf Of Rao,Dr.,R.,SNL IT Filialen,4110,DA
Sent: 05 June 2007 11:50
To: xmlschema-dev@w...
Subject: RegEx [+\-] or [+-]?
The regEx below make restrictions on the UTC-Offset in the datetime data
type.
We found out that the expression 1 makes no problem with the Microsoft
parser (.net 2.0).
A third party which receives data from us, uses Java and have problems =
with
1. They would like the expression 2.
1: <xs:pattern
value="\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d([+-](0[0-9]|1[0-2]):00|[+-](03|09=
):30|
[+](13|14):00|[+](04|05|06|10|11):30|[-]08:30)"/>
2: <xs:pattern
value="\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d([+\-](0[0-9]|1[0-2]):00|[+\-](03|=
09):3
0|[+](13|14):00|[+](04|05|06|10|11):30|[\-]08:30)"/>
Which is the recommended expression?
Thanks, Roberto
Dr. Roberto Rao
Deutsche Post AG
SNL IT FILIALEN
4110-5 / Architektur
Poststra=DFe 4-6, Raum B 03a
64293 Darmstadt
Tel: (0 61 51) 9 07 31 18
Fax: (0 61 51) 3 90 94 10 01
Mobil: (0170) 9 27 06 87
E-Mail: <mailto:R.Rao@D...> mailto:R.Rao@D...
________________________________
Dies ist eine Nachricht der Deutsche Post AG und kann vertrauliche,
firmeninterne Informationen enthalten. Sie ist ausschlie=DFlich f=FCr =
die oben
adressierten Empf=E4nger bestimmt. Sind Sie nicht der beabsichtigte =
Empf=E4nger,
bitten wir Sie, den Sender zu informieren und die Nachricht sowie deren
Anh=E4nge zu l=F6schen. Unzul=E4ssige Ver=F6ffentlichungen, =
Verwendungen,
Verbreitung, Weiterleitung sowie das Drucken oder Kopieren dieser Mail =
und
ihrer verkn=FCpften Anh=E4nge sind strikt untersagt.
Bitte denken Sie =FCber Ihre Verantwortung gegen=FCber der Umwelt nach, =
bevor
Sie diese Email ausdrucken!
Deutsche Post AG
Aktiengesellschaft
Vorstand: Dr. Klaus Zumwinkel (Vorstandsvorsitzender), John M. Allan, =
Dr.
Frank Appel, Prof. Dr. Edgar Ernst, John P. Mullen, Dr. Hans-Dieter =
Petram,
Walter Scheurle, Prof. Dr. Wulf von Schimmelmann
Vorsitzender des Aufsichtsrates: Dr. J=FCrgen Weber
Sitz Bonn
Handelsregister-Nummer: Registergericht Bonn HRB 6792
USt-IdNr: DE 169838187
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
