How can I use other topic types as referable-content topics?
You can use other topic types like task as referable-content topics and have them appear in the Referable-Content view.
Symptom
The referable-content topic type is an IXIASOFT specialization. Due to a limitation in third-party publishing engines, topic types need to be used as conrefs. For example, use the generic topic type as well as specific task topics that have an @outputclass value of "reusable" on their <taskbody> element.
Problem
Some existing indexes need to be modified to be able to use the topics as referable-content.
Solution
Note: If you do not plan to use the referable-content topic type, you can delete
or comment out the lines for rcbody shown in the following code samples.
- Edit the Index Definition file and the
following two lines in bold to the reusable_element_id
index:
<index NAME="reusable_element_id"> <stringindex KEEPEXTRACTEDVALUES="True"> <elements> <element DEPTH="INFINITE" XPATH="//rcbody//*[@id]/@id"/> <element DEPTH="INFINITE" XPATH="//body//*[@id]/@id"/> <element DEPTH="INFINITE" XPATH="//taskbody[@outputclass='reusable']//*[@id]/@id"/> </elements> </stringindex> </index>
- Add the following two lines in bold to the reusable_element_name
index:
<index NAME="reusable_element_name"> <stringindex KEEPEXTRACTEDVALUES="True"> <elements> <element DEPTH="INFINITE" XPATH="for $e in (//rcbody//*[@id]) return local-name($e)"/> <element DEPTH="INFINITE" XPATH="for $e in (//body//*[@id]) return local-name($e)"/> <element DEPTH="INFINITE" XPATH="for $e in (//taskbody[@outputclass='reusable']//*[@id]) return local-name($e)"/> </elements> </stringindex> </index>
- Add the following two lines in bold to the reusable_fulltext
index:
<index NAME="reusable_fulltext"> <!-- System index required by the DITA CMS --> <admindescription>Fulltext index on the documents</admindescription> <wordindex> <elements> <element DEPTH="INFINITE" XPATH="//rcbody//*"/> <element DEPTH="INFINITE" XPATH="//body//*"/> <element DEPTH="INFINITE" XPATH="//taskbody[@outputclass='reusable']//*"/> </elements> </wordindex> </index>
- Add the following two lines in bold to the reusable_units
index:
<unit NAME="reusable_units"> <unitelements> <unitelement XPATH="//rcbody//*[@id]"/> <unitelement XPATH="//body//*[@id]"/> <unitelement XPATH="//taskbody//*[@id]"/> </unitelements> </unit>
- Save and check in the Index Definition file.
- Edit the system/conf/xpathforids.xml
file and add the following two lines in
bold:
<xpath value="//rcbody//*"/> <xpath value="//body//*"/> <xpath value="//taskbody[@outputclass='reusable']//*"/>
Note: These two lines ensure that the IXIASOFT CCMS automatically adds an @id value to any elements in the <body> element of a <topic> or in the <taskbody> of a <task> where the <taskbody> has an @outputclass value of "reusable". Without an @id value, the element cannot be used as a conref and does not appear in the Referable-Content view. - Save and check in the xpathforids.xml file.
- When the indexing is complete, restart your IXIASOFT CCMS Desktop.