mlreportgen.dom.TemplateHole class

Package: mlreportgen.dom
Superclasses:

Hole to append to template

Description

Hole to append to a document template.

You can append a template hole to these kinds of DOM objects:

  • Paragraph

  • TableEntry

  • Group

  • Template

Construction

templateHoleObj = TemplateHole() creates a hole with empty properties.

templateHoleObj = TemplateHole(id) creates a hole having the specified id.

templateHoleObj = TemplateHole(id,description) creates a hole having the specified id and description.

Input Arguments

expand all

The ID for the template hole, specified as a character vector.

Description for the template hole, specified as a character vector. The value of this argument becomes the content of the hole in the template to which it is assigned to allow you to determine the purpose of the hole when viewing the template in the corresponding application. The description is replaced by appended hole content in a report generated from the template.

Output Arguments

expand all

Hole to append to template, represented by an mlreportgen.dom.TemplateHole object.

Properties

expand all

Name of default style for hole content. This style name is assigned to hole content that does not specify a style name. For example, suppose you append a Text object to this hole and the Text object does not specify a style name. Then the value of this property is assigned to the text object as its style name. This property allows a template to specify the appearance of appended content.

Description for the template hole, specified as a character vector. The value of this property becomes the content of the hole in the template to which it is assigned to allow you to determine the purpose of the hole when viewing the template in the corresponding application. The description is replaced by appended hole content in a report generated from the template.

ID of this template hole.

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Tag for the document element, specified as a character vector.

The DOM generates a session-unique tag when it creates the document element. Structure the tag as class:id, where class is the class of the element and id is the value of the Id property. You can specify a tag to replace the generated tag. Specifying your own tag can make it easier to identify where an issue occurred during document generation.

Methods

Method

Purpose

clone

Use TemplateHole.clone in a similar way to how you use Paragraph.clone.

Clone this hole object.