Re: IS it possible to have a blank date element

Maybe you can use a union type:

<simpleType name="DateOrEmpty">
  <memberTypes="date">
    <simpleType>
      <restriction base="string">
        <length value="0"/>
      </restriction>
    <simpleType>
  </memberType>
</simpleType>

<element xsi:type="DateOrEmpty"/>

should now be valid.

> Hi
>  
> I am creating a schema that has amongst its elements a date element ie
> type
> = xs:date. This element is causing me a headache as it is not mandatory. I
> have been unable to find a way to allow this element to be left blank (I
> have tried setting minOcc to 0 but I get the error "Invalid value for
> datatype date"). I am beginning to thing that I will have to create a
> default of 9999-01-01 to allow people to skip over this field. Can anyone
> tell me different
>  
> Thanks
> 
> Helen 
> 
> 
> 
> 
> _______________________________________________________________________ 
> 
> The information contained in this email is confidential and is intended 
> for the use of the addressee only. Any unauthorised dissemination or 
> copying of this email, and any use of disclosure of information 
> contained in it, is strictly prohibited and may be illegal. 
> 
> Please let us know immediately by telephone if the email has been sent 
> to you in error (+44 1481 711166). 
> ________________________________________________________________________
> 

Received on Wednesday, 20 November 2002 12:21:33 UTC