Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Amalgam » [M2M] model2xhtml QVT problem
icon5.gif  [M2M] model2xhtml QVT problem [message #764508] Mon, 12 December 2011 10:21 Go to next message
Federico Pozzoni is currently offline Federico PozzoniFriend
Messages: 16
Registered: December 2011
Junior Member
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?
Re: [M2M] model2xhtml QVT problem [message #764534 is a reply to message #764508] Mon, 12 December 2011 11:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26285
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?
Re: [M2M] model2xhtml QVT problem [message #764626 is a reply to message #764534] Mon, 12 December 2011 14:56 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
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:Error while trying to build the requirements diagram
Next Topic:Feedback from Eclipse Modeling Package
Goto Forum:
  


Current Time: Sun Dec 21 02:00:39 GMT 2014

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

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