Using conkeyref-push to replace one topic with another at the map level


Chris Papademetrious
 

Hi folks!

According to the DITA spec at

https://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/archSpec/base/conref-overview.html

a conref/conkeyref can target:

  • A referenced element within a DITA map
  • A referenced element within a DITA topic
  • An entire DITA map
  • An entire DITA topic

We have a need to replace a boilerplate topic in a reused map with a product-specific topic. I created the following test map (topics 1-3 would actually be in the reused map):

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:oasis:names:tc:dita:rng:map.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<map>
    <title>Map</title>
    <topicref href="topic_2_replacement.dita" processing-role="resource-only"
        conkeyref="topic_2" conaction="pushreplace" />
    <topicref href="topic_1.dita" keys="topic_1"/>
    <topicref href="topic_2.dita" keys="topic_2"/>
    <topicref href="topic_3.dita" keys="topic_3"/>
</map>

but the DITA-OT issues the following error:

[conref-push] [DOTJ041E][ERROR] The attribute conref="topic_2.dita" uses invalid syntax. The value should contain '#' followed by a topic or map ID, optionally followed by '/elemID' for a sub-topic element.

It doesn't seem to want to operate on an entire topic. I was able to approximate the behavior by moving the pushes into the replacement topic <title> and <body> elements, but this is fragile and awkward.

Are entire-topic (and entire-map) operations not supported after all? Thanks in advance for any help!

 - Chris

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