Package in XSD's


I started to assign the various classes into packages so that rather than one big schema there are several, more modular schema and have run into a problem.

I create packages by diagram - I use the text field above the diagram to name it.

Where I have classes in other diagrams they are not included in the package. I check this by looking at the children of the package.

When I generate it does not include the associations. You can see from the diagram below that there should be a number of elements created because of the associations that have been created. If this diagram is not in a package or in the default package then these get generated, if the diagram is a package then they do not get generated.

I have done some digging and it would appear that in xsdclass.vm if you stick the code:

#foreach( $attribute in $class.xsdElementAttributeIterator() )

you see all the real attributes but not the ones that should be created by assoication.

If I remove the package then I see all the attributes including those that should be created because of the assocations.

If I add the code $class.t_importClassesCount() then I can see that there are 4 import classes - I am guessing that these should be generated as well…assuming that the roles defined in the assoication let them…

Am I going mad? or just not using assoications properly?


I had a play with C++ and Java this morning and both of those work fine and generate the views that I expect.

It appears to be just an issue with the XSD generation. If I get a chance I will have a play with the API’s this afternoon.



Hi Toby,

The problem has been fixed. Please download the patch at:

Please let me know if it works. Thank you.

Have a nice weekend!

Best regards,