On 2/23/21 8:12 AM, Grundtvig Nielsen, Niels Peter wrote:

obviously enough, keyrefs are not resolved when I convert a single topic to an output format; and XML Mind helpfully alerts to me to this with the message

file:/T:/17_yumi/ownerManual/yuo_048.dita:49:55: cannot resolve keyref="productName" and there is no "href" fallback attribute

But I am then left wondering what a fallback attribute might be, and how to use one. I may soon be required to output quite a lot of topics to xhtml for a test, and it will be inconvenient to have gaps every time the product name should appear :-}

Thanks in advance for any advice on this.


--> The sensible fallback value for a keydef like this one:
---
<keydef href="screenshots/consoleMode.png" keys="consoleMode"/>
---

is of course adding attribute href="screenshots/consoleMode.png" to your <image> in addition to keyref="consoleMode", for example:

---
    <fig>
      <image href="screenshots/consoleMode.png" keyref="consoleMode"/>
    </fig>
---

The magic of the keyref is to make the fig/image point to a file other than "screenshots/consoleMode.png" provided that you redefine key "consoleMode" in a different DITA map.



--> There is no sensible fallback value for a keydef like this other one:
---
    <keydef keys="productName" navtitle="Name of the product.">
      <topicmeta>
        <keywords>
          <keyword>Fancy Gizmo</keyword>
        </keywords>
      </topicmeta>
    </keydef>
---

If you want to get rid of the warning, the only way is to first open a DITAMAP (a mockup one or a real one) referencing the topic you want to convert and defining the key, and then open the topic, for example to convert it.

This should work fine thanks to the *automatic* master document mechanism to XXE:

- See tutorial "Working with master documents", http://www.xmlmind.com/xmleditor/_tutorial/master_doc/index.html

- See "Use as Master Document", http://www.xmlmind.com/xmleditor/_distrib/doc/help/toolsMenu.html



--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to