Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: miksko on November 26, 2024, 09:30:30 pm
-
I've imported an XML schema (an XSD) to Sparx EA, in order to visualize the data model. The import went fine but I'm puzzled about why Sparx splits the resulting model into fragments.
When I use the IDE Oracle JDeveloper for the same purpose, it produces a coherent model. Is there some setting I'm missing?
-
What do you mean "split the resulting model into fragments"?
It is a coherent model, and you can test that by generating the XSD from the model.
Geert
-
- One of the main elements has a property, which is a list.
- The list is optional. But if present, it has to contain 1 to 25 items.
- The items must be of a certain type.
- That type is actually a complex type, consisting of two other types of elements.
- JDeveloper presents this as a continuous chain or branch of items.
- Sparx presents the main object separately (but in the same diagram) from the list item. And the last complex type is separately presented as a group of three elements.
PS It would have been wonderful to be able to present the pictures, but the Attachment option seems to be turned off.
-
If you put the image on a public image hosting site, you can add it here using the img tag.
There are two import options: one is to use attributes, the other to use associations. Using associations can help in some cases with the visualization.
I usually don't use that, because it is harder to maintain an xsd schema with associations. (the ordering of associations is awkward)
What I usually do after importing an xsd is to add dependencies between my complex types.
It then looks like this: https://imgur.com/a/Hvr6hqL (https://imgur.com/a/Hvr6hqL)
Geert
-
- This is what it looks like when Spax imports the schema:
https://www.dropbox.com/scl/fi/owwpjdrk43j8hnaecyhwg/Utbetalning_Sparx.png?rlkey=kvj2xqw7254f8gs0r6zqt3k14&dl=0 (https://www.dropbox.com/scl/fi/owwpjdrk43j8hnaecyhwg/Utbetalning_Sparx.png?rlkey=kvj2xqw7254f8gs0r6zqt3k14&dl=0)
- And this is what I get when Oracle JDeveloper imports it:
https://www.dropbox.com/scl/fi/nlb2ep5lar02mjphhl9x3/Utbetalning_JDeveloper.png?rlkey=6p8ok6nu9hvgamylv9binqvg5&dl=0 (https://www.dropbox.com/scl/fi/nlb2ep5lar02mjphhl9x3/Utbetalning_JDeveloper.png?rlkey=6p8ok6nu9hvgamylv9binqvg5&dl=0)
As you notice, JDeveloper translate the name prefixes into a full chain of associations, which is what I desire.
-
In EA the elements are also linked. Either as type of attributes, or (in this case) by nesting.
You can see that in th project browser.
Unfortunately that is not as visually apparent as the example from JDeveloper.
I agree with you that the visualization could be improved. That's why I also add the dependencies myself.
Geert
-
The import provides the option of importing "XSD Elements/Attributes as" UML Associations or UML Attributes. From what I can see, the default is to import as Associations, which should give you closer to what you want.
-
The import provides the option of importing "XSD Elements/Attributes as" UML Associations or UML Attributes. From what I can see, the default is to import as Associations, which should give you closer to what you want.
That is how I did it but thanks anyway, Eve.
Mikael