From: Karr, David [mailto:[EMAIL PROTECTED]
> Logically, it seems like I could fix this in two different ways:
>
> * Use a binding file to specify different classes for
OwnersTypeBorrower
> and DocumentTypeBorrower.
> * Declare Borrower as a standalone element and use "ref" in each of
these
> two elements.
In schemas I have control over, my preference is to define a lot of
things at the global level and then reference them at the local level.
That makes it explicit that it is the same "type". But as Werner said,
it's best to not modify a schema for Castor's benefit unless you have
other reasons to modify the schema in that way. Best is to define the
schema in the way that is most useful and obvious in the context of the
project the schema is for. In some cases, this may mean you either
ignore warnings (or use the -f option).
Typically my work has not involved lots of schemas in different
namespaces, so there have been few consequences to defining lots of
things at the root level in a schema. But this approach does not work
for all applications.
As Werner said in a follow-up that appeared after I started this
message, the Unmarshaller changes that are causing problems for you
actually reduce your risk of using code in a way that compiles fine but
generates exceptions at runtime. If you have elements using the same
name but with different types, Castor must somehow resolve this. If the
types are truly different, then you need to generate separate classes
for the elements. The old resolution (overwrite and ignore) works fine
when the types are identical.
Eddie
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email