Skip to content

Instantly share code, notes, and snippets.

@Phillipus
Created August 4, 2018 14:35
Show Gist options
  • Save Phillipus/ca1beebc7cdaee742586b98d3ecb0c8e to your computer and use it in GitHub Desktop.
Save Phillipus/ca1beebc7cdaee742586b98d3ecb0c8e to your computer and use it in GitHub Desktop.
Example 2 XSL Exchange Format
<h2>Relationships in the model</h2>
<table class="border">
<tr style="text-align:left;">
<th>Id</th>
<th>Name</th>
<th>Source Element</th>
<th>Target Element</th>
<th>Type</th>
</tr>
<xsl:for-each select="arc:model/arc:relationships/arc:relationship">
<xsl:sort select="@xsi:type"/>
<xsl:variable name="Source" select="concat('',@source,'')"></xsl:variable>
<xsl:variable name="Target" select="concat('',@target,'')"></xsl:variable>
<tr>
<td class="border"><xsl:value-of select="@identifier"/></td>
<td class="border"><xsl:value-of select="arc:label"/></td>
<td class="border"><xsl:value-of select="//arc:element[@identifier=$Source]/arc:label"/></td>
<td class="border"><xsl:value-of select="//arc:element[@identifier=$Target]/arc:label"/></td>
<td class="border"><xsl:value-of select="@xsi:type"/></td>
</tr>
</xsl:for-each>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment