No, there isn't. A <xs:choice> happens to be a first class member at the
XML schema spec level, and as such has pretty much semantic meaning
attached to it. As such, there needs to be a separate class to represent
that semantic logic.

Werner

Ronald R. DiFrango wrote:
> All,
> 
> I have the following XSD fragment:
> 
> <xs:element name = "detailLine">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:choice>
>                     <xs:element ref = "rtvNumber"/>
>                     <xs:element ref = "cmNumber"/>
>                     <xs:element ref = "keyRecNo"/>
>                 </xs:choice>
>                 <xs:element ref = "lineNumber"/>
>                 <xs:element ref = "brand"/>
>                 <xs:element ref = "class"/>
>                 <xs:element ref = "model"/>
>                 <xs:element ref = "originalQuantity"/>
>                 <xs:element ref = "availableQuantity"/>
>                 <xs:element ref = "itemCost"/>
>                 <xs:element ref = "extendedCost"/>
>                 <xs:element ref = "cmRtvNumber" minOccurs = "0"/>
>                 <xs:element ref = "effectivePrice" minOccurs = "0"/>
>                 <xs:element ref = "adjustment" minOccurs = "0" maxOccurs
> = "unbounded"/>
>                 <xs:element ref = "status"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> 
> By default, Castor is generating another class to handle the choice
> element.  is there a way to create a binding such that it creates these
> as "optional" elements at the top level of the DetailLine class?
> 
> Thanks in advance,
> 
> Ron


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to