cancel
Showing results for 
Search instead for 
Did you mean: 

PowerDesigner 15 - Generated XML model from OOM - How to avoid to loose lists ?

Former Member
0 Kudos

Hi ,

Here's the context : I've got a OOM with an 1 -> * association between two classes.

When I use CTRL+G to generate C# code (with a C# current object langage), I obtain the right coded objects.

In the properties of the association, I can see that the container type of the "class B object" is "System.Collections.Generic.List"

=> OK

If I change the current object langage with a "XML - Schema", then I DON'T obtain the right coded objects by using CTRL+G from the XML model (XSM) to generate XSD code.

In the properties of the association, I can see that the container type of the "class B object" is empty and disable

=> Do you know why ?

Shouldn't I obtain a xsd:list tag in my XSD file ?

How to avoid to loose lists by using a "XML - Schema" current object langage ?

Regards,

Cyrille

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What version of PowerDesigner are you using?

In the later versions, this capability has been depreciated, we no longer support XML generation from UML diagrams, and instead built an XML model to handle XSDs.

We did this because XML from UML was hard to manage, since UML is objects while XML is hierarchical, there was a mismatch between representation and implementation.  Having a synchronized XML model with UML models (and with data models) solves all those issues.

Back to your specific point - we did not implement a container construct for XML generation from UML.  I honestly cannot remember if this was because the XML definitions we were coding to at the time lacked a structure for that, or whether we did not implement it because we were just starting to understand how to map UML to XML.  You can customize the language file yourself (it is not a trivial task) to add container structures that will appear in that menu, and generate code.  Use the C# language file as a basis for that.  How to do that is a bigger topic than this thread.

So, unfortunately, you are right, we do not handle this situation in a good way, and this capability is not supported anymore (because the XML model we built instead does it right).

Former Member
0 Kudos

I'm using PowerAMC v15.2 (see above).

I may have mispoken : in a second time, I've produced a XSM file from the OOM file and I'm using it, actually.

As a result, I've built my XML model to handle XSDs, don't I ?

So I have a synchronized XML model with UML models, don't I ?

From this synchronized XML model, how could I define a "xsd:list" tag which will be in my XSD generated file, please ?

Regards,

Cyrille