[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to take union of elements inside two different complex types?

From: nandanprasad <pola_nandana@emc.com>
Date: Mon, 16 Apr 2007 03:04:45 -0700 (PDT)
Message-ID: <10013359.post@talk.nabble.com>
To: xmlschema-dev@w3.org
How to take union of elements inside two different complex types?


I've an xsd CIM_ManagedSystemElement.xsd in which the following is defined.

<xs:complexType name="CIM_ManagedSystemElement_Type">
        <xs:sequence>
            <xs:element ref="class:HealthState" minOccurs="0"/>
            <xs:element ref="class:InstallDate" minOccurs="0"/>
            <xs:element ref="class:Name" minOccurs="0"/>
            <xs:element ref="class:OperationalStatus" maxOccurs="unbounded"
minOccurs="0"/>
            <xs:element ref="class:Status" minOccurs="0"/>
            <xs:element ref="class:StatusDescriptions" maxOccurs="unbounded"
minOccurs="0"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" 
                    maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##any" processContent="lax"/>
    </xs:complexType>
     <xs:element name="CIM_ManagedSystemElement"
type="class:CIM_ManagedSystemElement_Type"/>

and another xsd named CIM_ManagedElement.xsd with the follwoing content:

<xs:complexType name="CIM_ManagedElement_Type">
        <xs:sequence>
            <xs:element ref="class:Caption" minOccurs="0"/>
            <xs:element ref="class:Description" minOccurs="0"/>
            <xs:element ref="class:ElementName" minOccurs="0"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" 
                    maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##any" processContents="lax"/>
    </xs:complexType>
<xs:element name="CIM_ManagedElement" type="class:CIM_ManagedElement_Type"/>

Now, I want to relate these two xsd's elements(as CIM_ManagedSystemElement
extends CIM_ManagedElement) inside a third xsd, called cls_hierarchy.xsd.
i.e CIM_ManagedSystemElement element must include the elements inside the
CIM_ManagedElement also.

How can I do this?? please help.

-- 
View this message in context: http://www.nabble.com/How-to-take-union-of-elements-inside-two-different-complex-types--tf3583517.html#a10013359
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
Received on Monday, 16 April 2007 10:04:52 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.