I completely agree. I often get warnings because the type is inherited from the parent and not set for the child topics. The OT warnings are fairly generic too:
System ID: C:\dita\products\simon\EN\Simon_Plus_User_Manual.ditamap
Scenario: User Manual (PDF)1.5.4 O2/Comtech
Input file: C:\dita\products\simon\EN\Simon_Plus_User_Manual.ditamap
Engine name: DITA-OT
Severity: warning
Description: [DOTX019W]: The type attribute on a topicref element does not match the target topic. The type attribute was set to 'reference', but the topicref points to a more specific 'concept' topic. This may cause your links to sort incorrectly in the output. Note that the type attribute cascades in maps, so the value 'reference' may come from an ancestor topicref. Check and make the type attribute on the topicref matches the actual type of topic.The location of this problem was at (File = C:\dita\products\simon\EN\Simon_Plus_User_Manual.ditamap, Element = topicref:32)
As it’s not necessarily simple to find out which reference is 32 (Are there any shortcuts I’m not aware of?), I wrote a php script to parse up the map and return output showing the topicref href and the number. (If anyone wants a copy of this script, let me know.)
I also agree with Radu’s point that it’s more flexible not to put it in so that if the topic type changes no map changes are necessary.
I’m currently in a mixed authoring environment with both Xmetal/Oxygen and Xmetal always inserts the type. Maybe there could be a tool function to “Insert/Remove topicref types in map” within Oxygen or perhaps the validation could include detecting the specific topics that don’t match the type in the map?
It’s not a terrible problem for me as they’re just warnings and I haven’t noticed any adverse effects but I do try to keep my warnings to a minimum.
Matt
From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Yves Barbion
Sent: Thursday, August 16, 2012 5:08 AM
To: oXygen User ML
Subject: [oXygen-user] Automatically add @type when a topicref is added to a DITA map
Hi group
When I add a topicref to a DITA map, I see that the @type attribute is left unspecified. It would be nice if the @type attribute would then automatically be filled in, depending on the information type of the topic. For example, when I add a topicref to a task topic, the @type attribute would automatically be type="task".
Is this possible or is this a new feature request?