Tjeerd,

  Thanks for the suggestion.  Once I changed the syntax for max occurences
at the element level, Castor intelligently used a collection of strings to
represent them.

  I appreciate your help, Tjeerd.

  Kory

-----Original Message-----
From: Verhagen, Tjeerd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 4:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Strings within ComplexTypes?


Kory,

I'm not shore if this is the sollution to your problem. I only see that we
solve
this in a little bit diffened way. In our xsd we set max occurences on the
element
en not on sequences.

Tjeerd


Your code:
----------------------------------------------------------------------------
----
  <xs:element name="Orders" nillable="true">
    <xs:complexType>
        <xs:sequence maxOccurs="unbounded">
        <xs:element name="OrderEntryId" type="xs:string" nillable="true"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
----------------------------------------------------------------------------
----


My suggestion:
----------------------------------------------------------------------------
----
  <xs:element  name="Orders"  nillable="true">
    <xs:complexType>
      <xs:sequence>
        <xs:element  name="OrderEntryId"  maxOccurs="unbounded"
type="xs:string"  nillable="true"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
----------------------------------------------------------------------------
----


> -----Original Message-----
> From: Lasker, Kory [mailto:[EMAIL PROTECTED]]
> Sent: donderdag 2 mei 2002 22:57
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Strings within ComplexTypes?
> 
> 
> 
> 
> I am generating classes from an XSD that defines a construct 
> like this:
> 
> <Orders>
>   <OrderEntryId>
>   <OrderEntryId>
>   ...
> </Orders>
> 
> When I run SourceGenerator on the attached XSD, it generates 
> the Orders
> object but also makes OrderEntryId into a OrdersItem object 
> that I must call
> setOrderEntryId(...) against.  How can I have Castor generate a java
> Collection of Strings instead?  Is this something that can be 
> done on the
> XSD side or must I do it with Castor? 
> 
> Thanks,
> 
> Kory
> 
> 

This e-mail and any attachment is for authorised use by the intended
recipient(s) only.  It may contain proprietary material, confidential
information and/or be subject to legal privilege.  It should not be copied,
disclosed to, retained or used by, any other party.  If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender.  Thank you.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to