Page 1 of 1

Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Fri Jan 10, 2020 7:42 pm
by Ron Van den Branden
Hi,

In Oxygen-21.1 (build 2019120214) I'm experiencing problems with an ANT transformation scenario that's making use of the ${ask} editor variable. The transformation used to work (and is still working) without problems in earlier Oxygen versions, so it seems tied to version 21.1.

The variable is defined as follows:

Code: Select all

<field name="value">
  <String>${ask('Indiquer quel(les) lettre(s) à traiter', combobox, ('${cfu}':'uniquement cette lettre'; '${cfdu}':'toutes lettres du même fonds';'${pdu}/data/lettres':'toutes lettres de l'édition'))}</String>
</field>
When this editor variable is evaluated, following error is thrown:

Code: Select all

An error occurred while expanding the 'ask' editor variable, at line 1, column 180. Please check the syntax of the editor variable: '${ask('Indiquer quel(les) lettre(s) à traiter', combobox, ('${cfu}':'uniquement cette lettre'; '${cfdu}':'toutes lettres du même fonds';'${pdu}/data/lettres':'toutes lettres de l'édition'))}'.
Has anything changed w.r.t. the ${ask} editor syntax in the latest Oxygen version? Also, I saw that some errors with evaluation of the ${ask} editor variable had been fixed in build 2019120214. Could this be another bug?

Kind regards,

Ron

Re: Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Mon Jan 13, 2020 10:27 am
by sorin_carbunaru
Hello Ron,

The problem is the apostrophe from l'édition , which is considered to be the end of the message. As a workaround, you could add a backslash before the apostrophe, and that will fix the syntax, but unfortunately the backslash will also be visible in the combo box value. I added a new issue to remove the backslash from the combo box value label (EXM-44851 - for reference purposes). We will update this thread when the issue is fixed.

All the best wishes,
Sorin Carbunaru
oXygen XML

Re: Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Mon Jan 13, 2020 11:47 am
by Ron Van den Branden
Hi Sorin,

Many thanks for your workaround. Until Oxygen-21, I managed to "escape" the apostrophe by enclosing the value for that variable in which it occurs in double quotes (analogous to how either single or double quotation marks can be used as XML attribute delimiters): see my previous example.

However, Oxygen-21 doesn't seem to allow double quotation marks as delimiters for editor variables anymore: my example only works if double quotation marks are replaced with single quotation marks, and the apostrophe is escaped with the backslash:

Code: Select all

  <field name="value">
    <String>${ask('Indiquer quel(les) lettre(s) à traiter', combobox, ('${cfu}':'uniquement cette lettre'; '${cfdu}':'toutes lettres du même fonds';'${pdu}/data/lettres':'toutes lettres de l\'édition'))}</String>
  </field>
With the single quotation marks as delimiters, and the backslash escape for the apostrophe, I can confirm it works in Oxygen-21; the backslash is indeed shown in the combo box value label.

If it may be of any help in debugging the issue: Oxygen-19 accepts the double quotation marks as delimiters, and does remove the backslash from the combo box value label.

Best,

Ron

Re: Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Mon Jan 13, 2020 12:39 pm
by sorin_carbunaru
In oXygen 21.1, the editor variable expanding has been almost completely re-written, to allow for more complex constructions (many nested variables). That's why a few bugs have started to show up since then.

Indeed, the syntax is now more strict when it comes to message delimiters. We only accept single quotes for delimiting messages, at least for now. We already have an improvement request to also allow double quotes (EXM-43853), and I added your vote.

Re: Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Thu Feb 13, 2020 12:54 pm
by sorin_carbunaru
Hi Ron,

Just wanted to let you know that oXygen 22 was released yesterday and it contains a fix for the issue regarding the appearance of the apostrophe in the combo box when you escape it (EXM-4485).

Best wishes,
Sorin C.

Re: Oxygen-21.1: bug with evaluation of ${ask} editor variable?

Posted: Wed Mar 25, 2020 11:05 pm
by Ron Van den Branden
Thanks, Sorin!