oXygen 15 xref format attribute error

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

oXygen 15 xref format attribute error

Post by bmayer »

Hi,

I am currently testing oXygen 15 version 2013061418 on Eclipse. We use both these to write DITA XML content. I noticed that if I insert an xref to an external website I get an oXygen warning stating "Reference with external scope to non-DITA resource does not have the "format" attribute set correctly on it." The xref I used is <xref href="http://www.blackberry.com" scope="external"/>. Looking at the DITA 1.2 spec, the format attribute is optional. Is there a way to turn off this warning message or is the format attribute now required?

Thanks,
Belinda
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

The DITA 1.2 specs for @format:

http://docs.oasis-open.org/dita/v1.2/os ... tattribute

states that:
The processing default for format is "dita".
So you should always specify it on web links or on links to other non-DITA resources. Otherwise the publishing process might interpret the link as a link to a DITA topic.
When you have a DITA topic opened for editing, the Author toolbar has a link drop down which allows you to insert cross references but it also has a special action called "Web Link" allowing you to insert the link with both @format and @scope set to it. The actual value is less important, as long as it is not DITA.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: oXygen 15 xref format attribute error

Post by bmayer »

Hi Radu,

Using the web link button (very cool), the format attribute value is taking the web link extension instead of setting to html. Examples:

<p><xref href="http://www.blackberry.com" format="com" scope="external"/>
<xref href="http://www.blackberry.ca" format="ca" scope="external"/>
</p>

Is there a setting to change for that? We're using the Eclipse plug-in.

Thanks,
Belinda
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

Indeed in such cases our "Web link" action should prefer to set format="html". I added an issue for it and it will probably be fixed in Oxygen 15.1 in a couple of months.

The published output usually looks at the @format attribute only to determine if the resource is "dita" or non-DITA so even with this inconsistency the published output should work fine.

This could be fixed on your side by editing the DITA-specific customization but I think that the easiest way for you would be to define a custom code template. In the Eclipse Preferences there is an Oxygen-specific preferences page called "Code Templates". If you create a new code template with the name xref (weblink) and the content:

Code: Select all

<xref href="${ask('Link', url_chooser, '')}" format="html" scope="external"/>
and then you go to the Author visual editing mode and press ENTER, that code template will be available for choosing. It will also be available in the Text mode.
This particular code template shows a simple URL chooser and after the user closes will insert the XML in the editor at the caret position.

More about code templates here:

http://www.oxygenxml.com/doc/ug-editorE ... lates.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: oXygen 15 xref format attribute error

Post by bmayer »

Thanks Radu, that works for now. For links with an ampersand is there any chance you can add a fix so that it escapes the ampersand the same way the Eclipse Attributes view does? Using the Attributes view, if you paste in a link with an ampersand it brings up a dialog box asking if you want to escape the ampersand or manually fix it. Web Link also gives an error for Livelink links saying "Couldn't execute operation: 'ro.sync.ecss.extensions.dita.link.InsertXrefOperation' for action: 'Web Link' because of: Could not insert document fragment. Cause: The reference to entity "objId" must end with the ';' delimiter."
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

I tested and you are right.
We'll fix the "Web Link" action to auto escape characters which are invalid in attribute values + add the fix for the "format" attribute we discussed previously in the thread.
This improvement will probably be available in Oxygen 15.1 in August-September this year. I will update the thread after the release.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: oXygen 15 xref format attribute error

Post by bmayer »

Hi Radu,

In 15.1 I noticed that the fix to escape ampersand characters is there, thanks for fixing that. If I insert a Livelink link using the weblink icon, the format attribute is set to dll instead of html.

Thanks,
Belinda
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

Indeed the issue we previously discussed was fixed in 15.1 but I just did not have time to update the thread. About the second issue, what does the URL of such a link look like?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: oXygen 15 xref format attribute error

Post by bmayer »

Hi,

Here's an example of a Livelink link I inserted, I blocked out the first portion and put x's in place for security reasons.

Code: Select all


<xref href="http://xxx/livelink/llisapi.dll?func=ll&objId=48370074&objAction=browse&sort=name" format="dll" scope="external"/>
Thanks,
Belinda
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

I understand but I cannot figure out a way in which the application could decide in such cases if the user added a link to a binary DLL library resource which should be downloaded (and thus the format="dll" would be correct) or to a script which actually returns HTML content in which case probably the "format='html'" would be more appropriate.
Maybe in such cases you could edit the @format attribute after the insertion of the reference.

Or maybe as an alternative the action which inserts the xref would present in the same dialog the value which it will be set for the @format attribute allowing the user to override the value where appropriate.
What would you think of such an enhancement?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bmayer
Posts: 22
Joined: Mon Jul 09, 2012 5:30 pm

Re: oXygen 15 xref format attribute error

Post by bmayer »

Hi Radu,

That 2nd option sounds interesting. If you had the default set in the insert link dialog box, I assume it would normally be html for most links, that would allow the user to change it before inserting it. That way they don't forget to update it correctly.

Cheers,
Belinda
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Belinda,

Ok, I will add an improvement request for this one.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Laverne
Posts: 1
Joined: Thu Mar 06, 2014 1:05 pm

Re: oXygen 15 xref format attribute error

Post by Laverne »

Is there any way that the "Couldn't execute operation: 'ro.sync.ecss.extensions.dita.link.InsertXrefOperation' for action: 'Web Link' because of: Could not insert document fragment. Cause: The reference to entity "clk" must end with the ';' delimiter." issue for web links will be fixed for Oxygen 14.X?

The CMS we are using only supports 14.X, so we cannot upgrade to 15.
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen 15 xref format attribute error

Post by Radu »

Hi Laverne,

Unfortunately not, we only go back and build new kits from older versions when there is a very serious bug (application crashes for example).
You are using the SDL CMS, right? We have frequent discussions with their developers and in my opinion it will not be long until they offer a connector for Oxygen 15.2. Should I try to ask them about their plans?

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