Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » .genmodel reload forces encoding of OCL expressions in annotations.
.genmodel reload forces encoding of OCL expressions in annotations. [message #540456] Wed, 16 June 2010 08:39 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

I update my model source, .xsd in this case.
In the schema, I add annotations which contain OCL expressions. (For
derived features). I then reload my .genmodel with the latest schema.
This is all fine, and I can generate the features.

I however later find out, my OCL expressions fail because the "greater
than" character has been encoded when reloading my schema.

So an expression like 'self->closure(...)' becomes 'self-&;closure(...)'

I presume the serializer encodes the element content in appinfo?

<xs:appinfo source="http://www.eclipse.org/OCL"
ecore:key="derive">self->closure(elements)
</xs:appinfo>

Any solution for this?
thx Christophe
Re: .genmodel reload forces encoding of OCL expressions in annotations. [message #540514 is a reply to message #540456] Wed, 16 June 2010 12:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Christophe,

It looks like a double encoding problem. Please open a bugzilla.


Christophe Bouhier wrote:
> Hi,
>
> I update my model source, .xsd in this case.
> In the schema, I add annotations which contain OCL expressions. (For
> derived features). I then reload my .genmodel with the latest schema.
> This is all fine, and I can generate the features.
>
> I however later find out, my OCL expressions fail because the "greater
> than" character has been encoded when reloading my schema.
>
> So an expression like 'self->closure(...)' becomes 'self-&;closure(...)'
>
> I presume the serializer encodes the element content in appinfo?
>
> <xs:appinfo
> source="http://www.eclipse.org/OCL"
> ecore:key="derive">self->closure(elements)
> </xs:appinfo>
>
> Any solution for this?
> thx Christophe
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: .genmodel reload forces encoding of OCL expressions in annotations. [message #540644 is a reply to message #540456] Wed, 16 June 2010 19:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Christophe, Ed

Interesting: I had no idea OCL had spread into XSD.

Is there any documentation/examples that I can refer to myself and
reference from MDT/OCL documentation.

I'm a bit puzzled by the http://www.eclipse.org/OCL URI which seems
inconsistent with the new delegates URI.

Ed

On 16/06/2010 09:39, Christophe Bouhier wrote:
> Hi,
>
> I update my model source, .xsd in this case.
> In the schema, I add annotations which contain OCL expressions. (For
> derived features). I then reload my .genmodel with the latest schema.
> This is all fine, and I can generate the features.
>
> I however later find out, my OCL expressions fail because the "greater
> than" character has been encoded when reloading my schema.
>
> So an expression like 'self->closure(...)' becomes 'self-&;closure(...)'
>
> I presume the serializer encodes the element content in appinfo?
>
> <xs:appinfo source="http://www.eclipse.org/OCL"
> ecore:key="derive">self->closure(elements)
> </xs:appinfo>
>
> Any solution for this?
> thx Christophe
>
>
Re: .genmodel reload forces encoding of OCL expressions in annotations. [message #540646 is a reply to message #540644] Wed, 16 June 2010 19:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ed,

What Christophe's referring to is generalized support for mapping XSD
annotations to Ecore annotations. It works this same way regardless of
the actual values involved.


Ed Willink wrote:
> Hi Christophe, Ed
>
> Interesting: I had no idea OCL had spread into XSD.
>
> Is there any documentation/examples that I can refer to myself and
> reference from MDT/OCL documentation.
>
> I'm a bit puzzled by the http://www.eclipse.org/OCL URI which seems
> inconsistent with the new delegates URI.
>
> Ed
>
> On 16/06/2010 09:39, Christophe Bouhier wrote:
>> Hi,
>>
>> I update my model source, .xsd in this case.
>> In the schema, I add annotations which contain OCL expressions. (For
>> derived features). I then reload my .genmodel with the latest schema.
>> This is all fine, and I can generate the features.
>>
>> I however later find out, my OCL expressions fail because the "greater
>> than" character has been encoded when reloading my schema.
>>
>> So an expression like 'self->closure(...)' becomes 'self-&;closure(...)'
>>
>> I presume the serializer encodes the element content in appinfo?
>>
>> <xs:appinfo source="http://www.eclipse.org/OCL"
>> ecore:key="derive">self->closure(elements)
>> </xs:appinfo>
>>
>> Any solution for this?
>> thx Christophe
>>
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: .genmodel reload forces encoding of OCL expressions in annotations. [message #540865 is a reply to message #540514] Thu, 17 June 2010 13:53 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Ed Merks wrote:
> Christophe,
>
> It looks like a double encoding problem. Please open a bugzilla.
Sure, will do!
Previous Topic:[EMF] Issue loading XML Resource
Next Topic:One editor for ecore metamodel organized with several packages
Goto Forum:
  


Current Time: Sat Apr 27 01:41:27 GMT 2024

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

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

Back to the top