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 “xs:xs: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.
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
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…
I couldn’t find out our conversation that discusses the request of in line. Could you direct me to the appropriate post? Sorry for any inconveniences it may cause you.
Have you been sending us suggestion/feature request about handling package? As I remember, there isn’t any discussion related to package support. Perhaps I missed again?
No no, Jick; I have not mentioned packages yet as I currently have everything in one package so there is no issue. I’m going to break out data types from the main classes so that they can be reused in other projects and I will keep you posted as to my experiences.
The documentation thing was the Role description being used in the XSD generation; this seems to be implemented in the current VM set for XSD and from the look of it the files I am using are VP files rather than my own. Either way, it generates exactly what I would expect!
Currently I have nothing outstanding with you other than my gratitude for the work that you and your engineers have put in to solve my problems.
Hi, I think I have the same problem as Toby, but I can’t manage in fixing it.
I need to extract the content of a documentation of a java class operation without CDATA too. I downloaded and installed the patch you provided (the 20070724c one, the last version for this problem) and I still can’t make it work.
Here the template for JavaOperation.vm (just added $utilities and $class prints and the access call to the documentation content)
com.vp.instantgenerator.java.JavaUtilities@1ccb1ae
com.vp.instantgenerator.java.JavaClass@1a5469e
$utilities.getOriginalDocumentation($operation, $args.get("property"))
/**
* test_comment
*/
public boolean test_operation(double a, short b) {
throw new RuntimeException("Not yet implemented");
}
I don’t understand why the call to $utilities.getOriginalDocumentation($operation, $args.get(“property”)) still doesn’t work ?
Please run it and overwrite the existing installation. Sample code:
$object = ... // retrieve something
$utilities.getOriginalDocumentation($object, $args.get("property"))
// Will return the documentation of the object without any modification