Serg,
Perhaps this was just in your email not your code, but the code snippet you
include below has the wrong package name, you reference "test.secont"
instead of "test.second" when creating a new SecondType.
test.secont.SecondType second = new test.secont.SecondType();
should be:
test.second.SecondType second = new test.second.SecondType();
Could you first confirm that this is fixed in your code?
Phil
-----Original Message-----
From: Serg Maslyukov [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 2:56 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] 2 schema, 2 package and cross reference
Hi
I have 2 schema, fisrt.xsd and second.xsd
first:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:include schemaLocation="second.xsd"/>
<xs:complexType name="FirstType">
<xs:sequence>
<xs:element name="SecondItem" type="SecondType"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
second.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:complexType name="SecondType">
<xs:sequence>
<xs:element name="SecondItem" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
in castorbuilder.properties:
org.exolab.castor.builder.javaclassmapping=type and
org.exolab.castor.builder.extraCollectionMethods=true
I place schema 'first' in package test.first and
'second' in test.second
But my test class not compiled:
import test.first.*;
import test.second.*;
public class Test
{
public static main(String args[])
{
FirstType first = new FirstType();
test.secont.SecondType second = new
test.secont.SecondType();
fisrt.setSecondItem( second );
}
}
How can I define element with type from other schema?
Thanks
Serg
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-----------------------------------------------------------
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