Hi Dmitri,
Trying customizing MyElement like this:
<xsd:element name="MyElement" type="MyComplexType" >
<xsd:annotation>
<xsd:appinfo>
<jaxb:class name="MyElement"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Regards,
-- Ed
Dmitri Colebatch wrote:
> Hi all,
>
> I would swear that this has been asked in one way or another but I
> must be searching for the wrong things. I have a schema like this:
>
> <xsd:schema
> targetNamespace="urn:missingRootElement"
> xmlns="urn:missingRootElement"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:complexType name="MyComplexType">
> <xsd:sequence>
> <xsd:element name="InnerString" type="xsd:string" maxOccurs="unbounded" />
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:element name="MyElement" type="MyComplexType" />
>
> </xsd:schema>
>
> and when I run xjc over it all I get is:
>
> parsing a schema...
> compiling a schema...
> missingrootelement\MyComplexType.java
> missingrootelement\ObjectFactory.java
> missingrootelement\package-info.java
>
> ie - there's no MyElement class.
>
> I suppose I'm asking two questions:
>
> 1. Is it possible to generate a MyElement class in the above example?
> 2. What is the rationale behind not generating a MyElement class by default?
>
> cheers
> dim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>