MDA transformation to XSD breaks enumeration attributes
25 views
Skip to first unread message
alg...@gmx.de
unread,
Nov 4, 2016, 8:26:56 AM11/4/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
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 Architect General
Hi there,
I try to customize the transformation to the XSD PSM. One of the customizations contains the usage of XSDAttributes for source attributes. This works quite fine but I have a single insistent problem regarding enumerations. My PIM contains some UML enumerations and XSDSimpleTypes which are transformed correctly to the PSM. But when my PIM contains a class attribute with such an enum as attribute type the transformation seems to work fine but it looks like the attribute type in the PSM is not connected to the generated enum. This causes the subsequent generation of XSD schema to throw the warning "Warning no XSD type found for: 'Color'. Default is: xs:string". If I manually select the enumeration "Color" manually in the PSM the schema generation passes without any warnings. With the simpleTypes I have no problems and works well.
The probably relevant part of the attribute transformation is > Attribute { > [...] > name=%qt%$attName%qt% > scope="Public" > type=%qt%%attType%%qt% > stereotype="XSDattribute"
The probably relevant part of the class transformation is > %if elemType == "Class"% > Class > %else% > Enumeration > %endIf% > { > name=%qt%%className%%qt%
The relevant part of the intermediary file is > Class > { > name="Apple" > stereotype="XSDcomplexType" > [...] > Attribute > { > [...] > name="color" > scope="Public" > type="Color" > stereotype="XSDattribute" > [...] > } > } > > Enumeration > { > [...] > name="Color" > stereotype="enumeration" > [...] > }
Can you tell me where I messed up my transformation?
If it helps I can append a small EA project file containing a simple model and the transformations, but I try to avoid attaching binaries to group posts.