Hi Werner, In last couple of days, I studied the schema API, existent JAXB source code and also JAXB specification. I found that the existent schema module hasn't a complement test module. It's good idea to do some test on existent code to verify the completeness.
My understanding of your idea is that test cases will be created by writing some code fragments and expected schema files. Each test case will execute a code fragment to generate a schema, then compare this generated schema with expected schema. This approach will test the corectness of internal schema representation and the SchemaWriter. Is it right? Furthermore, I have some stuffs that I need your comments/advices - Do you agree with my proposal for XML Schema generator architecture? - Related to SVN space for my project, will I work dirrectly in castor-jaxb-2.0 module or will you create a separate module for me? - For the coding convention, I remember that Ralf gave me a document some times before, but I don't keep it in my computer. Could you give me a pointer for this? Anyway, I keep going on JAXB specification in next few days while looking for your reply. Regards, Bao On Thu, May 8, 2008 at 7:31 PM, Werner Guttmann <[EMAIL PROTECTED]> wrote: > Hi Bao, > > following up your last email about the schema classes, there's some > ideas how to go about things step by step. > > I think it would be a good idea if you added your code fragments (that > demonstrate and investigate the completeness of the existing schema > classes) to e.g. the test case of the 'schema' module. > > I have been talking to Joachim the other day, and we think that we could > come up with a base test case class that takes a Schema object instance, > writes it to a physical XML schema file (using SchemaWriter) and > compares it with a gold XML schema file. > > Based upon this test case, you could create one test case after the > other and add them to src/test/java and src/test/resources of the schema > module. > > In terms of proceeding on the complexity side of things, I'd start with > simple things such as adding one complex type, one global element > definition to an XML schema, and then take it from there. If you had a > look at the JAXB specification, you'll find plenty of references in > terms of what XML schema artefacts you will have to be able to produce > (and serialize). > > Let me know whether this approach is fine for you, and whether you have > any additional thoughts. > > Regards > Werner > -- Le Duc Bao