Test Design StudioGo to Previous Topic: Using the 'type' AttributeGo to Next Topic: Define an Enum List

Formatting Lists

When entering comments for an item, it is often desirable to display lists of information. Test Design Studio provides the XML tag list specifically for this purpose, and allows you to generate two-column tables, bulleted lists, or numbered lists. The type attribute of the list tag is used to control the type of list, but the child tags you use are the same for any list style.

List Items

Every item in the list is designated by the item tag. You then have two options for specifying the details of the item:

  1. Use the term and description tags to define the two elements of the item.
  2. If you do not want a separate term and description, you can type the details as the inner text of the item tag.

The following sample illustrates both methods for entering the details of a list:

[VBScript] - Copy Code
''' <list type="table">
''' <item><term>Term 1</term><description>Description 1</description></item>
''' <item>This is the second item in my list>/item>
''' </list>
[JScript] - Copy Code
/// <list type="table">
/// <item><term>Term 1</term><description>Description 1</description></item>
/// <item>This is the second item in my list>/item>
/// </list>

List Header

The listheader tag is an optional tag that can used to specify header information about your list. Unlike the item tag, your only option is to use the term and description child tags to define the header information for each item. Use the term tag to define the header information for the corresponding term tag used within each item tag. Similarly, use the description tag to define the header information for the corresponding description tag used within each item tag.

The following sample illustrates the use of the listheader tag to define the details of a table:

[VBScript] - Copy Code
''' <list type="table">
''' <listheader><term>Error Code</term><description>Description</description></listheader>
''' <item><term>-20001</term><description>This error indicates an object was not of the proper class.</description></item>
''' <item><term>-20002</term><description>This error indicates an invalid parameter value was passed to a function.</description></item>
''' </list>
[JScript] - Copy Code
/// <list type="table">
/// <listheader><term>Error Code</term><description>Description</description></listheader>
/// <item><term>-20001</term><description>This error indicates an object was not of the proper class.</description></item>
/// <item><term>-20002</term><description>This error indicates an invalid parameter value was passed to a function.</description></item>
/// </list>

List Types

The following table discusses how the type attribute of the list tag is used to control the output, and provides samples of the output"

Type List Output
<list type="table"> Outputs a two-column table where each item is on a new row, the term is displayed in the left column, and the description is displayed in the right column. The optional listheader will be displayed as a header to the table.

The following is an example of a table list:
Header TermHeader Description
Term 1Description 1
Term 2Description 2

Tip:   The table being used to present this data in the help topic is an example of a table-style list.
<list type="bullet"> Outputs a bulleted list where each item has its own bullet, the term is displayed immediately inside the bullet, and the description is separated from the term by a hyphen. The optional listheader will be displayed as the first bullet item with bolded entries.

The following is an example of a bulleted list:

  • Header Term - Header Description
  • Term 1 - Description 1
  • Term 2 - Description 2

<list type="number"> Outputs a numbered list where each item has a new sequential number, the term is displayed immediately beside the number, and the description is separated from the term by a hyphen. The optional listheader will be displayed as the first bullet item with bolded entries.

The following is an example of a numbered list:

Header Term - Header Description

  1. Term 1 - Description 1
  2. Term 2 - Description 2