summaryrefslogtreecommitdiff
path: root/blocks/xcos2xml/links/ExplicitLink.xsl
blob: d2be431bf09d537e8d4ad5fd2aa7a6fb2744fa23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
    <xsl:template match="ExplicitLink | CommandControlLink | ImplicitLink">
      <mxCell>
        <xsl:attribute name="id">
          <xsl:value-of select="@id" />
        </xsl:attribute>
        <xsl:attribute name="edge">1</xsl:attribute>
        <xsl:attribute name="sourceVertex">
          <xsl:value-of select="@source" />
        </xsl:attribute>
        <xsl:attribute name="targetVertex">
          <xsl:value-of select="@target" />
        </xsl:attribute>
        <xsl:attribute name="tarx">
          <xsl:choose>
            <xsl:when test="mxGeometry/mxPoint[@as='sourcePoint']">
              <xsl:value-of select="format-number(mxGeometry/mxPoint[@as='sourcePoint']/@x+$originx,'0.0')" />
            </xsl:when>
            <xsl:otherwise>0</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="tary">
          <xsl:choose>
            <xsl:when test="mxGeometry/mxPoint[@as='sourcePoint']">
              <xsl:value-of select="format-number(mxGeometry/mxPoint[@as='sourcePoint']/@y+$originy,'0.0')" />
            </xsl:when>
            <xsl:otherwise>0</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="tar2x">
          <xsl:choose>
            <xsl:when test="mxGeometry/mxPoint[@as='targetPoint']">
              <xsl:value-of select="format-number(mxGeometry/mxPoint[@as='targetPoint']/@x+$originx,'0.0')" />
            </xsl:when>
            <xsl:otherwise>0</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="tar2y">
          <xsl:choose>
            <xsl:when test="mxGeometry/mxPoint[@as='targetPoint']">
              <xsl:value-of select="format-number(mxGeometry/mxPoint[@as='targetPoint']/@y+$originy,'0.0')" />
            </xsl:when>
            <xsl:otherwise>0</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:attribute name="CellType">Unknown</xsl:attribute>
        <xsl:apply-templates />
        <Object as="parameter_values" />
        <Object as="displayProperties" />
      </mxCell>
    </xsl:template>