Hi
In a schema, I have an element definition as follow:
<xs:element name="XDateTime" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:dateTime">
<xs:pattern value="\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}
\p{Nd}{2}:\p{Nd}{2}:\p{Nd}{2}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
The idea is that a dateTime value in the XML document can be stored as:
YYYY-MM-DD HH:MM:SS instead of YYYY-MM-DDTHH:MM:SS
Now, when validating an XML file with this dateTime, it validates fine
in XMLSpy, but not under .NET. It appears that the .NET validator
completely ignores the xs:pattern part, even though the definition on
http://www.w3.org/TR/xmlschema-2/#dateTime specifies that a xs:dateTime
field can have a xs:pattern constraint.
It seems as though the xs:pattern definitions are ignored by .NET.
After some experimenting, I found that only MSXML version 6 correctly
validates using this schema.
Has anyone had any experience with this or similar issues under .NET?
Is there any way that I can "tune" the validator in .NET from my
application?
Using .NET 1.1 (with SP1)
Thank you
--