xsd:date and xsd:pattern together for custom data type

Hi I got a question, I want the solution something like, mentioned in the
below URL for custom datatype for date.

http://lists.w3.org/Archives/Public/xmlschema-dev/2001Jul/0040.html

I've declared in the below format, but the XMLSpy tool is giving an error
the attribute tag is invalid child.

	<xsd:element name="eosdate">
	   	<xsd:simpleType>
			<xsd:restriction base="xsd:string">
				<xsd:pattern value="[0,1]{1}[0-9]{1}/[0-3]{1}[0-9]{1}/[0-9]{2}"/>
			</xsd:restriction>
		</xsd:simpleType>
		<xsd:attribute name="value" type="xsd:date"/>
	</xsd:element>


or I also tried, declaring as a global element and use in the model

	   	<xsd:simpleType name="eosdate">
			<xsd:restriction base="xsd:string">
				<xsd:pattern value="[0,1]{1}[0-9]{1}/[0-3]{1}[0-9]{1}/[0-9]{2}"/>
			</xsd:restriction>
          		<xsd:attribute name="value" type="xsd:date"/>
		</xsd:simpleType>

can any one of you please help me out.

Note: Basically I want the date like mm/dd/yy format having the valid values
01/01/00 to 12/31/99'

thanks in advance
 Om
646-456-5087

Received on Tuesday, 29 October 2002 07:12:41 UTC