You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hi there, first post on this forum, so be gentle�
Within our environment our data modelling tool of choice is ERwin, Sparx being our EA/SA tool of choice.
We have the Toobus ERwin to Sparx EA bridge, which allows me to port my logical data model from ERwin to an equivalent Class Diagram in Sparx EA, which it does very well.
The ultimate goal being to generate XSD object payloads from the Class Diagram model within Sparx, which is almost working perfectly except for one small issue. I�m losing my attribute data type definitions at XSD generation time, and am merely getting undelimited �string� for all of the element definitions.
This is understandable as obviously data types such as CHAR(18) are meaningless to the XSD generator, so my question is�
How can I add new data types to the XSD generator? What I want is for an attribute with a CHAR(18) datatype to be represented as an XSD element of �string� with a max length of 18, upon XSD generation.
To this end I�ve added a new data type or CHAR(18) (common type string length 18) to the XSD product (after adding XSD as a product), via settings/code engineering data types/programming languages datatypes.
�however upon XSD generation I am still receiving the following message;
�Warning no XSD type found for: "CHAR(18)". �Default is: xs:string�
Whilst I appreciate that in certain circumstances an element of unbounded string will be advantageous, I would still like to be able to implement data type and length constraints in my XSDs
Obviously I�m doing something wrong�has anyone else found a way of overcoming this problem, without a lot of manual knife and forking. I�d like to avoid having to include a whole list of potential XML element types in each XSD.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Well, some years ago I generated XSD with a 500 lines Perl script. The import script had 200 lines. They worked well and we had the opportunity to modify them to our needs.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
AFAIK the XSD stuff is hard coded in EA. Because we had some peculiarities we decided to go the scripting way. The 500/200 lines might give you an impression on the (medium) complexity. Basically it was written within a day and then we had to deal with those peculiarities over time.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hi Will,
We are using a similar approach for a client. I may be able to 'partially' answer you question... ;)
First, I need to understand if you are following the Model Driven Architecture (MDA) approach. For example, we create a Platform Independent Model when we import Erwin models into Sparx EA, then we use the MDA Transformation Template to convert it to a XSD model (Platform Specific Model - PSM). Are you using something similar?
We are using the transformation template to do the transformation of the class model data types to the XSD specific data types (i.e. char to xs:string, date to xs:date...). This can solve your data type 'mapping' issue, but I don't know how to use the restrictions for XSD models (as I never had to use them). This will lead to my next point...
Second, I would like to understand why do you nee to use length restrictions.