Configure a trigger to automatically assign elements IDs

In the xpathforids.xml configuration file, you can trigger automatic assignment of an ID to specified elements of a map or topic during its release.

When a user releases a map or topic, the IXIA CCMS determines whether the elements configured in the xpathforids.xml file have an ID. If an ID is already assigned, it is kept as is. Otherwise, the CCMS generates a unique ID and assigns it to the element, based on the configuration.

Important: Make configuration changes in a test environment and confirm they work before copying them to a production environment.
For example, the following code specifies that IDs will be generated for sections, figures, and tables when a user releases a topic and for topic groups when a user releases a map:
<?xml version="1.0" encoding="UTF-8"?>
				<!DOCTYPE xpaths PUBLIC "-//ixiasoft.com//cms//config//idsxpath" "xpathforids.dtd">

				<!-- Defines the list of Xpath for elements that must have an ID -->

				<xpaths>
					<xpath value="//*[contains(@class, ' topic/section ')]"/>
					<xpath value="//*[contains(@class, ' topic/fig ')]"/>
					<xpath value="//*[contains(@class, ' topic/table ')]"/>
					<xpath value="//*[contains(@class, ' map/topicgroup ')]"/>
				</xpaths>

To configure a trigger to automatically assign elements IDs:

  1. In the TEXTML Administration perspective, connect to your server.
  2. Locate the xpathforids.xml file in the repository's /system/conf collection.
  3. Check out the file and open it for editing.
  4. In the xpathforids.xml file, specify the elements of the map or topic for which you want to generate automatic IDs.
    Note: If you do not have this file, contact MadCap Software.
  5. Save, close, and check in the file.
  6. Locate the triggers.xml file in the repository's /system/conf collection.
  7. Check out the file and open it for editing.
  8. Add a trigger to the triggers.xml file as described in Enable a trigger, using the values described below. To generate IDs for elements in both maps and topics, you must create two triggers, one for the map and one for the topic.
    apply-to
    Release
    class
    com.ixiasoft.cms.triggers.AddIds
    objtype
    topic or map
    schedule
    before
    Example
    <trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="topic" schedule="before">         
                                    </trigger>   
                                    <trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="map" schedule="before">         
                                    </trigger>   
  9. Save, close, and check in the file.
  10. Inform users of the changes.
    The changes will be applied automatically once users close and then reopen their IXIA CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIA CCMS > Synchronize Configuration.
The trigger you set now automatically assign elements IDs.