Kasimier T. Buchcik | bf442eb | 2005-11-30 11:24:18 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
| 3 | |
| 4 | <xsd:simpleType name="myDecimal"> |
| 5 | <xsd:restriction base="xsd:decimal"> |
| 6 | <xsd:totalDigits value="18"/> |
| 7 | </xsd:restriction> |
| 8 | </xsd:simpleType> |
| 9 | |
| 10 | <xsd:element name="foo"> |
| 11 | <xsd:complexType> |
| 12 | <xsd:sequence> |
| 13 | <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/> |
| 14 | <xsd:element name="ref" type="myDecimal" minOccurs="0"/> |
| 15 | </xsd:sequence> |
| 16 | </xsd:complexType> |
| 17 | |
| 18 | <!--xsd:key name="myKey"> |
| 19 | <xsd:selector xpath="val"/> |
| 20 | <xsd:field xpath="."/> |
| 21 | </xsd:key> |
| 22 | |
| 23 | <xsd:keyref name="myKeyRef" refer="myKey"> |
| 24 | <xsd:selector xpath="ref"/> |
| 25 | <xsd:field xpath="."/> |
| 26 | </xsd:keyref--> |
| 27 | </xsd:element> |
| 28 | |
| 29 | </xsd:schema> |