Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: evgelebede on August 11, 2016, 10:56:40 pm
-
Hi,
I'm importing separate XSD files with a number of complexTypes.
They all belong to the same namespace test1.
In tst_ElementC.xsd, tst_ElementC_2 complex type has an element of type test1:tst_ElementC_1, which is declared in the same XSD file.
Result in EA: an association is created between tst_ElementC_1 & tst_ElementC_2. -> expected result (OK)
In tst_ElementC.xsd, tst_ElementC_1 complex type has an element (elementA) of type test1:tst_ElementA, which declared in tst_ElementA.xsd.
Result in EA: elementA is declared as an attribute of tst_ElementC_1 which type is tst_ElementA -> I was expecting an association between tst_ElementC_1 and tst_ElementA.
Is there any way to achieve what I'm looking for, or is there a reason explaining why we're getting this?
Note that I chose the option to import XSD Elements/Attributes as UML Associations.
As a workaround I could define a script that will replace all attribute types with associations but this can be time consuming both for me and the users.
-
I guess you can't do much about that (I have to say, that I haven't used XSD for quite some time, but I'm not aware of many changes in that area). Because XML/XSD mapping is not possible 1:1 we used to have our own im-/export using the API. However, if most of the Sparx implementation suits your needs you could just go with the simple association conversion you mentioned.
q.