[ATL] 'null' values not explicitly set? [message #30809] |
Thu, 12 April 2007 08:27 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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/
|
|
|
Powered by
FUDForum. Page generated in 0.03619 seconds