Transform XML documents based on custom XSDs into UML model [message #901304] |
Fri, 10 August 2012 12:47  |
Eclipse User |
|
|
|
Hi,
I have the following scenario: I have a UML model with some UML profiles applied. Lets call this model "A".
Now I have some information stored in XML documents based on a lot of different XSDs. What I want to achieve is to get this information in the XML documents merged into A.
For example one document could have this information:
<entities xmlns:.....>
<entity name="xy" ...>
</entity>
</entities>
In A a new class "xy" is expected to be created as part of the already existing model.
My first idea was to use QVTo for this purpose. So: With QVTo the xml is transformed into a new model and then these models are merged (for instance). Or: The new entries are directly added into the model A. Now sure what is the more appropriate way.
However, as I mentioned, I have a lot of XSDs and using QVTo would require me to create model code for all meta models and register these packages. I tried this way and the generation is really time-consuming and complex.
Do you see any other suitable way? Of course I can use Java to parse the XML and to edit the UML file using the UML2 implementation of Eclipes. I tried this way and it works good. But whether this is a good way?
Of course I could use XSLT but this would require me to work with the XML of the UML file. And for example generating IDs etc. has to be done manually. So this cannot be the way to go.
Do you have an advise?
Regards,
Tex
|
|
|
Re: Transform XML documents based on custom XSDs into UML model [message #901317 is a reply to message #901304] |
Fri, 10 August 2012 14:58  |
Eclipse User |
|
|
|
HI
QVTo by itself is oftebn not a complete solution.
I find that MWE is a convenient driver for a mix of QVTo, Acceleo, Java
transformations.
Regards
Ed Willink
On 10/08/2012 17:47, Tex Iano wrote:
> Hi,
>
> I have the following scenario: I have a UML model with some UML
> profiles applied. Lets call this model "A".
>
> Now I have some information stored in XML documents based on a lot of
> different XSDs. What I want to achieve is to get this information in
> the XML documents merged into A.
>
> For example one document could have this information:
>
>
> <entities xmlns:.....>
> <entity name="xy" ...>
>
> </entity>
>
> </entities>
>
>
> In A a new class "xy" is expected to be created as part of the already
> existing model.
> My first idea was to use QVTo for this purpose. So: With QVTo the xml
> is transformed into a new model and then these models are merged (for
> instance). Or: The new entries are directly added into the model A.
> Now sure what is the more appropriate way.
>
> However, as I mentioned, I have a lot of XSDs and using QVTo would
> require me to create model code for all meta models and register these
> packages. I tried this way and the generation is really time-consuming
> and complex.
> Do you see any other suitable way? Of course I can use Java to parse
> the XML and to edit the UML file using the UML2 implementation of
> Eclipes. I tried this way and it works good. But whether this is a
> good way?
>
> Of course I could use XSLT but this would require me to work with the
> XML of the UML file. And for example generating IDs etc. has to be
> done manually. So this cannot be the way to go.
> Do you have an advise?
>
> Regards,
>
> Tex
|
|
|
Powered by
FUDForum. Page generated in 0.23169 seconds