Problem with @ in conref

Oxygen general issues.
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Problem with @ in conref

Post by Denis »

Hi

we are using the Eclipse Oxygen Author in Version 15.2.

I use the

Code: Select all

insertFragmentSchemaAware
method to insert a fragment, which contains a conref attribute. So far so good.

Now I want to refer a file, which contains a »@« symbol in the filename, but in the editor occurs a »Error while parsing external reference: filepath/filename_cut_at_position_@«. The filename ends by the last charakter before the »@« symbol occurs. Of course there is not a file with this name, but when I remove the »@« symbol all works great.

Is there a way to escape the symbol or another way to solve this problem, without to remove the »@« symbol?

Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 9498
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with @ in conref

Post by Radu »

Hi Denis,

The conref attribute value needs to be a valid URI with illegal characters escaped.
You could try to use our API to do this:

Code: Select all

String conrefValue = authorAccess.getUtilAccess().correctURL(originalConrefValue);
then use the corrected value in the XML which get composed to be inserted with the API.

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