View Categories

p.step.choice()

2 min read

Table of Contents

Syntax #

p.step.choice(number)

number

nesting level of the choices, usually 2

Purpose #

The step choice annotation is used to tell Migrate to create a choice element. The nesting level is usually 2, as the nesting level of the step in which the choices are set is generally 1, and you cannot have more than two levels in a set of steps.

This image shows you how to set a simple step choice rule.

Step choice rule

You will get output similar to the following as a result of this rule.

<step>
  <cmd>
    Click <uicontrol>Next</uicontrol> to install QuickTrace. A dialog box
    displays the End User License Agreement (EULA). Read the agreement.
  </cmd>
  <choices>
    <choice>
      <p>
        Click <uicontrol>No</uicontrol> if you cannot accept the agreement.
        The installer exits. Return the product to your distributor for 
        a full refund.
      </p>
    </choice>
    <choice>
      <p>
        Click <uicontrol>Yes</uicontrol> if you accept it. A dialog
        displays the name of the default installation directory,
        C:\Program Files\BirdsEye\QuickTrace.
      </p>
    </choice>
  </choices>
</step>

Step choices are only applicable in task topics; Migrate is able to handle situations where you may assign a step choice to an element in a non-task topic, though, by creating unordered lists in place of the step choices. Here is an example of the output from just such a situation.

<p>
  The minimum recommended hardware requirements for installing and running QuickTrace are:
</p>
<ul>
  <li>200MHz Pentium PC</li>
  <li>system memory:
    <ul>
      <li>- 32MB RAM for Windows 98</li>
      <li>- 64MB RAM for Windows NT or higher.</li>
    </ul>
  </li>
  <li>CD-ROM drive (can be used across a network)</li>
  <li>
    a graphics device with a SCART connector capable of VGA resolution or better (see for
    how to connect the cable to the device)
  </li>
  <li>parallel port</li>
  <li>network card.</li>
</ul>