Automatically inserting xref and link format, scope, and type attributes

Post here questions and problems related to editing and publishing DITA content.
jtrue
Posts: 2
Joined: Fri Oct 25, 2019 10:04 pm

Automatically inserting xref and link format, scope, and type attributes

Post by jtrue »

Hi,

I'm having trouble getting the format, scope, and type attributes to be inserted automatically when creating xrefs to other DITA topics. I set the DITA preference to always fill values for these attributes for links. The attributes are inserted automatically when I use the DITA/Link menu or toolbar button to insert an xref or link. But the attributes aren't inserted when I use drag-and-drop or Paste as Link to insert an xref or link.

Is there somewhere I can configure these attributes to be inserted when using drag-and-drop or Paste as Link?

I'm using Oxygen Editor 21.0.

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

Re: Automatically inserting xref and link format, scope, and type attributes

Post by Radu »

Hi,

We added those settings as backward compatibility with other tools which seemed to insert the default attribute values although this is not necessary.
Indeed right now we only take the settings into account when using the toolbar actions to insert references. I will add an internal issue to take the settings into account also in the places you mentioned. We'll update this forum thread when an Oxygen version containing your suggestions is released.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jtrue
Posts: 2
Joined: Fri Oct 25, 2019 10:04 pm

Re: Automatically inserting xref and link format, scope, and type attributes

Post by jtrue »

Hi,

Thanks for responding so quickly. We did some testing and determined that we probably don't need these attributes for links to other DITA topics. We're migrating to Oxygen from another tool, so we were trying to make things look the same, but it looks like our publishing tools only need format and scope for external links.

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

Re: Automatically inserting xref and link format, scope, and type attributes

Post by Radu »

Hi,

Right, we only added those settings because there were people migrating to Oxygen from tools which added those attributes. But the attributes are in most cases not necessary. Even the "scope" attribute, its default value is 'local' so you do not need to specify it when referring to a resource in the same project. The "format" attribute, it's default value is "dita" so it needs to be specified only when referring to non-DITA resources like zips, pdfs and Oxygen does this automatically when creating the link.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Automatically inserting xref and link format, scope, and type attributes

Post by sorin_carbunaru »

Hello,

Just wanted to update this thread and let you know that in the recently released oXygen 22 we improved the auto-completion of the @type, @scope and @format attributes. More information at https://www.oxygenxml.com/doc/versions/ ... tent_refer.

Best wishes,
Sorin Carbunaru
oXygen XML
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Automatically inserting xref and link format, scope, and type attributes

Post by chrispitude »

Thanks Sorin!

The @type attribute is useful because we can have CSS that formats <xref> and <link> elements differently for different element types.
Post Reply