Author Topic: V 7.5: OCL-Validation: "&" Message  (Read 1382 times)

Michael Hafner

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
V 7.5: OCL-Validation: "&" Message
« on: April 08, 2010, 07:39:57 pm »
Dear all,
its a little embarrassing, but:

Why do I get: "Failed to validate OCL expression: There was an error parsing on line 1. Unexpected symbol: &"

...after entering:

inv: self.author->isEmpty() implies self.type = 'instrumental music'

...as a class-constraint? There isn't any ampersand in the statement after all? - If I replace the "arrow" with a dot, everthing is fine:

inv: self.author.isEmpty() implies self.type = 'instrumental music'

But thats not what I wanted to say...

Best,
Michael

Michael Hafner

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
V 7.5: OCL-Validation: "&" Message - PS
« Reply #1 on: April 08, 2010, 07:54:18 pm »
PS: The XMI export...

<UML:TaggedValue tag="description" value="inv: self.author-&amp;gt;isEmpty() implies self.type = 'instrumental music' &#xA;"/>

...shows that there really seems to be something in the string which EA reads as an ampersand ("&amp;"). Problem is, how can I avoid this?

I've added the constraint manually - via the EA dialog. I haven't entered any character between the components of the arrow (hyphen and angle bracket)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8482
  • Karma: +207/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: V 7.5: OCL-Validation: "&" Message
« Reply #2 on: April 08, 2010, 07:55:02 pm »
Because somewhere along the way the constraint got html escaped and the ">" got transformed into "&gt;"

Geert

Michael Hafner

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: V 7.5: OCL-Validation: "&" Message
« Reply #3 on: April 08, 2010, 08:18:55 pm »
Yes - two times: First ">" became "&gt;", and during XMI-export "&" became "&amp;". Thus: "&amp;gt;".

I understand the second transformation, but why did EA transform ">" into "&gt;" in the first place? There was not "way to go along"; I just typed...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8482
  • Karma: +207/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: V 7.5: OCL-Validation: "&" Message
« Reply #4 on: April 08, 2010, 08:47:12 pm »
That is probably due to the "rich text" feature of the notes.
Internally the notes are stored in some kind of html markup.
Best report it as a bug.

Geert

philchudley

  • EA User
  • **
  • Posts: 539
  • Karma: +9/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: V 7.5: OCL-Validation: "&" Message
« Reply #5 on: May 29, 2010, 12:38:03 am »
Just to confirm this has been fixed in version 8.0

Cheers
Phil
follow me on Twitter

@SparxEAGuru