Hi everybody,
I'm don't know exactly whether bug 689
(
https:///jaxb/.dev.java.net/issues/show_bug.cgi?id=/689)/ isn't fixed
correctly (I've reopened it yesterday) or I'm doing something wrong.
I've following situation. I have a project (call it project A) which
contains a schema (lets call it the abstract schema). In the abstract
schema there is an element which was declared as abstract. Furthermore
there is another element (call it container) which shall be able to
contain as much "abstract" elements as the user wants to. It obvious
that an element could not be abstract, so I've created another project
(call it project b) which has a schema (call it concrete schema) whichs
imports the abstract schema. In the concrete schema I will have some
elements which substitute the abstract element from the abstract schema.
Now I've an xml document whichs root element is the container (from the
abstract schema), and it should contain the non-abstract elements from
the concrete schema. So far so good, everything will be validated, there
are no errors. But unfortunately the unmarshal progress will not return
the expected result. Validation during unmarshal progress is ok as I
said but after unmarshalling the xml file, there is no concrete element
in the returned result.
I don't know what could be wrong. Did somebody already worked with
element substituion in that way and is able to help me?
Because its very complicated to describe I've attached a minimal
testcase. Just compile both projects and run the using-abstract-engine
application.
Thx for suggestions and with best regards
Johannes Homuth