| 
| Re: [M2M] model2xhtml QVT problem [message #764534 is a reply to message #764508] | 
Mon, 12 December 2011 06:31    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 09:56   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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?
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04530 seconds