Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] 'null' values not explicitly set?
[ATL] 'null' values not explicitly set? [message #30809] Thu, 12 April 2007 08:27 Go to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Hi,

ATL from 2007/02/16 does not seem to set 'null' (e.g. boolean false)
values to variables, it leaves these variables empty instead.

Thus:

elem.str <- 'hello'
elem.bool <- false

results in

<elem str="hello"/>

instead of

<elem bool="false" str="hello"/>

Is this on purpose? The ATL user manual (v 0.7) is quiet on this.

Regards,
Rene
Re: [ATL] 'null' values not explicitly set? [message #30844 is a reply to message #30809] Thu, 12 April 2007 08:46 Go to previous message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi,

Everything is OK within your model. EMF does not store default values in
its XMI format. As "false" is considered as a default value for EMF, it
is not written. Next time, when your model will be read, EMF will find
no value for the "bool" attribute and then set it to false.

A more illustrative example:
Try to have a look at the XMI of a metamodel conforming to Ecore. Look
for a EClass: you will see that the attribute isAbstract is never
written except when it is set to true !

<eClassifiers xsi:type="ecore:EClass" name="Entity" abstract="true"/>
<eClassifiers xsi:type="ecore:EClass" name="SubEntity"
eSuperTypes="/0/Entity"/>

Regards,
Mikael

Rene Ladan wrote:
> Hi,
>
> ATL from 2007/02/16 does not seem to set 'null' (e.g. boolean false)
> values to variables, it leaves these variables empty instead.
>
> Thus:
>
> elem.str <- 'hello'
> elem.bool <- false
>
> results in
>
> <elem str="hello"/>
>
> instead of
>
> <elem bool="false" str="hello"/>
>
> Is this on purpose? The ATL user manual (v 0.7) is quiet on this.
>
> Regards,
> Rene



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Previous Topic:[ATL] UML class diagram to ER
Next Topic:[ATL] model checking with ATL
Goto Forum:
  


Current Time: Tue Mar 19 07:31:58 GMT 2024

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

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

Back to the top