Dear Werner,
 
Thanks for your reply.
 
I have read the source generator manual and I have all the objects
successfully generated. 
 
My problem is at OR Mapping.
 
I have no idea on how to map the relationship between Project -->
Developers(Just a XML wrapper to developer collection) --> developer
 
In which i expect to use the the following tables:

Project(id, other_fields)

Developer(id, project_id, name, email, other_fields)

Cardinalty of Project:Developer is 1:N 

How can I ignore the Developers collection wrapper???


Best regards,
Ng Keng Yap 
 
-------Original Message-------
 
From: [EMAIL PROTECTED]
Date: 13 Oktober 2004 17:44:07
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] How to map this in OR Mapping?
 
HI,
 
I assume you have read the instructions at http://castor.exolab
org/sourcegen.html#Introduction about how to use the SourceGenerator to
generate Java classes from your XML Schema, and how to use them during
un-/marshalling.
 
Regards
Werner
 
PS Please refrain from sending HTML messages to this mailing list (as per
the guidelines at 
http://castor.exolab.org/lists.html#A-note-about-HTML-formatted-e-mail)
 
--Original Message Text---
From: Ng Keng Yap
Date: Wed, 13 Oct 2004 17:05:17 +0800
 
5C48E2BB-F3D4-470F0B58D-C0A5CFF2D595 3.0 Letter My Collection Default Ng
Keng Yap
SU1CTDEsNDYsgUmBSY00icEskTAwTTiVKIlNiZ2BOIEwjcEoTTSBJI00ODiRKI3FjUmBSYFJgSxJT
JMMiwwLCxJTUJMMywwLCxUeXBlVmVyc2lvbiwzLDEuMCw= no-repeat #ffffff 0px 0px
ANIM3D00-NONE-0000-0000-000000000000 0 ANIM3D00-NONE-0000-0000-000000000000
1 ANIM3D00-NONE-0000-0000-000000000000 0
ANIM3D00-NONE-0000-0000-000000000000 1 ANIM3D00-NONE-0000-0000-000000000000
0 X-ASN,X-ASH,X-AN,X-AP,X-AD ; Dear all,
 
I don't know how to map the below XSD in OR mapping? 
 
I used Castor Source Generator to generate the Java Objects and The XSD
should be kept intact.
 
Help and suggestion are appreciated.
 
Thank you.
 
Best regards,
Ng Keng Yap
 
XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault=
qualified" attributeFormDefault="unqualified">
<xs:element name="developer">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="email" type="xs:string" />
<xs:element name="contact" type="xs:string" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="developers">
<xs:complexType>
<xs:sequence>
<xs:element ref="developer" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> 
</xs:complexType>
</xs:element>
<xs:element name="project">
<xs:complexType>
<xs:sequence>
<xs:element ref="developers"/>
</xs:sequence>
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
</xs:element>
</xs:schema>
 
SAMPLE DATA:
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy
com)-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="C:\Documents and Settings\Ng Keng
Yap\Desktop\developer.xsd" id="0">
<developers>
<developer id="0">
<name>String</name>
<email>String</email>
<contact>String</contact>
</developer>
<developer id="0">
<name>String</name>
<email>String</email>
<contact>String</contact>
</developer>
<developer id="0">
<name>String</name>
<email>String</email>
<contact>String</contact>
</developer>
</developers>
</project>
 
 
 
 

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

Reply via email to