[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [ubl] Change requests for the next 1.0 schema generation
Michael,
You did bring up the
issue of facet restriction at the F2F. I
have talked to Gunther, and
Jessica and I did a quick test
with some code and it does
work. You are right that Format per se is not a built-in facet, but pattern is. We can use pattern in the derived
datatype to support the supplementary component of format. That was the
basis of the work that Gunther and Garret
did.
Code
follows:
<?xml version="1.0" encoding="UTF-8"?> < xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><xs:element name="ShipDate" type="OrderDate"/> <xs:element name="ShipDateNew" type="OrderDateNew"/> <xs:simpleType name="OrderDate"> <xs:restriction base="xs:date"/> </xs:simpleType> <xs:simpleType name="OrderDateNew"> <xs:restriction base="OrderDate"> <xs:enumeration value="2004-06-09"/> <xs:enumeration value="2004-06-15"/> </xs:restriction> </xs:simpleType> </xs:schema> Valid <?xml version="1.0" encoding="UTF-8"?> < ShipDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation ="C:\Documents and Settings\jglace\Desktop\Standards\RestrictTest.xsd">2004-03-05</ShipDate>
Invalid <?xml version="1.0" encoding="UTF-8"?> < ShipDateNew xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation ="C:\Documents and Settings\jglace\Desktop\Standards\RestrictTest.xsd">2004-06-30</ShipDateNew>Valid- if you assume Spy has implemented correctly, this proves that a restricted built-in that is again further restricted will have the additional constraints enforced. <?xml version="1.0" encoding="UTF-8"?> < ShipDateNew xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation ="C:\Documents and Settings\jglace\Desktop\Standards\RestrictTest.xsd">2004-06-09</ShipDateNew>Mark
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]