[oXygen-user] Automatically add @type when a topicref is added to a DITA map

KAATMAN Matthew matthew.kaatman at biomerieux.com
Thu Aug 16 08:09:08 CDT 2012


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 at oxygenxml.com [mailto:oxygen-user-bounces at 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?

Thanks

--
Yves Barbion
www.scripto.nu<http://www.scripto.nu>

AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes.
NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20120816/951bc24d/attachment-0001.html 


More information about the oXygen-user mailing list