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

Map Attachments

Category
Technical Notes
Audience
public
Version
Latest

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

  • A ditamap file.
  • The DITA topics referenced in the ditamapfile.
  • All files to attach.

Example

The following template shows how to reference each file's information using a topicref tag in 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="Attachment 1" href="attachment_1.mp4" type="ft:attachment" processing-role="resource-only"/>
</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.