Take a look at XML Schema recommendation 1.0 and look up the
"complexContent" and "extension" elements.

--Keith

Michael Kleinhenz wrote:
> 
> Hi,
> 
> the documentation says that the SourceGenerator can create derived
> classes by defining a complex type at top level of the xsd and then
> referring to that complex type in a type attribute of an element.
> 
> This works fine, but how can I extend the derived class with new
> variables?
> 
> I've tried something like this, but it doesn't work:
> 
>  <xsd:element name="department">
>    <xsd:complexType>
>       <xsd:sequence>
>          <xsd:element name="name" type="xsd:string"/>
>          <xsd:element name="departmentaddress" type="address">
>             <xsd:complexType>
>                <xsd:sequence>
>                   <xsd:element ref="department" maxOccurs="unbounded"
>                   minOccurs="1"/>
>                </xsd:sequence>
>             </xsd:complexType>
>          </xsd:element>
>       </xsd:sequence>
>   </xsd:complexType>
> </xsd:element>
> 
> where "address" is the complex type defined at top level:
> 
> <xsd:complexType name="address">
>    <xsd:sequence>
>          <xsd:element name="street" type="xsd:string"/>
>          <xsd:element name="zip" type="xsd:integer"/>
>          <xsd:element name="city" type="xsd:string"/>
>          ...
>    </xsd:sequence>
> </xsd:complexType>
> 
> Any ideas?
> 
> -- Michael
> 
> --
> Michael Kleinhenz              LinuxTag 2002 - Europes largest Linux Expo
> [EMAIL PROTECTED]                           http://www.linuxtag.org/
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to