Configure parameters for a map template

Instead of inserting variables that require a user to enter a value, you can configure parameters that can replace the variables with controls to select dates, to add a select menu, or to add a character-constrained text box.

The templateparameters.xml file defines the parameters for use in map templates with examples of each parameter type. You can alter default examples to suit your requirements.

Important: Make configuration changes in a test environment and confirm they work before copying them to a production environment.
A parameter uses the following code:
<parameter name="[name]" label="[display label]" type="[DATE|TEXT|LIST]" mandatory="[true|false]"/>
Where you replace:
  • [name] with a name for the parameter.
  • [display label] with the text that you want seen by the users in the Create Map dialog box.

To specify whether the parameter is mandatory or optional, set the mandatory attribute. When the mandatory attribute value is set to "true", a user must enter or select a value during map creation. When it is set to "false", a user can leave the value blank.

To define a date parameter, use the DATE type. For example:
<parameter name="PubDate" label="Publication date" type="DATE" mandatory="true"/>

In this instance, you can add the PubDate parameter to a map template. When a user creates a map based on the map template, the Publication date appears on the Create Map dialog box for the Template Variables table. Since it is defined as mandatory, a user must choose a date before clicking Create.

To constrain the acceptable values a user can enter, use the TEXT type with a regex attribute. The regex attribute allows you to use regular expressions (regex) to control what is accepted as a valid value. For example:
<parameter name="BookNum" label="Serial number" type="TEXT" regex="[0-9]{6}" mandatory="true"/>

In this instance, you can add the BookNum parameter to your map template. When a user creates a map based on the map template, Serial number appears in the Template Variables table. A user must enter a six-digit number in the Values column before clicking Create, .

To define a list, use the LIST type and provide a list of values. For example:
<parameter name="AuthorList" label="Author" type="LIST" mandatory="false">
	<value>Doe, John</value>
	<value>Smith, Jane</value>
	<value>Petit, Eve</value>	
	<value>Tremblay, Joseph</value>	
</parameter>

In this instance, you can add the AuthorList parameter to your map template. When a user creates a map based on the map template, the Author list appears in the Template Variables table. A user may or may not choose to select a value from the Author list.

To configure parameters for a map template:

  1. Open the TEXTML Administration perspective by clicking the TEXTML Administration shortcut on the tool bar. If the shortcut is not displayed, follow these steps:
    1. Select Window > Perspective > Open Perspective > Other
    2. Click TEXTML Administration.
    3. Click Open.
  2. In the TEXTML Administration view, double-click the server.
  3. If your server is not displayed in the view, add it by doing the following:
    1. To find the server name, click Window > Preferences and select IXIA CCMS.
      In the TEXTML Server Connection section, the server name is the Hostname.
    2. Copy the Hostname and close the Preferences window.
    3. In the TEXTML Administration view, right-click and select Add Server.
    4. In the Server field, enter the server name.
      The Port field should fill automatically. If you need the port number, you can find it in the same place as the server name in the Preferences window.
    5. Click OK.
  4. When the Connect as dialog opens, type your username and password and click OK.
  5. Double-click the name of your Content Store to open a connection to it.
  6. Expand the Content Store's Repository node and browse to /system/conf/ to locate the templateparameters.xml file.
  7. Right-click templateparameters.xml and click Check Out.
  8. Double-click the file to open it in the XML editor area.
  9. In the parameters element, define your new parameter or edit an existing example to meet your needs.
  10. Save, close, and check in the templateparameters.xml file.
  11. 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 map template parameters are configured as you designated.
Important:
If you are adding variables to an existing map template, verify that the following items in the map template have also been replaced by map variables:
  • Replace the existing map ID attribute value with {{ixia.id}}.
  • Replace the existing xml:lang attribute value with {{ixia.xml:lang}}.
  • Replace the existing title with {{ixia.title}}.
For example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//IXIA//DTD IXIA DITA Map//EN" "../../system/dtd/ixia/IxiaMap.dtd">
<map id="{{ixia.id}}" xml:lang="{{ixia.xml:lang}}">
    <title>{{ixia.title}}</title>