users@jaxb.java.net

Re: List handling

From: Robert Lowe <rmlowe_at_rmlowe.com>
Date: Sat, 29 Mar 2003 04:19:24 +0800

Does the customization need to go inside the element/attribute
declaration(s), rather than the complexType declaration? That seems to make
sense since a single type declaration could be used by multiple
elements/attributes, potentially with different names.


----- Original Message -----
From: "Malachi de AElfweald" <malachi_at_EOTI.ORG>
To: <JAXB-INTEREST_at_JAVA.SUN.COM>
Sent: Saturday, March 29, 2003 2:46 AM
Subject: Re: List handling


> On Fri, 28 Mar 2003 10:44:29 -0800, Kohsuke Kawaguchi
<Kohsuke.Kawaguchi_at_Sun.COM> wrote:
> >> Now, I realize that being able to override the method to, say
> >> 'getDirectories()' isn't really doable.
> >
> >Why? Isn't it just a matter of:
> >
> > <xs:element name="foo" type="xs:NMTOKENS">
> > <xs:annotation><xs:appinfo>
> > <jaxb:property name="Foos" />
> > </xs:appinfo></xs:annotation>
> > </xs:element>
> >
> >or are you saying that this much typing is not practical?
>
> I am not sure I follow. I tried the following, but it didn't change
anything.... the method is still called getAttribute()....
>
> <xsd:complexType name="attributeIntf">
> <xsd:annotation>
> <xsd:appinfo>
> <jaxb:class name="attribute"/>
> <jaxb:property name="attributeList"/>
> </xsd:appinfo>
> </xsd:annotation>
> <xsd:choice>
> <xsd:element name="value" type="valueIntf" minOccurs="0"
maxOccurs="unbounded"/>
> <xsd:element name="data" type="dataIntf"/>
> </xsd:choice>
> <xsd:attribute name="id" type="xsd:string"/>
> </xsd:complexType>