dita-ot/dita-ot — pull request #1356 by Schwamkrug (2012-08-10 03:25:08+00:00)
Title: Copy subelements of key definitions to key-referencing topicrefs.

Currently, when a topicref (or specialization of topicref) references a
key, the subelements of the key definition are not copied to the
topicref. For example, for the following map:

Navtitle Element
Linktext Element

Keyref processing produces this map:

Navtitle Element
Linktext Element

This is particularly problematic for and its children as, in
their abscence, later processing will fill them in with values like the
@navtitle attribute, topic title, or @href attribute.

To fix this, I added some additional Stacks to keep track of whether the
current topicref references a key, whether the key definition has
non-topicref subelements (ie data, topicmeta), and the value of the
class attribute for the current element.

I also added an additional parameter to domToSax() to specify whether
class attribute values should be changed from map/___ to topic/___. The
current behavior is to always rename them. This is problematic when
copying to topicref, as later processing expects the class attributes to
be map/___ (ie map/topicmeta). I updated existing calls to domToSax() to
pass true so existing behavior is maintained.