Hi,

I have got a few questions before trying to address your question(s).

Cheers
Werner

Hamacher, Eric wrote:
> Hello:
> 
> New to Castor
> 
> We have an Organization object which contains a List of Project
> objects. Sometimes when we marshal an Organization object, we want the
> related Project objects to be marshaled along with them. But sometimes
> we just want to marshal Organization objects without including the
> Project objects. How can I let Castor know which one I want to do? Is
> there a special mapping?
Well, let's assume you'd be writing an XML schema to express this
'feature'. That would be something similar to:

<xs:complexType name="Organization">
  <xs:sequence>
    <xs:element name="...." type="...." />
    ...
    <xs:element name="project" type="projectType" minOccurs="0"
                maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>

As you can see, I have declared the project element to be *optional*. In
other words, if you attach a list of projects to the Organization
instance, it will be included during e.g. marshalling. If you don't, it
won't.

Does this answer your question ?

> 
> J.  ERIC  HAMACHER
> Software Application Developer
> 608.664.3859
> 8476 Greenway Boulevard
> Suite 100
> Middleton, WI  53562
> USA
> GALLUP Technology
> 
> Achiever | Learner | Restorative | Intellection | Deliberative
> 
> 
> ________________________________
> IMPORTANT NOTICE: This e-mail message and all attachments, if any, may 
> contain confidential and privileged material and are intended only for the 
> person or entity to which the message is addressed. If you are not an 
> intended recipient, you are hereby notified that any use, dissemination, 
> distribution, disclosure, or copying of this information is unauthorized and 
> strictly prohibited. If you have received this communication in error, please 
> contact the sender immediately by reply e-mail, and destroy all copies of the 
> original message.
> 

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

    http://xircles.codehaus.org/manage_email


Reply via email to