It is possible to use the shortdesc
element or the ft:description
metadata element to define a description in DITA maps and topics.
The following behavior can be expected:
-
If the
shortdesc
element is defined, it is used as a description for crawlers. -
If both the
shortdesc
element and theft:description
metadata element are defined,ft:description
overrides theshortdesc
. However, theshortdesc
content is still part of the HTML body part of the map.
The shortdesc element
It is possible to set the description by using the shortdesc
element.
The following lines show a DITA map whose description is set with the shortdesc
element:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
<booktitle>
<mainbooktitle>Time Machine Price List</mainbooktitle>
</booktitle>
<bookmeta>
<shortdesc>This document lists prices for our ready-for-sale time machine models.</shortdesc>
<bookmeta>
<chapter>...</chapter>
</bookmap>
The following lines show a DITA topic whose description is set with the shortdesc
element:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="price_time_machine_1_0">
<title>Time Machine v1.0 - Pricing Information</title>
<shortdesc>This section gives pricing information for our v1.0 time machine.</shortdesc>
<body>
<p>...</p>
</body>
</topic>
For DITA maps, the description does not appear on the Fluid Topics Search page.
The ft:description metadata element
It is also possible to set the map or topic description in an ft:description
metadata element.
The following lines show the same DITA map with a description set in the map metadata:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
<booktitle>
<mainbooktitle></mainbooktitle>
</booktitle>
<bookmeta>
<othermeta name="ft:description" content="This document lists prices for our ready-for-sale time machine models."/>
</bookmeta>
<chapter>...</chapter>
</bookmap>
The following lines show DITA topic with a description set in the topic metadata:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="price_time_machine_1_0">
<title>Time Machine v1.0 - Pricing Information</title>
<prolog>
<metadata>
<othermeta name="ft:description" content="This section gives pricing information for our v1.0 time machine."/>
</metadata>
</prolog>
<body>
<p>...</p>
</body>
</topic>
The Fluid Topics PaF transforms these properties into the ft:description
metadata element.