Page 1 of 1

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

Posted: Fri Oct 25, 2019 10:25 pm
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!

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

Posted: Mon Oct 28, 2019 10:07 am
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

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

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

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

Posted: Wed Oct 30, 2019 9:42 am
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

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

Posted: Thu Feb 13, 2020 2:22 pm
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

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

Posted: Fri Feb 14, 2020 3:28 pm
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.