Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
Package in XSD's  
Forum Index -> Customizing Code Generation
Author Message
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Jick,

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() )
DEBUG:$attribute.getName()
#end

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?

Attached Image : Description : Note that there are 7 attributes and 4 assoications for this class which match the numbers derrived from $class.t_importClassesCount() and $class.xsdElementAttributeCount() (48 kb)

 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

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.

Cheers

T
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

The problem has been fixed. Please download the patch at:
http://files3.visual-paradigm.com/200708/Patch/6-1-0_20070821g/VP_Suite_MacOSX_3_1_20070821g.dmg

Please let me know if it works. Thank you.

Have a nice weekend!

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
 
   Forum Index -> Customizing Code Generation
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil