Minor problem in Iso8601DateTime pattern defintion in XML-Schema

Description

In XML-Schema (http://www.openehr.org/releases/1.0.2/its/XML-schema/documentation/BaseTypes.xsd.html#h-393819110) the defintion of Iso8601DateTime is:
<xs:simpleType name="Iso8601DateTime">
<xs:restriction base="xs:string">
<xsattern
value="\d{4}((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([]((0\d)|(1[0-2]))(00|30)?))?)?)?)|((0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d)?)?)?(Z|([+-]((0\d)|(1[0-2]))(00|30))?))?)?)?)?"
/>
</xs:restriction>
</xs:simpleType>

but the scope of last '?' may be ambiguos and not all XML validation tools interpretate it in the same manner. To remove this ambiguity, I suggest to add a parenthisis, as in the following:

<xs:simpleType name="Iso8601DateTime">
<xs:restriction base="xs:string">
<xsattern
value="\d{4}(((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([]((0\d)|(1[0-2]))(00|30)?))?)?)?)|((0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d)?)?)?(Z|([+-]((0\d)|(1[0-2]))(00|30))?))?)?)?))?"
/>
</xs:restriction>
</xs:simpleType>

Environment

None

Activity

Show:
Thomas Beale
May 21, 2015, 3:17 PM

Code24 has implemented the suggested change - has anyone else seen this?

Reporter

Moretti Leonardo

Labels

None

Components

Affects versions

Priority

Minor
Configure