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

According to the narrative text following: 
http://www.w3.org/TR/xmlschema11-2/#nt-charRange case 1 should be valid as 
per the schema spec.

However, it could be argued that this is in the small print, and hence may 
have interoperability problems.  Case 2 is still valid, and less demanding 
of an implementation.  Hence you might want to choose to take the safer 
route.

Also, there's a big chance that the Java code just uses Java's standard 
regular expression library.  If this is the case then it might be difficult 
to change to get the desired behaviour.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML Schema to C++ data binding visit
 http://www.codalogic.com/lmx/
=============================================

----- Original Message ----- 
From: "Rao,Dr.,R.,SNL IT Filialen,4110,DA" <R.Rao@DeutschePost.de>
To: <xmlschema-dev@w3.org>
Sent: Tuesday, June 05, 2007 11:50 AM
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):30|[+](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ße 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@DeutschePost.de <mailto:R.Rao@DeutschePost.de>



________________________________

Dies ist eine Nachricht der Deutsche Post AG und kann vertrauliche, 
firmeninterne Informationen enthalten. Sie ist ausschließlich für die oben 
adressierten Empfänger bestimmt. Sind Sie nicht der beabsichtigte Empfänger, 
bitten wir Sie, den Sender zu informieren und die Nachricht sowie deren 
Anhänge zu löschen. Unzulässige Veröffentlichungen, Verwendungen, 
Verbreitung, Weiterleitung sowie das Drucken oder Kopieren dieser Mail und 
ihrer verknüpften Anhänge sind strikt untersagt.



Bitte denken Sie über Ihre Verantwortung gegenüber 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ürgen Weber

Sitz Bonn

Handelsregister-Nummer: Registergericht Bonn HRB 6792

USt-IdNr: DE 169838187

Received on Tuesday, 5 June 2007 15:49:44 UTC