Page 1 of 1

oXygen 15 xref format attribute error

Posted: Wed Jun 19, 2013 5:11 pm
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

Re: oXygen 15 xref format attribute error

Posted: Wed Jun 19, 2013 5:25 pm
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

Re: oXygen 15 xref format attribute error

Posted: Fri Jul 19, 2013 11:18 pm
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

Re: oXygen 15 xref format attribute error

Posted: Mon Jul 22, 2013 12:03 pm
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

Re: oXygen 15 xref format attribute error

Posted: Tue Jul 23, 2013 6:53 pm
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."

Re: oXygen 15 xref format attribute error

Posted: Wed Jul 24, 2013 8:59 am
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

Re: oXygen 15 xref format attribute error

Posted: Thu Oct 17, 2013 5:17 pm
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

Re: oXygen 15 xref format attribute error

Posted: Thu Oct 17, 2013 5:21 pm
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

Re: oXygen 15 xref format attribute error

Posted: Thu Oct 17, 2013 6:04 pm
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

Re: oXygen 15 xref format attribute error

Posted: Fri Oct 18, 2013 12:32 pm
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

Re: oXygen 15 xref format attribute error

Posted: Fri Oct 18, 2013 4:03 pm
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

Re: oXygen 15 xref format attribute error

Posted: Fri Oct 18, 2013 4:25 pm
by Radu
Hi Belinda,

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

Regards,
Radu

Re: oXygen 15 xref format attribute error

Posted: Thu Mar 06, 2014 1:13 pm
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.

Re: oXygen 15 xref format attribute error

Posted: Thu Mar 06, 2014 1:25 pm
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