Configure the AddIds trigger to automatically assign IDs to elements
The AddIds trigger automatically assigns IDs to specified elements when you release maps and topics.
Note: This can be applied within a Hosted environment, but only within a test server.
To apply the trigger, you
specify in a configuration file (xpathforids.xml)
the elements of a map or topic for which you want automatic IDs. 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>
When a user releases a map or topic, the 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.
To enable this trigger: