Hi Werner, Should we add some test cases to cover this hole? and a simple fix will be covered by those tests. I had done some test cases for Schema API, but not this area. If no one is currently working on this, I will take a look on this piece of code.
Regards, Bao On Sun, Sep 14, 2008 at 1:59 PM, Werner Guttmann <[EMAIL PROTECTED]>wrote: > Hi Bao, > > yes, I could easily fix this myself, but I am somehow afraid of the > potential side effects introduced by such a fix. > > As always, this code seems to have been written years ago, and there's > no test cases that cover this area. Simply removing this code somehow is > not an option to me. > > What do you thin about this ? Any idea why this code is there at all ? > > Werner > > Le Duc Bao wrote: > > Definitively yes. Is there any one to fix this? > > > > Bao > > > > On Mon, Sep 8, 2008 at 10:39 AM, Werner Guttmann < > [EMAIL PROTECTED]>wrote: > > > >> Actually, on line 1028ff of SchemaWriter, Group.getOrder() is called. By > >> looking into the implementation of Group.getOrder(), I think it becomes > >> quite clear as to why this problem occurs at all. > >> > >> Problem is, I would not know a single reason as to why there needs to be > >> that special handling of a group that contains just one group. > >> > >> Werner > >> > >> Le Duc Bao wrote: > >>> Hello, > >>> > >>> I used Schema API to create XML schema instance. I tried to create a > >> group > >>> as sequence and a sub-group as choice (see .java file). The generated > >> schema > >>> contains both groups as choice (see .xsd file). Is this a bug of schema > >> API? > >>> Does it relate to ModelGroup class? If yes, how can we use them? > >>> > >>> Regards, > >>> > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe from this list, please visit: > >>> > >>> http://xircles.codehaus.org/manage_email > >> --------------------------------------------------------------------- > >> To unsubscribe from this list, please visit: > >> > >> http://xircles.codehaus.org/manage_email > >> > >> > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Le Duc Bao