Issue with the "insert.olink" action?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Issue with the "insert.olink" action?

Post by csun »

Hi,

With a DocBook 5 framework opened in Oxygen Author 21.0, it seems that if the action "insert.olink" is performed (which executes the operation ro.sync.ecss.extensions.docbook.olink.InsertOLinkOperation), it would display an error message in case the <xreftext> of the target includes characters such as &amp; or &lt;. For example:
<xreftext>a &amp; b</xreftext>
or
<xreftext>a &lt; b</xreftext>

The error messages for the above are, respectively,
"Could not insert document fragment. Cause: The entity name must immediately follow the '%26' in the entity reference."
and
"Could not insert document fragment. Cause: The content of elements must consist of well-formed character data or markup."

(By the way, if the <xreftext> contains &gt; the "insert.olink" action works fine.)

Is this caused by a bug with the implementation of ro.sync.ecss.extensions.docbook.olink.InsertOLinkOperation ?

Thanks,
Charles
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issue with the "insert.olink" action?

Post by Radu »

Hi Charles,

Thanks for the report, I added an internal issue for it. I looked a little bit in our code and indeed this looks like a bug on our side.
By the way, as a side note it is not necessary to escape the ">" character in XML, only the "<" is illegal to be inserted directly in XML text.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Re: Issue with the "insert.olink" action?

Post by csun »

Hi Radu,

Thanks for looking into this.

If I understand correctly, the fix be released with a future version of Oxygen. Before that happens, is there a workaround you would recommend, by any chance?

I think one workaround is to check off the "Insert xreftext in the Olink" box while in the "OLink" dialog, and then manually type in (or copy-paste) the link text in the XML. But if you know a better workaround, I'll be interested to learn about it.

Thanks!
Charles
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issue with the "insert.olink" action?

Post by Radu »

Hi Charles,

Other than what you mentioned I do not have another workaround.

The issue I added for this has internal ID EXM-44297, we'll fix the problem in Oxygen 22 (January 2020) but if this is important for you I can also try to add a fix for the next Oxygen 21.1 minor bug fix release (hopefully we can make another bug fix release in one month or so depending on how many issues we fixed on it).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issue with the "insert.olink" action?

Post by Radu »

Hi,

The latest Oxygen 21.1 kits available on our web site should have this problem fixed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply