Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » Transform XML documents based on custom XSDs into UML model
Transform XML documents based on custom XSDs into UML model [message #901304] Fri, 10 August 2012 16:47 Go to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
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 18:58 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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
Previous Topic:[ATL][AML]Information on AML
Next Topic:[ATL] referencing to element created from a lazy rule
Goto Forum:
  


Current Time: Fri Mar 29 14:34:38 GMT 2024

Powered by FUDForum. Page generated in 0.01962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top