Configure the AddIds trigger to automatically assign IDs to elements

In the xpathforids.xml configuration file, you can specify the elements of a map or topic for which you want automatically assigns IDs to specified elements when you release maps and topics.

When a user releases a map or topic, the IXIASOFT CCMS checks 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.

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>
Note: You should make these configuration changes in the Test environment and test them before copying them to the Production environment. In a dedicated SaaS deployment, after testing the changes, ask IXIASOFT Customer Support to copy the changes to the Production environment.
  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 IXIASOFT.
  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 triggers, 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 IXIASOFT CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIASOFT CCMS > Synchronize Configuration.