Attach a Document to a DITA Map with no DITAVAL - Fluid Topics - 3.7

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
FT_Version
3.7
Category
Technical Notes

To add a map attachment to a DITA map with no DITAVAL, add the following lines to the FluidTopicsControlFile.xml file:

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<filePath>my_map.ditamap</filePath>
<attachments>
<attachment>
<originId>my_attachment</originId>
<displayName>My attachment</displayName>
<filePath>$PATH_TO_THE_ATTACHMENT_FILE</filePath>
<filename>$DOWNLOAD_FILENAME</filename>
<mimeType>$ATTACHMENT_MIME_TYPE</mimeType>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Where:

  • resource
    • filePath expects the absolute path to the DITA map file in the archive used to upload the DITA map to Fluid Topics. It can be retrieved from the Metadata Journal, in the dita:mapPath field.
  • attachment
    • originId is the ID given to the file to attach. Make sure that the originId is unique within ALL the DITA map attachments.
    • displayName is the title of the file to attach. It is displayed in the Downloads tab and can be clicked for a direct access to the attachment. In the case of reusing an existing map attachment, if the displayName does not match the initial one, then it overrides it.
    • filePath expects the absolute path to the file to attach in the archive.
    • filename expects the filename of the document to download from the Viewer page.
    • mimeType is the MIME type corresponding to the content of the attachment. It is used to override the attachment type calculated by Fluid Topics.

Indicating an originId for the map attachment is recommended.

Example

The following lines show how to attach the Pufferfish Story PDF file to the Pufferfish DITA map:

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<filePath>_pufferfish.ditamap</filePath>
<attachments>
<attachment>
<originId>pufferfish_story</originId>
<displayName>Pufferfish Story</displayName>
<filePath>pufferfish-story.pdf</filePath>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Once published to Fluid Topics, Pufferfish Story is now available in the Pufferfish DITA map Attachment tab:

Map attachments are available from the Reader page Sidebar