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
Creating documentation in XSD's  
Forum Index -> Customizing Code Generation
Go to Page: Previous  1 2 3 Next
Author Message
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Hi Jick - I was away for a couple of days wine tasting...now its back to work!

I have added $utilities to package.vm and it generates the following output: com.vp.instantgenerator.xsd.XsdUtilities@dd90c3

Hope this helps

T
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

It seems that the only possible reason is you have overwritten $class. E.g.:

#set( $class = "" )
$utilities.getOriginalDocumentation($class, $args.get("property"))

To test if $utilities is overwritten or not, print $class in the .vm to see the result. It should be something like com.vp.instantgenerator.xsd.XsdClass@...

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Ok, in my production environment I have gone back to 16a as that works and I can generate schema for my developers.

I will load up 12 into a test platform and try it later on.....
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Ok, still using 16a I get com.vp.instantgenerator.xsd.XsdClass@ad8a46 where the bit after the @ sign is the id of the class
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

Can I say that 20070716a works well, while 20070712u doesn't? If yes, please try this release:
http://files3.visual-paradigm.com/200708/Patch/sp2_20070724c/VP_Suite_Windows_3_0_sp2_20070724c.exe

This is a newer version of patch.

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Jick - first feedback on 3.1...

The new VM files work rather well, I have added my alternate documentation code and it works with no problem (as long as I remember to replace $class with $attribute in the right place



xs:restriction@base must come before any restriction. there is an implicit sort order in the Tagged Values (the top one is processed first, then the 2nd etc)

The namespace "xs:" is automatically added to any value (in the early access I had to have a value of "xs:string" which now gives "xss:string". Whilst not a problem for the data types it means that any maxLength or other value for xs:restriction/xs:maxLength@value gives "xs:3" which is a big problem!

I have looked through the VM code and it is not being generated from XsdXmlNode.vm so it must be part of the $node library.


Hope this makes sense....
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

I will talk to our engineers about this. Thank you.

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

Build Quality Applications Faster, Better and Cheaper
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

The problem of appending "xs" incorrectly has been fixed. Please download the patch at:
http://files3.visual-paradigm.com/200708/Patch/6-1-0_20070801u/VP_Suite_Windows_3_1_20070801u.exe

Enjoy!

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Thanks Jick - can I have a patch for the Mac version please? I would like to try it on my production machine.
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

HI Toby,

Sure. Here is the download link of the Mac version:
http://files3.visual-paradigm.com/200708/Patch/6-1-0_20070801y/VP_Suite_MacOSX_3_1_20070801y.dmg

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Hi Jick - installs and removes that issue...

One more for your engineers:

When I have a class with a one way association to another (only one Navigatable=true statement in the role) I cannot get any documentation. If I use the normal $attribute.t_getDocumentation($indenter.getIndentation()) statement then I can get it but with the CDATA section but if I use $utilities.getOriginalDocumentation($OBJECTNAME, $args.get("property")) then it does not return anything.

Having looked at the other examples for other languages I have tried association, assoicationEnd but there is a reference to $class.toAssociationIterator() which I am not sure how it works...

Am I sort of on the right track or have I just confused you?

First diagram is a simple class model, the second file is the VP xsd routine the third is mine using $utilities.

I will post up my vm file in the next post

normal.xsd
 Description normal VP xsd vm output Download
 Filesize 885 bytes
 Downloaded:  81 time(s)

Attached Image : Description : Simple class diagram (6 kb)

untitled.xsd
 Description my custom vm output Download
 Filesize 1 kb
 Downloaded:  85 time(s)

 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

and finally, my vm file that creates my schema

XsdElementAttribute.vm
 Description my vm file used to create elements with instant generator Download
 Filesize 1 kb
 Downloaded:  85 time(s)

 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

I will talk to our engineers about this problem. Thank you.

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Toby,

The problem has been fixed. Please try, and let me know if it works. Thank you. Here is the patch:
http://files3.visual-paradigm.com/200708/Patch/6-1-0_20070812a/VP_Suite_MacOSX_3_1_20070812a.dmg

Best regards,
Jick

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

Build Quality Applications Faster, Better and Cheaper
 
TobyAnscombe


Joined: 2007/01/10
Messages: 43

Offline

Hi Jick - provisional inspection seems to show it working....have you also changed the documentation elements to be in line with my expectations or have I just used my vm's to generate an output? Either way, it looks rather good!

The next topic to play with is packages so expect some feedback in the coming days.

Another good result. I'll let you know if I run into any problems.

I am off to a new project in September and will try to persuade them to adopt my tool of choice rather than the normal Visio or Rose.....

 
 
   Forum Index -> Customizing Code Generation
Go to Page: Previous  1 2 3 Next
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil