Page 1 of 1

Default Topic Reference Properties Values

Posted: Wed Sep 17, 2014 12:20 am
by Christy_K-L
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"

Re: Default Topic Reference Properties Values

Posted: Wed Sep 17, 2014 8:43 am
by Radu
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 ... ibute.html

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

http://docs.oasis-open.org/dita/v1.2/os ... ibute.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 ... ibute.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

Re: Default Topic Reference Properties Values

Posted: Fri Sep 19, 2014 11:58 pm
by Christy_K-L
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

Re: Default Topic Reference Properties Values

Posted: Mon Sep 22, 2014 8:52 am
by Radu
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

Re: Default Topic Reference Properties Values

Posted: Tue Jan 05, 2016 11:22 am
by Radu
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

Re: Default Topic Reference Properties Values

Posted: Thu Nov 09, 2017 2:09 am
by samathews
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.

Re: Default Topic Reference Properties Values

Posted: Thu Nov 09, 2017 8:57 am
by Radu
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