Jump to content

extend simpleType to complexType


immo_we

Recommended Posts

Hello, I try to extend a complexType/SimpleContent but the mixture of simple and complex seems to be a problem.Could you explain how I can create simple elements on one side with LOGIN_TYPE and extent this to to a complexType with subelements as HOST_TYPE <xs:element name="ipDevice"> <xs:complexType> <xs:sequence> <xs:element type="ivtb:HOST_TYPE" name="Comment" /> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="LOGIN_TYPE"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute type="xs:string" name="login" use="required" /> <xs:attribute type="xs:string" name="password" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="HOST_TYPE"> <xs:complexContent> <xs:extension base="ivtb:LOGIN_TYPE" > <xs:all> <xs:element name="OS" type="xs:string" default="no specified"/> </xs:all> </xs:extension> </xs:complexContent> </xs:complexType>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...