Hi, Keith, etc:
I don't know why I cannot get any response after I
repeatedly post the same question on this forum.I have
searched through archives and docs, and found nothing
related to this.
I am evaluating xmlbeans and castor, Castor can do
what xmlbeans cannot do, for example: generate default
constructors for java objects, implement equals,
cleaner getters/setters, etc. We need these nice
things in order to integrate with Hibernate. The only
thing I need to know now is: how to generate component
objects for nested elements while manipulating their
names. If Castor can do this, we may go ahead
integrate Castor with Huibernate. I am wondering if
castor-xml can do this.
so, please give me a word on this so that I can choose
which path to go. Thanks.
I have 2 schema files info.xsd and message.xsd, if I
use include as following:
info.xsd:
......
<xs:element name="info">
<xs:complexType>
<xs:all>
<xs:element name="createdBy" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:element>
......
message.xsd:
<xs:include schemaLocation="info.xsd"
namespace="http://www.w3.org/2001/XMLSchema"/>
<xs:element name="message">
<xs:complexType>
<xs:all>
<xs:element name="id" type="xs:string"/>
<xs:element ref="info" minOccurs="1" maxOccurs="1"
/>
</xs:all>
</xs:complexType>
</xs:element>
I get the correct results:
Info getInfo();
But if I want to have something like this:
Info getInfomation();
Here information should be of type Info in Message
class, I modified message.xsd:
<xs:element name="message">
<xs:complexType>
<xs:all>
<xs:element name="id" type="xs:string"/>
<xs:element name="infomation"
type="info" minOccurs="1" maxOccurs="1" />
</xs:all>
</xs:complexType>
</xs:element>
then I still get:
Object getInformation();
It seems that using ref can generate correct
getter/setter for containing objects, but it does let
me to specify property names. Is there any way around?
regards
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev