Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.ExternalLink class

Package: mlreportgen.dom
Superclasses:

Hyperlink to a location outside of document

Description

Defines a hyperlink to a location outside of the document.

Construction

externalLinkObj = ExternalLink(target,linkText) creates a hyperlink to the specified target and having the specified link text. This constructor creates a text object (mlreportgen.dom.Text) to hold the link text.

externalLinkObj = ExternalLink(target,linkText,linkTextStyleName) creates a hyperlink with the specified link text and style name.

externalLinkObj = ExternalLink(target,textObj) creates a hyperlink to the specified target using the specified Text object.

Input Arguments

expand all

The link target of the external link, specified as either a character vector (for a URL) or as an mlreportgen.dom.LinkTarget object.

The text to use for the link text.

Name of style to use for the link text.

Text object containing link text, specified by an mlreportgen.dom.Text object.

Output Arguments

expand all

External link, represented by an mlreportgen.dom.ExternalLink object.

Properties

expand all

The output format must support the custom attributes of this document element.

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.

Format objects that specify the format of a document element.

Name of link style defined in the template, specified as a character vector. The style specified by styleName must be defined in the template used to create the document to which the link is appended.

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

This read-only property displays the URL of the link target of this hyperlink.

Methods

Method

Purpose

append

Append text or a Text, Image, or CustomElement object.

clone

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

Copy the external link

Examples

expand all

import mlreportgen.dom.*
d = Document('mydoc');

append(d,ExternalLink('http://www.mathworks.com/','MathWorks'));

close(d);
rptview(d.OutputPath);
Was this topic helpful?