OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   multi-inheritance

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: multi-inheritance
  • From: =?gb2312?B?ZmNft72zrA==?= <fangc@bsoft.com.cn>
  • Date: Thu, 24 Apr 2003 17:45:08 +0800
  • Thread-index: AcMKRW19kKxrRa0dRDyizTi4wzIzAAAACx7A
  • Thread-topic: multi-inheritance

Hi,

I ve got some problem here!

 

Did the schema could handle the problem of multi-deriving?if it could,how could I write the xml instance document?if it couldn’t how could I solve the multi-deriving problem?

<xs:schema targetNamespace="urn:xmlns:25hoursaday-com:customer" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cust="urn:xmlns:25hoursaday-com:customer" elementFormDefault="qualified">

   <xs:complexType name="Person" abstract="true">

       <xs:all>

          <xs:element name="Name"/>

          <xs:element name="Job"/>

          <xs:element name="Power">

             <xs:simpleType>

                 <xs:restriction base="xs:string">

                    <xs:enumeration value="10Pounds"/>

                    <xs:enumeration value="1000Pounds"/>

                 </xs:restriction>

             </xs:simpleType>

          </xs:element>

       </xs:all>

   </xs:complexType>

   <xs:complexType name="Man">

       <xs:complexContent>

          <xs:extension base="cust:Person">

             <xs:all>

                 <xs:element name="married"/>

             </xs:all>

          </xs:extension>

       </xs:complexContent>

   </xs:complexType>

   <xs:complexType name="SuperMan">

       <xs:complexContent>

          <xs:restriction base="cust:Man">

             <xs:all>

                 <xs:element name="Name"/>

                 <xs:element name="Job"/>

                <xs:element name="Power">

                    <xs:simpleType>

                       <xs:restriction base="xs:string">

                           <xs:enumeration value="10Pounds"/>

                       </xs:restriction>

                    </xs:simpleType>

                 </xs:element>

             </xs:all>

             <xs:all>

                 <xs:element name="married"/>

             </xs:all>

          </xs:restriction>

       </xs:complexContent>

   </xs:complexType>

</xs:schema>

will it be right for schema definition?

 

Thanx

 

Best Regards

Fbeyond





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS