Re: Problem validating canonical form of dateTime

It seems you might create a user-defined simpleType with union of xs:date
and xs:dateTime, as follows:

<xs:simpleType name="myDateTime">
    <xs:union memberTypes="xs:date xs:dateTime" />
</xs:simpleType>

and then use "myDateTime" for example to validate the value.


On Tue, Oct 12, 2010 at 1:19 PM, Nicolas Voillot <
n.voillot@bbsconception.com> wrote:

> Hello,
>
> I'm writting some xsd and xml related files and I encounter some problems
> when I try to validate dateTime nodes with your validator (
> http://www.w3.org/2001/03/webdata/xsv) : when the dateTime value is
> writted with the lexical form (for example "2009-09-09T00:00:00"), the
> validator is ok, but when the dateTime value is writted with the canonical
> form (for example "2009-09-09", see
> http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime-lexical-reprand next paragraph), the validator is not ok.
> I have this message :
> Invalid per cvc-complex-type.1.2.2: element content failed type check:
> 2009-09-09 is not a valid dateTime literal
>
> Could you explain my error or correct the problem ?
>
> Best regards,
>    Nicolas Voillot BBS Conception    n.voillot@bbsconception.com
>  Tel. : 03 58 05 60 19 12 rue Colbert -  BP 382
> 63 010 Clermont-Ferrand Cedex 1
> Tel. : 04 73 34 96 64
> Fax : 03 57 75 63 54
> www.bbsconception.com
>



-- 
Regards,
Mukul Gandhi

Received on Tuesday, 12 October 2010 09:19:45 UTC