DITAVALs - Fluid Topics - 3.3

Upload DITA Content to Fluid Topics

Product
Fluid Topics
FT_Version
3.3
Category
Technical Notes

In DITA, a topic or a map content can be used within several publications according to different metadata values specified in the DITAVAL.

Fluid Topics needs to know that a group of publications were in fact from the same origin. Two topics or maps that are present in a same top map, published in Fluid Topics with DITAVAL files, are considered as such.

Fluid Topics retrieves the DITAVAL file names, e.g., x1 and x2 are retrieved from x1.ditaval and x2.ditaval, associated to the top map to publish. From these names, Fluid Topics generates a cluster with both x1 and x2 as tag values.

To generate a cluster from two variants, novice and expert, for the document “Marvel Comics History”:

Create two DITAVAL files: one file per version of the document.

The following lines show the DITAVAL file content for the novice audience version, which excludes the content tagged for the expert audience:
<?xml version="1.0" encoding="UTF-8"?>
<val>
  <prop action="exclude" att="audience" val="expert"></prop>
</val>
The following lines show the DITAVAL file content for the expert audience version, which excludes the content tagged for the novice audience:
<?xml version="1.0" encoding="UTF-8"?>
<val>
  <prop action="exclude" att="audience" val="novice"></prop>
</val>

Name the DITAVAL files with the term or expression to display on the cluster selector. Fluid Topics retrieves the filenames to create values of the DITAVAL facet and to generate the cluster selector.

For example, the DITAVAL files can be named as follows:
  • Novice.ditaval
  • Expert.ditaval
Declare the dita:ditaval metadata element in the conf.json file. The following lines show an example where the dita:ditaval metadata element is declared in descriptors and set to be displayed as a tag in the Search Results page and in the Reader page and as a facet in the Homepage and in the Search Results page.
{
  "projectName": "...",
  "ui": {...
  },
  "footer": {...
  },
  "metadata": {
    "descriptors": [
      ...,
      {
        "id": "dita:ditaval",
        "label": {
          "en-US": "Level",
          "fr-FR": "Niveau"
          }
        },
      ...
    }
  ],
  "tags": {
    "search": [
      ...,
      "dita:ditaval",
      ...],
    "reader": [
      ...]
  },
  "facets": {
    "home": [
      ...],
    "search": [
      ...]
      }
    } 
  },
  "pafs": {...
  }
}

From the DITAVAL file names, Fluid Topics generates the following cluster selector displayed in the Search Results page:
Cluster Selector on the Audience information for a document in the Search Results page
Users can choose between two publications of the document: one for the version "novice" and another one for the version "expert".