# LinkedDocumentTransformer

## 1. Introduction

This transformation transforms linked documents of model elements. A linked document is a .docx file that typically provides an extensive amount of formatted documentation for a model element. Linked documents are loaded using the input parameter loadLinkedDocuments. The creation of a database model is an example of where linked documentation plays a role.

## 2. Configuration

The following sections specifiy the configuration options for this transformation.

### 2.1. Class

The class for this transformer implementation is de.interactive_instruments.ShapeChange.Transformation.LinkedDocument.LinkedDocumentTransformer

### 2.2. Parameters

#### 2.2.1. prependHorizontalLine

(since v2.5.0)

Required / Optional: optional

Type: Boolean

Default Value: false

Explanation: If set to true, a horizontal line will be added when prepending text to a linked document.

Applies to Rule(s): rule-trf-all-prependText

#### 2.2.2. prependTextValue

(since v2.5.0)

Required / Optional: optional

Type: String

Default Value: none

Explanation: The value of this parameter will be prepended as plain text to a linked document. Note that ShapeChange will replace any occurrence of $TYPE$ with the name of the type that owns the linked document.

Applies to Rule(s): rule-trf-all-prependText

### 2.3. Rules

#### 2.3.1. rule-trf-all-prependText

(since v2.5.0)

Prepends paragraphs as defined via the parameters prependTextValue and prependHorizontalLine to the linked document of a class that belongs to the schemas selected for processing.

The order of the prepended paragraphs is as follows:

1. text

2. horizontal line

Note | If the class does not have a linked document, then no linked document will be created for it.

### 2.4. Map Entries

None at present

### 2.5. Advanced Process Configuration

None at present

## 3. Sample Configuration

      1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14

      <Transformer
      class="de.interactive_instruments.ShapeChange.Transformation.LinkedDocument.LinkedDocumentTransformer"
      input="INPUT" id="trf_linkedDocs" mode="enabled">
      <parameters>
       <ProcessParameter name="prependTextValue"
        value="Content below from the Logical Model documentation - $TYPE$"/>
       <ProcessParameter name="prependHorizontalLine" value="true"/>
      </parameters>
      <rules>
       <ProcessRuleSet name="transformer">
        <rule name="rule-trf-all-prependText"/>
       </ProcessRuleSet>
      </rules>
     </Transformer>