users@jaxb.java.net

Bind directly to List of elements

From: hallwyl <hallwyl_at_diku.dk>
Date: Tue, 18 Sep 2007 14:32:20 -0700 (PDT)

Consider the schema fragment below. Is it possible to bind references to an
element (cookies) of a type (tCookies) that only consists a sequence of one
type of elements (cookie) directly to a List? So that, whenever <xsd:element
ref="cookies" /> appear it would bind to "List<Cookie> cookies", rather than
"Cookies cookies"?

   <xsd:element name="cookies" type="tCookies"/>
   <xsd:complexType name="tCookies">
      <xsd:sequence>
         <xsd:element ref="cookie" maxOccurs="unbounded"/>
      </xsd:sequence>
   </xsd:complexType>
   
   <xsd:element name="cookie" type="tCookie"/>
   <xsd:complexType name="tCookie">
      <xsd:attribute name="name" type="xsd:NCName" use="required"/>
   </xsd:complexType>

-- 
View this message in context: http://www.nabble.com/Bind-directly-to-List-of-elements-tf4477267.html#a12766574
Sent from the java.net - jaxb users mailing list archive at Nabble.com.