|
Re: how to validate dataTime with xsd [message #1461348 is a reply to message #1461113] |
Tue, 04 November 2014 13:09 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
You'd need to define your own simple type; one that has no relation to
any of the built-in date/time types. (It's probably not a good idea.)
On 04/11/2014 1:12 PM, giovanna zoppi wrote:
> good morning,
> i have a problem to validate my date or dataTime data with xsd.
> the only accepetd value is like yyyy-mm-dd for example 2014-11-04 or
> for dataTime is 2014-11-03T09:00:00.
> but how may i manage other data format?
> for example if i would accept value: 04/11/2014 how have to set my xsd?
>
> now my element data is an union of date and dataTime but in this way
> accept only standard format
> my xsd:
> <xs:simpleType name="newdata">
> <xs:union memberTypes="xs:date">
> <xs:simpleType>
> <xs:restriction base="xs:dateTime">
> </xs:restriction>
> </xs:simpleType>
> </xs:union>
> </xs:simpleType>
> <xs:element name="DATA" minOccurs="0" maxOccurs="1" type="newdata" />
>
> thanks a lot
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03258 seconds