Working with DITA topic identifiers

When writing my new user documentation using DITA I have found myself attempting to maintain a consistent naming convention for my unique topic IDs. The problem with this approach (to me at least) is that it would be fairly easy to inadvertently reuse the same “unique” identifier for two separate topics.

I found that a lot of online user documentation that uses DITA (or something very similar) chose to use GUIDs rather than carefully named identifiers. A much easier solution! All I needed was a quick and easy way to generate GUIDs in my XML documentation.

Unfortunately the XML software that I use (OxygenXML) doesn’t have a GUID generator built-in as standard. Instead of wasting time trying to figure out how to write a Java plugin for Oxygen I wrote a simple C# application that registers a system-wide hotkey Ctrl+Shift+V which generates a new GUID (with a custom prefix “guid-“) and then proceeds to paste that into the application that I am working with (Oxygen and Notepad++). Another nice touch is that because this uses the clipboard Ctrl+V can be used to re-paste the same GUID over and over until a new GUID is generated (or until something else is copied to the clipboard!)

Screenshot of GUID Generator

I added a few extra options which others might benefit from and uploaded the source (BSD) and a compiled executable to GitHub for anyone else that might find this of use!

https://github.com/kruncher/guid-generator-hotkey