Hi Ralf, Thanks for the comments. My comments are inline.
On 7/8/07, Ralf Joachim <[EMAIL PROTECTED]> wrote:
Hi Sachith, to 1: Stay with the org.exolab.castor.jaxb2schema package for the time being.
Ok. I can change the package names any time. I just wanted to start the discussion on it. to 2: If you like to you can initially start from a schema and generate
source code for test classes with the JAXB2 reference implementation from that schema. But this step should not be included in tests of your tool to generate schemas. Instead the source code and the expected schema should be part of the test case only.
This is bit tricky. I am thinking of having more than 10-20 schemas for testing. If I try to keep the generated code for those classes inside the test base, I feel it is like a mess. What is the problem of generating JAXB2 classes on the fly and using as this it only requires me to keep the schemas. Also I have already done this using XJC ant task.
From my point of view the test need to: - compile source of test classes - feed the test classes into your schema generator (this gives you a tree of schema objects) - serialize scheam objects into xsd - compare generated and expected xsd an alternative would be to: - compile source of test classes - feed the test classes into your schema generator (this gives you a tree of schema objects) - load expected xsd into a tree of scheam objects - compare the 2 scheam object trees
The second method seems to be better than using XMLUnit to compare the schemas, IF Schema class has equals method implemented. But I didn't see something like that. Is there a way to check two schema objects represents the same? to 3: sounds good and according to your follow up mail you already
solved that. PS: could you please attach a patch of your current progress to CASTOR-2033 every few days for us to get an idea of what you are working at at the moment. The patch do not need to always include the required libs.
Ok, will do that. I was thinking of creating a google code project and put my code there. So that anyone can look at it whenever they want. And it gives me a source repository reducing the danger of losing my code. Thanks, SD

