Attach a URL to a DITA map - Fluid Topics - Latest

Map Attachments

Category
Technical Notes
Audience
public
Version
Latest

It is possible to attach one or more URLs to a DITA map by uploading a ZIP archive with the following elements through the DITA source:

  • A ditamap file.
  • The DITA topics referred to in the ditamap file.
  • All URLs to attach.

Example

The following template shows how to reference each URLiIn the ditamap file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "http://docs.oasis-open.org/dita/v1.1/OS/dtd/map.dtd">
<map title="my_map_title">
  <title>My Map Title</title>
  <topicref href="topic_1.dita"/>
  <topicref href="topic_2.dita"/>
  <topicref navtitle="Link to an external online resource" type="ft:attachment" processing-role="resource-only">
    <topicmeta>
      <othermeta name="ft:url" content="https://target_url.com"/>
    </topicmeta>
  </topicref>
</map>

Where:

  • navtitle expects the title to display in the Reader page.
  • type="ft:attachment tells Fluid Topics that this reference is a map attachment.
  • href expects the absolute path to the attached file in the ZIP archive.
  • processing-role="resource-only" ensures that the topic reference is not displayed in the map's table of contents.

If ft:url is added in the othermeta tag of a topic reference, users are redirected to the corresponding URL when selecting the attachment in the Reader page.