Jump to content

extend simpleType to complexType

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...