Example: Index children of glossentry topics
This example shows how to configure the indexes for reusable content. With these changes, IXIA CCMS indexes referable-content topics plus the immediate children of glossentry topics (not all ancestors).
Configuration changes
The lines of code that you need to add for this change are highlighted:
<index NAME="reusable_element_id">
<stringindex KEEPEXTRACTEDVALUES="True">
<elements>
<element DEPTH="INFINITE" XPATH="//rcbody/*[@id]/@id"/>
<element DEPTH="INFINITE" XPATH="//glossentry/*[@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)"/>
<element DEPTH="INFINITE" XPATH="for $e in (//glossentry/*[@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/*"/>
<element DEPTH="INFINITE" XPATH="//glossentry/*"/>
</elements>
</wordindex>
</index>
<unit NAME="reusable_units">
<unitelements>
<unitelement XPATH="//rcbody/*[@id]"/>
<unitelement XPATH="//glossentry/*[@id]"/>
</unitelements>
</unit>
Example of elements indexed
<glossterm>
and the
<p>
inside <glossdef>
have an
id
attribute.
<glossterm>
is
indexed and appears as reusable content. However, neither
<glossdef>
nor<p>
appear as
reusable content: <glossdef>
does not have anid
attribute<p>
is a grandchild of<rcbody>
and not a child
If <glossdef>
had an id
attribute, it would be indexed. But this configuration change alone ignores elements
like <p>
.