users@jaxb.java.net

Re: Duplicate nested element

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Mon, 06 Sep 2004 10:00:47 +0200

Hi.

Lee Breisacher wrote:

> Hmm, I tried using jaxb:class to rename the classes, but I'm still
> getting compile errors in the resulting sources. Recall I have this
> schema fragment:
>
> <xsd:element name="TemplateTags">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="TemplateTags">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element
> name="TemplateTag" type="xsd:string" minOccurs="0"
> maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> I used a customization like this:
>
> <jxb:bindings
> node="/xs:schema/xs:element[@name='TemplateTags']">
> <jxb:class name="TemplateTagsInfo"/>
> </jxb:bindings>

Try this:

/xs:schema/xs:element[@name='TemplateTags']/xsd:complexType

Or thIs:

<xsd:element name="TemplateTags">
   <xsd:complexType>
        <xsd:annotation>
           <xsd:appinfo>
             <jaxb:class name="TemplateTagsInfo"/>
           </xsd:appinfo>
         </xsd:annotation>

                          <xsd:sequence>
                                  <xsd:element name="TemplateTags">
                                          <xsd:complexType>
                                                  <xsd:sequence>
                                                          <xsd:element
name="TemplateTag" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
                                                  </xsd:sequence>
                                          </xsd:complexType>
                                  </xsd:element>
                          </xsd:sequence>
                  </xsd:complexType>
          </xsd:element>


Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net