Reusing content from any topic type

By changing the configuration of some indexes in the Index Definition file, you can allow users to reuse content from any topic type in IXIASOFT CCMS Web.

These indexes control what elements are indexed as reusable components:

  • reusable_element_id: Indexes all the descendant elements in <rcbody> that have an id attribute
  • reusable_element_name: Indexes the name of all descendant elements of <rcbody> that have an id attribute
  • reusable_fulltext: Indexes the text of all descendant elements of <rcbody>
  • reusable_units (unit): Indexes all descendant elements of <rcbody> that have an id attribute
  • referable_component_library: Indexes all maps that are designated as referable component library maps. These maps have <data name="referable_component_library"> just after the <title> element. There is a default template for them.

By default, these indexes only index content in referable-content topics. And the content they index is what users see as reusable content in these dialogs:

  • The Referable-Content view in IXIASOFT CCMS Desktop
  • The Reuse Content dialog in IXIASOFT CCMS Web

You can adjust the indexes to include other topic types that have a specific attribute, for example <topic otherprops="reusable">.

Default configuration

This is how the indexes are defined by default in the Index Definition file:

<index NAME="reusable_element_id">
   <stringindex KEEPEXTRACTEDVALUES="True">
      <elements>
         <element DEPTH="INFINITE" XPATH="//rcbody/*[@id]/@id"/>
	</elements>
   </stringindex>
</index>
<index NAME="reusable_element_name">
   <stringindex KEEPEXTRACTEDVALUES="True">
      <elements>
         <element DEPTH="INFINITE" XPATH="for $e in (//rcbody/*[@id]) return local-name($e)"/>
      </elements>
   </stringindex>
</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/*"/>
      </elements>
   </wordindex>
</index>
<unit NAME="reusable_units">
   <unitelements>
      <unitelement XPATH="//rcbody/*[@id]"/>
   </unitelements>
</unit>
Note: In general, you must change all the indexes to have any configuration changes work properly.

The only limitation for how you can configure these indexes is what is possible using XPath. The following topics include some common examples to provide some guidance.