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

jtrue
Posts: 2
Joined: Fri Oct 25, 2019 10:04 pm

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

Post by jtrue » Fri Oct 25, 2019 10:25 pm

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: 6704
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Mon Oct 28, 2019 10:07 am

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 » Tue Oct 29, 2019 10:28 pm

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: 6704
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Wed Oct 30, 2019 9:42 am

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
Site Admin
Posts: 286
Joined: Mon May 09, 2016 9:37 am

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

Post by sorin_carbunaru » Thu Feb 13, 2020 2:22 pm

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: 105
Joined: Thu May 02, 2019 2:32 pm

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

Post by chrispitude » Fri Feb 14, 2020 3:28 pm

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