Main Content

mlreportgen.dom.OrderedList Class

Namespace: mlreportgen.dom

Create ordered list

Description

Use an object of the mlreportgen.dom.OrderedList class to create an ordered (numbered) list.

To see what DOM objects you can append an mlreportgen.dom.OrderedList object to, see Append mlreportgen.dom.OrderedList object to DOM class object.

The mlreportgen.dom.OrderedList class is a handle class.

Creation

Description

orderedListObj = OrderedList creates an empty ordered list.

orderedListObj = OrderedList(items) creates an ordered list of the specified items.

example

Input Arguments

expand all

Content to include in an ordered list, specified as a:

  • One-dimensional array of doubles

  • One-dimensional array of character vectors

  • One-dimensional categorical array

  • One-dimensional cell array

The cell array can contain a combination of the following:

Properties

expand all

Custom attributes of the document element, specified as an array of mlreportgen.dom.CustomAttribute objects. The custom attributes must be supported by the output format of the document element to which this object is appended.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Format specification for this document element object, specified as a cell array of DOM format objects. The formats specified by this property override corresponding formats specified by the StyleName property of this element. Formats that do not apply to this document element object are ignored.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: cell

The style specified by Stylename must be defined in the template used to create the document element to which you append this list.

Tag, specified as a character vector or string scalar. The DOM API generates a session-unique tag as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object. Use this value to help identify where an issue occurs during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Methods

expand all

Examples

collapse all

import mlreportgen.dom.*;
d = Document('test','html');

ol = OrderedList({Text('a'), 'b', 1,...
    {'c', Paragraph('d')}});
append(d,ol);

close(d);
rptview('test','html');

More About

expand all

Version History

Introduced in R2014b

expand all