blob: c2eb2c7c9c4e185ea796096d50a1271646cb79e3 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
<title>Formatting</title>
<link rel="stylesheet" type="text/css" href="userguide.css">
</head>
<body>
<h2>Formatting</h2>
<h3>Removing extra lines</h3>
<p>All characters inside scripts are used for generation output, including
spaces, line breaks, or carriage return characters.</p>
<table class="sample" width="100%">
<tbody>
<tr class="heading">
<td width="340">
<p><strong>Template content</strong></p>
</td>
<td width="200">
<p><strong>Actual output</strong></p>
</td>
<td width="200">
<p><strong>Expected output</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top">&lt;gendoc&gt;¶ </td>
</tr>
<tr>
<td style="white-space: wrap;"> ..[for (p:Package |
self.ownedElement-&gt;filter( Package
)-&gt;sortedBy(name))].¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">[p.name/].¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> ..[/for].¶ </td>
</tr>
<tr>
<td> &lt;/gendoc&gt;.¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top"></td>
</tr>
<tr>
<td style="white-space: wrap;"> ...¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Allocations.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> ...¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Context.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> ...¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">LogicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> ...¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">PhisicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> ...¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">UseCases.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> ...¶ </td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" width="187">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Allocations.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Context.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">LogicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">PhisicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">UseCases.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><span class="code">&lt;drop/&gt;</span> tag allows to remove extra <strong>lines</strong>.<strong>
</strong><span class="code">If after applying &lt;drop/&gt;</span> tag,
the textbox containing it is empty, the empty text box is removed also.</p>
<p> <span class="code">&lt;dropSlide/&gt;</span> tag allows to remove the
whole slide<strong>. <br>
</strong></p>
<p>Document generation is internally performed in two steps and <span class="code">&lt;drop/&gt;</span>
tag removes the <strong><u>WHOLE</u></strong> paragraph in which it is
contained and &lt;dropSlide/&gt; tag removes the whole slide in which it
is contained, so it must be handled with care.</p>
<p>First step is to analyze the lines to get as output to understand where
the extra lines come from in the template and where the &lt;drop/&gt; tags
should be located.</p>
<table class="sample" width="100%">
<tbody>
<tr class="heading">
<td width="50%">
<p><strong>Template content</strong></p>
</td>
<td width="50%">
<p><strong>Output</strong></p>
</td>
</tr>
<tr>
<td valign="top">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top">&lt;gendoc&gt;<span style="background:#00FFFF;"></span>
</td>
</tr>
<tr>
<td style="white-space: wrap;"> <span style="background:yellow;">..</span>[for
(p:Package | self.ownedElement-&gt;filter( Package
)-&gt;sortedBy(name))]<span style="background:#00FF00;"></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">[p.name/].¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> <span style="background:pink;">..</span>[/for]<span
style="background:red;"></span> </td>
</tr>
<tr>
<td> &lt;/gendoc&gt;<span style="background:#00FFFF;"></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top"><span style="background:#00FFFF;"></span>
</td>
</tr>
<tr>
<td style="white-space: wrap;"> <span style="background:yellow;">..</span><span
style="background:#00FF00;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Allocations.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> <span style="background:yellow;">..</span><span
style="background:#00FF00;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Context.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> <span style="background:pink;">..</span><span
style="background:#00FF00;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">LogicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> <span style="background:pink;">..</span><span
style="background:#00FF00;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">PhisicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> <span style="background:pink;">..</span><span
style="background:#00FF00;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">UseCases.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> <span style="background:pink;">..</span><span style="background:#00FF00;"></span><span
style="background:red;"></span> </td>
</tr>
<tr>
<td> <span style="background:#00FFFF;"></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100%">
<tbody>
<tr>
<td class="heading">
<p><strong>Template content</strong></p>
</td>
<td class="heading" width="198">
<p><strong>before &lt;drop/&gt; and &lt;dropSlide/&gt;&nbsp;
handling</strong></p>
</td>
<td class="heading" width="139">
<p><strong>Final output</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="281">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top">&lt;gendoc&gt;¶ </td>
</tr>
<tr>
<td style="white-space: wrap;">..[for (p:Package |
self.ownedElement-&gt;filter( Package
)-&gt;sortedBy(name))].&lt;dropSlide/&gt;¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">[p.name/].¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> ..[/for].¶ </td>
</tr>
<tr>
<td> &lt;/gendoc&gt;.&lt;dropSlide&gt;¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" width="151">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td valign="top"></td>
</tr>
<tr>
<td style="white-space: wrap;">...&lt;dropSlide/&gt;¶
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Allocations.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> .&lt;dropSlide/&gt;..¶
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Context.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> .&lt;dropSlide/&gt;..¶
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">LogicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> .&lt;dropSlide/&gt;..¶
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">PhisicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td style="white-space: wrap;"> .&lt;dropSlide/&gt;..¶</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">UseCases.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td> ...¶ </td>
</tr>
<tr>
<td> .&lt;dropSlide/&gt;¶ </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" width="187">
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Allocations.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">Context.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">LogicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">PhisicalView.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table class="pptx" border="solid" width="100%">
<tbody>
<tr height="140px" valign="top">
<td>
<table class="pptx" width="100%">
<tbody>
<tr>
<td><strong style="font-weight:900;">UseCases.¶</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<h3>Removing lines with empty content</h3>
<p>Tag <span class="code">&lt;dropEmpty/&gt;</span> drop a paragraph if the
tag content is empty.</p>
<!--
<h3>Removing line breaks</h3> <p>Using tag &lt;nobr/&gt; allows to make template scripts easier to maintain, because code can be written on several paragraphs without displaying line breaks in output document, such as in the following example.</p> <table class="sample"> <tbody> <tr class="heading"> <td width="307"> <p><strong>Template content</strong></p> </td> <td width="307"> <p><strong>Output</strong></p> </td> </tr> <tr> <td width="307"> <p> <span class="code"> <strong>&lt;gendoc&gt;</strong><br/> <strong>[for (p:Package| &hellip; )]&lt;drop/&gt;&para;</strong><br/> </span> Name:<strong> <span class="blue">&lt;nobr/&gt;&para;</span></strong><br/> <span class="code"> &emsp;<strong> [if ( &hellip; )]&lt;drop/&gt;&para;</strong><br/> </span> &emsp;[p.name/]<strong>&para;</strong><br/> <span class="code"> &emsp;<strong> [else]&lt;drop/&gt;&para;</strong><br/> </span> &emsp;Not found<strong>&para;</strong><br/> <span class="code"> &emsp;<strong> [/if]&lt;drop/&gt; &para;</strong><br/> </span> &lt;&lt;Other info on package&gt;&gt;<strong>&para;</strong><br/> <strong>&para;</strong><br/> <span class="code"> <strong>[/for]&lt;drop/&gt;&para;</strong><br/> <strong>&lt;/gendoc&gt;&para;</strong> </span> </p> </td> <td width="307"> <p> Name: Actors<br/> Name: DeploymentView<br/> Name: Actors<strong>&para;</strong><br/> &lt;&lt;Other info on package&gt;&gt;<strong>&para;</strong><br/> <strong>&para;</strong><br/> Name: LogicalView<strong>&para;</strong><br/> &lt;&lt;Other info on package&gt;&gt;<strong>&para;</strong><br/> <strong>&para;</strong><br/> Name: UseCaseView<strong>&para;</strong><br/> &lt;&lt;Other info on package&gt;&gt;<strong>&para;</strong><br/> <strong>&para;</strong><br/> Name: Not found<strong>&para;</strong><br/> &lt;&lt;Other info on package&gt;&gt;<strong>&para;</strong><br/> <strong>&para;</strong> </p> </td> </tr> </tbody> </table> -->
</body>
</html>