You can configure the Referable-Content view to display reusable elements from other topic types.
IXIASOFT CCMS provides a topic
specialization—the referable-content topic type—that you can use
to store the text you plan to use in multiple topics. By default, the Referable-Content view only displays elements
that have the id
attribute set and are contained in
a referable-content topic. If you want to reuse elements from other topic types and
make them searchable in the Referable-Content view, you need to change two indexes
and a unit in the Index Definition document.
Note: This can be applied within a Hosted environment, but only within a test server.
-
Open the TEXTML Administration perspective by clicking the
TEXTML Administration shortcut on the
tool bar. If the shortcut is not displayed, follow these steps:
-
Select
-
Click TEXTML
Administration.
-
Click Open.
-
In the TEXTML
Administration view, double-click the server. If your server is
not displayed in the view, you must add it to the view.
-
When the Connect as dialog
opens, type your username and password and click OK.
-
Double-click the name of your Content Store to open a connection to it.
-
Expand the Content Store node and locate the Index Definition document.
-
Right-click Index Definition and click Check Out.
-
Double-click the file to open it in the XML editor area.
-
Locate the
reusable_element_id
index.
For example:
<index NAME="reusable_element_id">
<stringindex KEEPEXTRACTEDVALUES="True">
<elements>
<element DEPTH="INFINITE" XPATH="//rcbody/*[@id]/@id"/>
</elements>
</stringindex>
</index>
-
Replace the XPath code in
<element DEPTH="INFINITE" XPATH="//rcbody/*[@id]/@id"/>
with the expression which will capture the ids that you want to index.
For example, if you want to display all elements with the
id
attribute set contained in any topic type, you would
replace the code with:
<element DEPTH="INFINITE" XPATH="//*[contains(@class, ' topic/body ')]/*[@id]/@id"/>
Note: Since IXIASOFT CCMS is
specialization-aware, using topic/body
also
indexes content from specializations based on the <topic>
element such as <task>
(task/taskbody
),
<concept>
(concept/conbody
), and <reference>
(reference/refbody
).
-
Locate the
reusable_element_name
index.
For example:
<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>
-
Replace the XPath code in
<element DEPTH="INFINITE" XPATH="for $e in (//rcbody/*[@id]) return local-name($e)"/>
with the expression which defines the elements that you want to index.
To continue the previous example, you would need to replace the code with the following:
<element DEPTH="INFINITE" XPATH="for $e in (//*[contains(@class, ' topic/body ')]/*[@id]) return local-name($e)"/>
-
Locate the
reusable_units
unit.
For example:
<unit NAME="reusable_units">
<unitelements>
<unitelement XPATH="//rcbody/*[@id]"/>
</unitelements>
</unit>
-
Replace the XPath code in
<unitelement XPATH="//rcbody/*[@id]"/>
with the expression which defines the elements searched as a self-contained block of content to be indexed.
To continue the example, you would need to replace the code with the following:
<unitelement XPATH="//*[contains(@class, ' topic/body ')]/*[@id]"/>
-
When you are done, save, close, and check in the Index Definition document.
-
Inform users of the changes and request that they close and
reopen their CCMS Desktop to apply the
changes.