keys and scoped keys #conref


Wim Hooghwinkel
 

Hi all,

I’m trying to figure out a use case for scoped keys. After reading this very helpfull article (https://www.oasis-open.org/committees/download.php/56472/Understanding%20Scoped%20Keys%20In%20DITA%201.3.pdf) I’m wondering if anything has changed for OT 3.x. I’m now using OT 2.5.x.

This is how I would have expecetd it to be implemented - and what I actually need:

In my main project (ditamap) I have defined several keys. Let’s say Key1 defines 'Blue' and Key2 defines ’Square'. 
So all te topics and submaps in my project will resolve keyref to Key1 as 'Blue' and keyref to Key2 as 'Square'.
Now, in one of my submaps I need to refer to a Red Square. I set the keyscope of that map to 'mymapscope'. I define a key named 'Key1’ with value 'Red'. And expect the topics in that map to resolve keyref to Key1 to 'Red', so they display 'Red  Square'. 
But, unfortunately, that’s not the case. The still show 'Blue Square'.

From the above article, I learned that even with key scopes, the parent definition wins over a nested one. For my use case, that would implie that I have to remove the keydefs from my main map, set a keyscope for each and every submap, use the same definitions everywhere, except for one, just to be able to make use of the keyscope features. That adds a lot of overhead and managing keydefs.

So, am I right to conclude that a nested keydef, even within it’s own keyscope, does NOT override a parent keydef? Did this change in OT 3.x - or can anyone point me to an elegant solution for this without the need to repeat the same keydefs for every parrallel nested map or topic?

thanks!


Vriendelijke groet / Kind regards,
 
Wim Hooghwinkel






Join main@dita-users.groups.io to automatically receive all group messages.