Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » extension base
extension base [message #597791] Fri, 17 March 2006 08:40
tatini venkate is currently offline tatini venkate
Messages: 19
Registered: July 2009
Junior Member
Hi

I am new to this group and XSD.

I have gone through news group and understand that to resolve extension
base elements we should use GetContentType(). But I was not able to
resolve.

Can any one please share me code snipped to resolve the below schema.

Advance Thanks
Param.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="Address">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="street" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
</xs:sequence>
<xs:attribute name="Person" type="xs:string"/>
</xs:complexType>
<xs:complexType name="USAddress">
<xs:complexContent>
<xs:extension base="Address">
<xs:sequence>
<xs:element name="state" type="xs:string"/>
<xs:element name="zip" type="xs:string"/>
</xs:sequence>
<xs:attribute name="Surname" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="NYAddress">
<xs:complexContent>
<xs:extension base="USAddress">
<xs:attribute name="RentControlled" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="address" type="NYAddress"/>
</xs:schema>
Previous Topic:XSD indent serialization using JDK 1.5
Next Topic:Stack overflow when opening XSD
Goto Forum:
  


Current Time: Wed Jul 23 10:08:47 EDT 2014

Powered by FUDForum. Page generated in 0.04828 seconds