I looked into the VP-UML documentation and on the Visual Paradigm website but it looks like there is no detailed documentation for XSD modeling in combination with Instant Generator (regarding use of stereotypes xs:simpleType, xs:restriction, xs:enumeration etc. in UML class diagrams to get these in generated XML schema)
For example: How to model classes / attributes with the built-in VP-UML xsd stereotypes in order to get the following schema when using XSD Instant Generator:
We’ve prepared a sample project to make use of built-in xsd stereotypes, you can find the link to download it below. If you want to know how to model XSD for Instant Generator, you can write an example and use “Instant Reverse”.
For tagged values for Instant Generator, I’m sorry that there is no special issue when using tagged values for Instant Generator since tagged values is designed for users to put its own values for customization (e.g. plugin, Instant Generator…).
You can use the tagged values API as shown below for customizing code generation in Instant Generator:
TaggedValue.getType() : int
( Text = 0, ModelElement = 1, Enumeration = 2, HTML = 3, Multi-Line Text = 4 )
TaggedValue.getValue().getName()
( return text value or name of model element value )
As we fixed the problem of not allowing tagged values with duplicated names, please download the latest build as well. Here are the links for the sample project and the build:
let me first thank you for your quick feedback and support !
I just switched to VP-UML and have been working with it for only 3-4 weeks now but one thing I can already say after sending some bug reports and receiving feedback and bugfixes very fast:
Your / Visual Paradigm’s support so far is OUTSTANDING and an excellent example for many many other software companies how to deal with customers. Support was not the reason for me to switch to VP-UML, but now that I experience your support I have to say it’s one more reason to switch and I’m glad I’m using VP-UML !
Could you please provide a link to a Mac OSX version of the patched VP-UML ? I work on Mac OSX and could not open the demo project you provided since it requires the patched VP-UML.
thanks for quickly providing patched Mac OSX version - I was able to open the sample project:
You / your engineers provided exactly what I was looking for, thanks a lot !
Unfortunately I found one problem with this patched version which I think I did not have before:
After adding Stereotype ‘XSDattribute’ to an UML attribute and then opening Specification Tab ‘XML Schema’ I used to be able to set value for ‘use’ from default setting ‘unsepcified’ to ‘required’.
Now when I do this and click ‘apply’ / ‘ok’ and then close the specification, the next time I open tab ‘XML Schema’ it it is back to ‘unspecified’, so my changes did not get applied.
Could this be fixed ? I checked the log file but it did not show any errors.
The XML Schema Instant Generator uses scripts (text files) which can be customized
e.g. for adding your own types to be included in the generated XML schema.
The location of these scripts is: