In your XML schema, you define a target namespace of http://uri.seeburger.com/bisas/xformservice/schema; per definition (as you are setting elementFormDefault to 'qualified'), any global element definition will be assigned to this namespace.
As such, the output generated below is correct. Why do you think that the call to get typeSchema.TargetNamespace() should return http://www.w3.org/2001/XMLSchema instead ? Werner Boris Dushanov wrote: > Hi, > > I've attached the test schema. > > My castor implementation version is 1.1.2.1. > > Regards, > Boris > > Werner Guttmann wrote: >> What does the <schema> element definition look like ? It might as well >> be a bug (or not), but I need more information to be able to tell.. >> >> Werner >> >> Boris Dushanov wrote: >> >>> Hi all, >>> >>> I have an XML Schema in which the following element is defined : >>> >>> <xsd:element name="internationalPrice" type="xsd:anyType"/> >>> >>> I'm executing the following test code using castor : >>> SchemaReader reader = new >>> SchemaReader("mySchema.xsd"); >>> >>> Schema schema = reader.read(); >>> ElementDecl element = >>> schema.getElementDecl("internationalPrice"); >>> Schema typeSchema = element.getType().getSchema(); >>> System.out.println(typeSchema.getTargetNamespace()); >>> >>> I expect that http://www.w3.org/2001/XMLSchema will be printed as a >>> result but it is not.The target namespace of mySchema.xsd is printed. >>> Is this the right behaviour or there is some problem in the castor ? Or >>> maybe I'm missing something... >>> >>> Thanks in advance, >>> Boris >>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> >> > > > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

