[
Lists Home |
Date Index |
Thread Index
]
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" >
<xs:complexType name="Person">
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="age" type="xs:positiveInteger" />
<xs:element name="ssn" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="SeniorCitizen">
<xs:complexContent>
<xs:restriction base="Person">
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="age" type="sixtyFiveOrOlder" />
<xs:element name="ssn" type="xs:string" />
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="sixtyFiveOrOlder">
<xs:restriction base="xs:positiveInteger">
<xs:minInclusive value="65" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
-----Original Message-----
From: Maciejewski, Thomas [mailto:Thomas.Maciejewski@lehman.com]
Sent: Fri 8/30/2002 11:41 AM
To: 'xml-dev@lists.xml.org'
Cc:
Subject: [xml-dev] inheritance by restriction
I am a little confused about how to do the following:
Lets say I have a person complex type with name, age, and social security
number
Now I want to create a senior citizen complex type that inherits from person
but is only for ages 65 and above.
How do I create this restriction on the complex type?
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
|