Kasimier T. Buchcik | 21edf9b | 2005-06-21 08:46:25 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 3 | elementFormDefault="qualified" |
| 4 | attributeFormDefault="unqualified"> |
| 5 | <xs:simpleType name="myDouble"> |
| 6 | <xs:union memberTypes="xs:double"> |
| 7 | <xs:simpleType> |
| 8 | <xs:restriction base="xs:string"> |
| 9 | <xs:pattern value="\s*(N/A)?\s*"/> |
| 10 | </xs:restriction> |
| 11 | </xs:simpleType> |
| 12 | </xs:union> |
| 13 | </xs:simpleType> |
| 14 | <xs:element name="element1" type="myDouble"/> |
| 15 | <xs:element name="element2"> |
| 16 | <xs:complexType> |
| 17 | <xs:simpleContent> |
| 18 | <xs:extension base="myDouble"> |
| 19 | <xs:attribute name="att" type="xs:string"/> |
| 20 | </xs:extension> |
| 21 | </xs:simpleContent> |
| 22 | </xs:complexType> |
| 23 | </xs:element> |
| 24 | </xs:schema> |