Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Re: [M2M] model2xhtml QVT problem
Re: [M2M] model2xhtml QVT problem [message #764537] Mon, 12 December 2011 11:31 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33252
Registered: July 2009
Senior Member
Frederico,

It's better to use the eclipse.modeling.m2m forum. I've added it to the
CC list of this reply, so no need to repost; be sure to follow up and
monitor that forum instead though. In that forum, it's a good idea to
prefix the subject with [QVTo]...

On 12/12/2011 11:21 AM, Federico Pozzoni wrote:
> i'm trying to create a model to model transformation to my metamodel(
> Following the book "Eclipse Modeling Project - A Domain-Specific
> Language (DSL) Toolkit"), more precisely i've to create a
> transformation to XML.
> I'm stuck at the point where i've to delete the
> "mixed:EFeatureMapEntry" and extend flow and inline with
> XMLTypeDocumentRoot; section of the book is the following:
> Quote:
>> QVTO cannot currently deal with statements such as mixed += 'text';
>> because
>> mixed is of type EFeatureMapEntry and cannot be set with a string.
>> A workaround for this is to extend model elements that contain a
>> string within
>> their serialized output by XMLTypeDocumentRoot. With that, we need to
>> delete
>> their mixed:EFeatureMapEntry because XMLTypeDocumentRoot declares
>> one as well. Declaring this eSuperType for the Inline and Flow
>> classes of our
>> xhtml.ecore model should take care of most elements we need. We'll
>> add this
>> supertype to more elements as needed when creating our script.
>> Additionally, we
>> need to change some attributes to be of type AnySimpleType (for example,
>> colspan in ThType). A nice feature of the QVTO editor is that it
>> recognizes
>> model changes on-the-fly, so each update is immediately available.
>
>
> Can anyone help with this section? Can anyone suggest some
> alternatives for the creation of XML?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [M2M] model2xhtml QVT problem [message #764629 is a reply to message #764537] Mon, 12 December 2011 14:56 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi

Modern modeling tools work with models that have relatively simple
underlying structure (meta-meta-model) defined by Ecore/MOF/UML.

Pre-modeling tools based on XML can have very complex structure,
sometimes constrained by XSD.

Few modeling tools support the complexity of XSD at the modeling level.
In some cases you may be able to configure EMF's XML serialisation to
hide the external eccentricities from the tools, But more generally..

You must use a meta-meta-model that represents your concepts, so if you
are interested in the subtleties of XML serialisation you need to use
XSD as your meta-model (and perhaps Ecore as your meta-meta-model). ATL
certainly has examples of direct manipulation of XML.

Regards

Ed Willink



On 12/12/2011 03:31, Ed Merks wrote:
> Frederico,
>
> It's better to use the eclipse.modeling.m2m forum. I've added it to
> the CC list of this reply, so no need to repost; be sure to follow up
> and monitor that forum instead though. In that forum, it's a good
> idea to prefix the subject with [QVTo]...
>
> On 12/12/2011 11:21 AM, Federico Pozzoni wrote:
>> i'm trying to create a model to model transformation to my metamodel(
>> Following the book "Eclipse Modeling Project - A Domain-Specific
>> Language (DSL) Toolkit"), more precisely i've to create a
>> transformation to XML.
>> I'm stuck at the point where i've to delete the
>> "mixed:EFeatureMapEntry" and extend flow and inline with
>> XMLTypeDocumentRoot; section of the book is the following:
>> Quote:
>>> QVTO cannot currently deal with statements such as mixed += 'text';
>>> because
>>> mixed is of type EFeatureMapEntry and cannot be set with a string.
>>> A workaround for this is to extend model elements that contain a
>>> string within
>>> their serialized output by XMLTypeDocumentRoot. With that, we need
>>> to delete
>>> their mixed:EFeatureMapEntry because XMLTypeDocumentRoot declares
>>> one as well. Declaring this eSuperType for the Inline and Flow
>>> classes of our
>>> xhtml.ecore model should take care of most elements we need. We'll
>>> add this
>>> supertype to more elements as needed when creating our script.
>>> Additionally, we
>>> need to change some attributes to be of type AnySimpleType (for
>>> example,
>>> colspan in ThType). A nice feature of the QVTO editor is that it
>>> recognizes
>>> model changes on-the-fly, so each update is immediately available.
>>
>>
>> Can anyone help with this section? Can anyone suggest some
>> alternatives for the creation of XML?
Previous Topic:how select elements in a specific element
Next Topic:[ATL] - Create Integer set and add a new integer.
Goto Forum:
  


Current Time: Fri Nov 08 22:03:11 GMT 2024

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

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

Back to the top