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

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsdm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: XML Schema from CIM MOF - Subclassing Defined Using the <extension> Tag


I had the action from yesterday's call to send a specific example of "subclassing" using the <extension> tag.  Here it is an exemplary algorithm:
 
All classes are defined as <complexType>s with  a standard name  format, such as "(class_name)_Class".  All properties are defined as <element>s with name="(property_name)", within <sequence> tags. The inheritance hierarchy is reflected using <extension> tags within <complexContent> tags.  This allows the superclass to be specified as the "base" for the extension. If the class is abstract, then the abstract="true" qualification is added. For example,

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

            <xs:annotation>

                  <xs:documentation>The superclass for all non-association classes</xs:documentation>  

            </xs:annotation>

            <xs:complexContent>

                  <xs:extension base="xcs:Top_Class">

                        <xs:sequence>

                              <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>

                        </xs:sequence>

                  </xs:extension>

            </xs:complexContent>

      </xs:complexType>

 
Andrea


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]