Default Topic Reference Properties Values

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Christy_K-L
Posts: 4

Default Topic Reference Properties Values

Wed Sep 17, 2014 12:20 am

Is there a way to have topics modified to default to certain DITA-required properties? For example, a reference topic would have the following properties populated to save time: format="dita", scope="local", type="reference"
Radu
Posts: 5090

Re: Default Topic Reference Properties Values

Wed Sep 17, 2014 8:43 am

Dear Christy,

Oxygen intentionally does not have such a feature.

The DITA 1.2 specification states that:

1) If the format attribute is missing, the processor should interpret it as dita:

http://docs.oasis-open.org/dita/v1.2/os/spec/common/theformatattribute.html

2) If the scope attribute is missing, the processor should interpret it as local:

http://docs.oasis-open.org/dita/v1.2/os/spec/common/thescopeattribute.html

3) If the type attribute is missing, it should be automatically detected from the target type by the publishing engine

http://docs.oasis-open.org/dita/v1.2/os/spec/common/thetypeattribute.html

So it would be redundant to set these three attributes with their default values to each topic reference.

Could you tell me more about your use case?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Christy_K-L
Posts: 4

Re: Default Topic Reference Properties Values

Fri Sep 19, 2014 11:58 pm

Radu,

Thank you for your response.

We have recently switched to oXygen from another XML editing tool. When we attempted to upload our content to our content management system, we received an error. Once the writer modified the properties for the attributes, the error no longer occured. Having to update these properties for each topic is an extra step that the writers with which I work have not had to complete in the past.

Christy
Radu
Posts: 5090

Re: Default Topic Reference Properties Values

Mon Sep 22, 2014 8:52 am

Hi Christy,

What exact CMS are you using? Maybe I can find some contacts on their side and ask their opinion on this.

In my opinion there indeed could be problem when you have DITA Maps which have been edited so that each topicref has the type attribute set to them, then you switch to an XML editor which no longer adds there attributes whenever the added values would be the same as the default values specified in the DITA standard. The problem may arise because the type, scope and format attributes are defined by the DITA standard as being inheritable from ancestor topicrefs.

So for example let's say you already have a topicref pointing to a DITA concept in the DITA Map added with the older XML editor like:

Code: Select all

<topicref href="topics/care.dita" type="concept">


Then using Oxygen you add as the child of this topicref a reference to a topic but Oxygen will no longer set the @type attribute:

Code: Select all

  <topicref href="topics/care.dita" type="concept">
    <topicref href="tasks/pruning.dita"/>
  </topicref>


Because Oxygen no longer sets @type explicitly on the topicref, the DITA specification states that the attribute is inherited from the ancestor topicref so it is treated as a "concept" reference despite the fact that it is a reference to a simple "topic".

Ideally you could go through the DITA Map and remove the scope, type and format attributes whenever they have the same value as the default values in the specification or in the case of @type if the referenced resource is enough to determine the type from.

We'll also look on our side to see if we can do anything in order to prevent such problems.

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

Re: Default Topic Reference Properties Values

Tue Jan 05, 2016 11:22 am

Hi,

Just to update this older thread, Oxygen 17.1 added in the Preferences->DITA page settings to always fill values for the topicref format, scope and type attributes.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
samathews
Posts: 2

Re: Default Topic Reference Properties Values

Thu Nov 09, 2017 2:09 am

Apologies for a late post, but I'm looking for information on this feature for v 17.1 Author. When I have a topic open in the Authoring window and attempt to insert a reference to it in a map open in maps manager using Insert reference to currently edited file, the scope, format, and type attributes aren't getting picked up like when inserting topic references unopened local files or those in our CCMS. Is there something I've configured in error that I could fix?

Thanks for your help and advice.
Radu
Posts: 5090

Re: Default Topic Reference Properties Values

Thu Nov 09, 2017 8:57 am

Hi,

From what I tested in Oxygen 17.1 the DITA Maps Manager contextual menu Append child->Reference... properly takes into account these settings. Indeed if you use the Append child->Reference to the current edited file... it does not take the settings into account.
This is a bug which seems to have been resolved in more recent versions of Oxygen, for example I tested with the latest Oxygen 19.1 and it takes the settings into account when using the Reference to the current edited file....
So you should try updating your used copy of Oxygen.

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 1 guest