Hello Ralf, Yes I have read the docs, and, as far as I understand, there seems to be no option to reference element name with namespace info, to make element binding namespace specific.
For example if one has two Result elements belonging to two different namespaces (possibly but not neccessarilly in two different XSDs), one can not configure that Result element from namespace 1 should map to package1.Result1 class and Result element from namespace 2 should map to package2.Result2 class. As I wrote in initial post, in use case where both Result classes meet in e.g. packagex.DummyResultProcessor class where one would want to import both Result classes and not have to reference either of them in rest of the code by full package+class name because with references to either of these classes with any other-than-trivial package name length/depths code gets a lot less readable. Currently, it seems to me, one can only specify namespace-to-package binding, resulting in two classes with same name, but different package, with issue from the mentioned use case not solved. Regards, Stevo. 2010/8/25 Ralf Joachim <[email protected]> > Hi Stevo, > > have you already had a look at following parts of our docs? > > > http://castor.codehaus.org/reference/html/xml.code.generator.html#xml.code.generator.custom.bindings > > http://castor.codehaus.org/reference/html/xml.code.generator.html#xml.code.generator.custom.bindings.file.namingXML > http://castor.codehaus.org/reference/html/xml.code.generator.html#d0e4780 > > Regards > Ralf > > Stevo Slavić schrieb: > > Hello castor users, > > > > Say one has two xsd's, each with its own namespace, and they have > > multiple elements with same name. For tuning code generation one can > > configure namespace-to-package binding in binding.xml. If each > > namespace is bound to a different package, elements with same name > > will result in classes with same name but within different packages. > > If one uses these classes, with same name, within same class, one of > > them will have to be referenced using full class name which is very ugly. > > > > I've looked but could not find a way to configure element-to-class > > name binding which would be namespace aware, so that a different class > > name can be configured for a given element name, depending on > > namespace element belongs to. Did I miss something? > > > > > > Regards, > > Stevo. > -- > > Syscon Ingenieurbüro für Meß- und Datentechnik GmbH > Ralf Joachim > Raiffeisenstraße 11 > 72127 Kusterdingen > Germany > > Tel. +49 7071 3690 52 > Mobil: +49 173 9630135 > Fax +49 7071 3690 98 > > Internet: www.syscon.eu > E-Mail: [email protected] > > Sitz der Gesellschaft: D-72127 Kusterdingen > Registereintrag: Amtsgericht Stuttgart, HRB 382295 > Geschäftsleitung: Jens Joachim, Ralf Joachim > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >

