Hi Frank,

So:


Good to know that the Type and Format attributes are neither required nor good practice. /.../
There is a problem which may occur if you are using the @type attribute on and off inconsistently.

So let's say you have a DITA Map which uses it a lot like:


  <topicref href="topics/task.dita" type="task"/>
and then you decide not to use it anymore on topicrefs, so you might end up with something like this:


  <topicref href="topics/task.dita" type="task">
      <topicref href="topics/concept.dita"/>
  </topicref>
So the reference to "concept.dita" no longer has @type set on it, but the parent task.dita has type set on it. And the DITA specification states that in such cases the @type attribute value cascades to the child element. So when publishing the DITA Map content is interpreted as:


  <topicref href="topics/task.dita" type="task">
      <topicref href="topics/concept.dita" type="task"/>
  </topicref>
which will trigger a publishing warning.

Oxygen's "Validate and check for completeness" action from the "DITA maps manager" view should report such problems.

But in general, once you decide not to use @type in the DITA map, you should actively remove the attribute from the DITA Map otherwise you end up with @type attribute values cascading on to topicrefs which no longer have the @type attribute set.


I right-clicked in the Editor window and selected /"/Insert > Insert New DITA Resource", then I selected a custom framework template.

Thanks, I added your details to the already opened issue.


Regards,

Radu

Radu Coravu
Oxygen XML Editor


On 1/9/23 17:02, Frank Dissinger wrote:

Hi Radu,


Thank you for this clarification. Good to know that the Type and Format attributes are neither required nor good practice. This makes life easier.

    /I tested and indeed, if in the DITA Maps Manager I insert a
    reference to an existing topic file, the attributes are
    automatically added, but if I use for example the contextual
    action "Append child->New" to create a topic and insert a
    reference to it, then indeed the attributes are not set on the
    topicref. Is this close to how you are doing things on your side?/

I right-clicked in the Editor window and selected /"/Insert > Insert New DITA Resource", then I selected a custom framework template.

/
/

Regards,

Frank/

/

------------------------------------------------------------------------
Am 04.01.2023 um 06:57 schrieb Oxygen XML Editor Support (Radu Coravu):

Hi Frank,


Please see some remarks below:


I understand that the "type" and "format" attributes are required or at least a good practice for "topicref" elements.

They are not required and they are not a best practice either.

From what I've experienced along these years, most end users who want these attributes to be added automatically are usually the ones migrating from Framemaker or using both Oxygen and Framemaker on the same set of DITA files.

My general best practice for these attributes would be:


1) For the "type" attribute, never set it on any link or topicref as the publishing engine will infer it from the target.

2) For the "format" attribute, Oxygen by default sets it on references to DITA Maps and non-DITA topics, but when referencing DITA topics, the @format attribute is not set automatically as it's default value when not set is "dita".



When I insert a new dita resource into a ditamap (i.e. a new topic or map which I create and insert in one go), oXygen should add these attributes automatically. I have set the options under "Options > Preferences > DITA > Maps" accordingly.


However, only "format" attributes are set, "type" attributes are not set although I have checked both options.
Checking those "Format" and "Type" checkboxes in the "Options > Preferences > DITA > Maps" preferences page should work...

I tested and indeed, if in the DITA Maps Manager I insert a reference to an existing topic file, the attributes are automatically added, but if I use for example the contextual action "Append child->New" to create a topic and insert a reference to it, then indeed the attributes are not set on the topicref. Is this close to how you are doing things on your side?

I added an internal issue to look into fixing this problem on our side, adding the issue ID below for future reference:


    EXM-52131 DITA Maps Manager creating new topic does not automatically add type and format attributes to topicref


Hope this helps.


Regards,

Radu

Radu Coravu
Oxygen XML Editor


On 1/3/23 21:08, Frank Dissinger wrote:

Hi list,


I understand that the "type" and "format" attributes are required or at least a good practice for "topicref" elements.


When I insert a new dita resource into a ditamap (i.e. a new topic or map which I create and insert in one go), oXygen should add these attributes automatically. I have set the options under "Options > Preferences > DITA > Maps" accordingly.


However, only "format" attributes are set, "type" attributes are not set although I have checked both options.


Is this a bug or am I missing something?


I use oXygen V25.


Regards,


Frank
--

*Frank Dissinger*

Documentation Manager

....................................................................

*CGS Publishing Technologies International GmbH*

*Email *frank.dissin...@cgs-oris.com | *Web* www.cgs-oris.com <http://www.cgs-oris.com/>

*Address* Kettelerstr. 24 | D-63512 Hainburg | Germany

*Phone* +49 6182 9626-27 | *Fax* +49 6182 9626-99

*Commercial register* Offenbach, HRB no. 21495

*Managing directors* Bernd Rückert, Christoph Thommessen


https://www.cgs-oris.com/Signatur.png <https://www.cgs-oris.com/signatur>

_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to