Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: RegEx [+\-] or [+-]?

From: "Michael Kay" <mike@--------.--->
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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent