Hi John,
You need to also map your packages to their respective namespaces in castorbuilder.properties file. --Keith John Seybold wrote: > > OK, thanks Keith, using "import" instead of "include" nearly solves my > problem. I can generate the classes to the right packages, BUT, the derived > class extends an unqualified base class. I see: > > Public class A1 extends A > > What I need is: > > Public class A1 extends base.entity.A > > Is there a way to have sourceGen qualify the base class for me in this way? > If not, I can easily write a perl script to insert an appropriate import > statement into all of my generated classes... > > Many thanks for the help! > > The schema for the derived class looks like: > > <?xml version="1.0" encoding="UTF-8"?> > <xsd:schema xmlns:super="http://centricasoftware.com/base" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://centricasoftware.com/fin"> > > <xsd:import namespace="http://centricasoftware.com/base" > schemaLocation="ent_base.xsd"/> > > <xsd:complexType name="A1"> > <xsd:complexContent> > <xsd:extension base="super:A"> > <xsd:sequence> > <xsd:element name="parent" > type="xsd:integer"/> > </xsd:sequence> > </xsd:extension> > </xsd:complexContent> > </xsd:complexType> > </xsd:schema> > > And the base class schema "ent_base.xsd" looks like this: > > <?xml version="1.0" encoding="UTF-8"?> > <xsd:schema xmlns:super="http://centricasoftware.com/base" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://centricasoftware.com/base"> > > <xsd:complexType name="A"> > <xsd:sequence> > <xsd:element name="id" type="xsd:integer"/> > </xsd:sequence> > </xsd:complexType> > </xsd:schema> > > -----Original Message----- > From: Keith Visco [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 04, 2002 12:17 PM > To: [EMAIL PROTECTED] > Subject: Re: [castor-dev] Extending from a different package with SourceGen > > Hi John, > > You are using "include" instead of "import". > > Change your schema to use "import" and then declare the namespace for > the imported schema and castor should work properly with your different > packages. > > "include" basically "inlines" all the structures from the included > schema as if they existed in the including schema directly. "import" > distinguishes between the imported schema and the importing schema. > > --Keith > > ----------------------------------------------------------- > 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 ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
