Update a DITA Map Attachment with a Control File - Fluid Topics - 3.10 - Technical Notes

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
Fluid Topics Version
3.10
Category
Technical Notes
Language
English
Target Audience
public

It is possible to update an existing map attachment by using a control file.

Example to rename a map attachment

The following example shows how to rename a document attached to a DITA map already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with a new name in the displayName element.

    <?xml version="1.0" encoding="UTF-8"?>
    <controlFile>
    <resources>
    <resource>
    <filePath>my_map.ditamap</filePath>
    <instances>
    <instance>
    <filePath>version1.ditaval</filePath>
    <attachments>
    <attachment>
    <khubId>$ATTACHMENT_KHUB_ID</khubId>
    <displayName>The new name for my attachment</displayName>
    </attachment>
    </attachments>
    </instance>
    </instances>
    </resource>
    </resources>
    </controlFile>

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

It is possible to validate the control file against the following XML Schema Definition (XSD) file: https://ref.fluidtopics.com/3.5/control_file.xsd.

Example to add a URL to a map attachment

The following example shows how to remove a URL from a document attached to a DITA map already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with an originUrl element.

    <?xml version="1.0" encoding="UTF-8"?>
    <controlFile>
    <resources>
    <resource>
    <filePath>my_map.ditamap</filePath>
    <instances>
    <instance>
    <filePath>version1.ditaval</filePath>
    <attachments>
    <attachment>
    <khubId>$ATTACHMENT_KHUB_ID</khubId>
    <originUrl>http://my_target_website.com</originUrl>
    </attachment>
    </attachments>
    </instance>
    </instances>
    </resource>
    </resources>
    </controlFile>

    Note: Do not forget to add http:// or https:// at the beginning of the URL. Otherwise, Fluid Topics will not be able to resolve the URL properly.

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

Example to remove a URL from a map attachment

The following example shows how to remove a URL from a document attached to a DITA map already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with an empty originUrl element.

    <?xml version="1.0" encoding="UTF-8"?>
    <controlFile>
    <resources>
    <resource>
    <filePath>my_map.ditamap</filePath>
    <instances>
    <instance>
    <filePath>version1.ditaval</filePath>
    <attachments>
    <attachment>
    <khubId>$ATTACHMENT_KHUB_ID</khubId>
    <originUrl></originUrl>
    </attachment>
    </attachments>
    </instance>
    </instances>
    </resource>
    </resources>
    </controlFile>

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

If a map attachment was added to a map using the legacy method (mapping.json), it is necessary to use its khubId to update it with the control file method.