summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuchita Lad2024-08-02 11:16:40 +0530
committerSuchita Lad2024-08-27 13:01:05 +0530
commitb8160ce5d3854edad734adbac19bde2ceeeb4df1 (patch)
treeff4b2caf2e94335e04a5b73510cb46c2f23e1cfc
parent4fb4460557cee7b3e2c673df20090b3efc4fee98 (diff)
downloadCommon-Interface-Project-b8160ce5d3854edad734adbac19bde2ceeeb4df1.tar.gz
Common-Interface-Project-b8160ce5d3854edad734adbac19bde2ceeeb4df1.tar.bz2
Common-Interface-Project-b8160ce5d3854edad734adbac19bde2ceeeb4df1.zip
Updated files for split
-rwxr-xr-xblocks/Xcos/MxGraphParser.py1
-rw-r--r--blocks/Xcos/blocks/Capacitor.py6
-rw-r--r--blocks/Xcos/blocks/ConstantVoltage.py4
-rw-r--r--blocks/xcos2xml/links/ExplicitLink.xsl2
-rw-r--r--blocks/xcos2xml/ports/port.xsl8
-rw-r--r--blocks/xcos2xml/split.xsl434
6 files changed, 327 insertions, 128 deletions
diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py
index 94f2aefe..c80f2c4d 100755
--- a/blocks/Xcos/MxGraphParser.py
+++ b/blocks/Xcos/MxGraphParser.py
@@ -326,6 +326,7 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, geometry) in
(style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2[targetVertex]
for (attribid, (style, sourceVertex, targetVertex, sourceType, targetType)) in edgeDict.items():
+ print("testing",attribid,style, sourceVertex, targetVertex, sourceType, targetType)
if int(attribid) >= 10000:
attribid = nextattribid
nextattribid += 1
diff --git a/blocks/Xcos/blocks/Capacitor.py b/blocks/Xcos/blocks/Capacitor.py
index f90e2ec0..1aa94898 100644
--- a/blocks/Xcos/blocks/Capacitor.py
+++ b/blocks/Xcos/blocks/Capacitor.py
@@ -50,9 +50,9 @@ def Capacitor(outroot, attribid, ordering, geometry, parameters):
# Add nested Array node inside innerArrayNode
nestedArrayNode = addArrayNode(innerArrayNode,
scilabClass="ScilabList")
- addScilabDoubleNode(nestedArrayNode, width=1, realParts=["4.7E-6"])
- addScilabDoubleNode(nestedArrayNode, width=1, realParts=["2.0"])
- addScilabDoubleNode(innerArrayNode, width=2, realParts=["0.0", "1.0"])
+ addScilabDoubleNode(nestedArrayNode, width=1, realParts=["0.01"])
+ addScilabDoubleNode(nestedArrayNode, width=1, realParts=["0.0"])
+ addScilabDoubleNode(innerArrayNode, realParts=["0.0", "1.0"], width=2)
addgeometryNode(outnode, GEOMETRY, geometry['height'],
geometry['width'], geometry['x'], geometry['y'])
return outnode
diff --git a/blocks/Xcos/blocks/ConstantVoltage.py b/blocks/Xcos/blocks/ConstantVoltage.py
index e31032b2..4d08a720 100644
--- a/blocks/Xcos/blocks/ConstantVoltage.py
+++ b/blocks/Xcos/blocks/ConstantVoltage.py
@@ -45,8 +45,8 @@ def ConstantVoltage(outroot, attribid, ordering, geometry, parameters):
innerArrayNode = addArrayNode(innerArrayNode,
scilabClass="ScilabList")
- innerNode = addDataNode(innerArrayNode, 'ScilabDouble', height=1, width=1)
- addScilabDoubleNode(innerNode, width=1, realParts=format_real_number(parameters[0]))
+
+ addScilabDoubleNode(innerArrayNode, width=1, realParts=["1"])
addgeometryNode(outnode, GEOMETRY, geometry['height'],
geometry['width'], geometry['x'], geometry['y'])
diff --git a/blocks/xcos2xml/links/ExplicitLink.xsl b/blocks/xcos2xml/links/ExplicitLink.xsl
index d7c85dd2..90cfccf8 100644
--- a/blocks/xcos2xml/links/ExplicitLink.xsl
+++ b/blocks/xcos2xml/links/ExplicitLink.xsl
@@ -1,4 +1,4 @@
-<xsl:template match="ExplicitLink | CommandControlLink">
+<xsl:template match="ExplicitLink | CommandControlLink | ImplicitLink">
<xsl:variable name="sourceId" select="@source" />
<xsl:variable name="sourceParentId" select="//*[@id = $sourceId]/@parent" />
<xsl:variable name="sourceParentName" select="name(//*[@id = $sourceParentId])" />
diff --git a/blocks/xcos2xml/ports/port.xsl b/blocks/xcos2xml/ports/port.xsl
index f6a5422d..5513b6d6 100644
--- a/blocks/xcos2xml/ports/port.xsl
+++ b/blocks/xcos2xml/ports/port.xsl
@@ -79,9 +79,9 @@
<xsl:attribute name="targetVertex">0</xsl:attribute>
<xsl:attribute name="tarx">0</xsl:attribute>
<xsl:attribute name="tary">0</xsl:attribute>
- <mxGeometry x="0" width="8" height="8" relative="1" as="geometry">
+ <mxGeometry y="1" width="8" height="8" relative="1" as="geometry">
<xsl:variable name="numerator" select="2 * number($commandPorts) - (2 * (position() - 1) + 1)" />
- <xsl:attribute name="y">
+ <xsl:attribute name="x">
<xsl:value-of select="$numerator div (2 * number($commandPorts))"/>
</xsl:attribute>
<mxPoint x="-4" y="0" as="offset"/>
@@ -107,9 +107,9 @@
<xsl:attribute name="targetVertex">0</xsl:attribute>
<xsl:attribute name="tarx">0</xsl:attribute>
<xsl:attribute name="tary">0</xsl:attribute>
- <mxGeometry x="0" width="8" height="8" relative="1" as="geometry">
+ <mxGeometry y="0" width="8" height="8" relative="1" as="geometry">
<xsl:variable name="numerator" select="2 * number($controlPorts) - (2 * (position() - 1) + 1)" />
- <xsl:attribute name="y">
+ <xsl:attribute name="x">
<xsl:value-of select="$numerator div (2 * number($controlPorts))"/>
</xsl:attribute>
<mxPoint x="-4" y="-8" as="offset"/>
diff --git a/blocks/xcos2xml/split.xsl b/blocks/xcos2xml/split.xsl
index cefd4d58..2a77c45a 100644
--- a/blocks/xcos2xml/split.xsl
+++ b/blocks/xcos2xml/split.xsl
@@ -1,7 +1,15 @@
-<xsl:key name="k-input" match="ExplicitInputPort | ControlPort" use="@parent" />
-<xsl:key name="k-output" match="ExplicitOutputPort | CommandPort" use="@parent" />
-<xsl:key name="k-srclink" match="ExplicitLink | CommandControlLink" use="@source" />
-<xsl:key name="k-tgtlink" match="ExplicitLink | CommandControlLink" use="@target" />
+<xsl:key name="k-input" match="ExplicitInputPort" use="@parent" />
+<xsl:key name="k-output" match="ExplicitOutputPort" use="@parent" />
+<xsl:key name="k-srclink" match="ExplicitLink" use="@source" />
+<xsl:key name="k-tgtlink" match="ExplicitLink" use="@target" />
+<xsl:key name="k-control" match="ControlPort" use="@parent" />
+<xsl:key name="k-command" match="CommandPort" use="@parent" />
+<xsl:key name="k-commandsrclink" match="CommandControlLink" use="@source" />
+<xsl:key name="k-commandtgtlink" match="CommandControlLink" use="@target" />
+<xsl:key name="k-implicitinput" match="ImplicitInputPort | ImplicitOutputPort" use="@parent" />
+<!-- <xsl:key name="k-implicitoutput" match="ImplicitOutputPort" use="@parent" /> -->
+<xsl:key name="k-implicitsrclink" match="ImplicitLink" use="@source" />
+<xsl:key name="k-implicittgtlink" match="ImplicitLink" use="@target" />
<xsl:template match="SplitBlock">
@@ -13,130 +21,320 @@
<xsl:variable name="sourceoneid" select="$OutputPort/@id" />
<xsl:variable name="targetonelink" select="key('k-tgtlink', $targetoneid)" />
<xsl:variable name="sourceonelink" select="key('k-srclink', $sourceoneid)" />
- <xsl:variable name="newidone" select="generate-id()" />
+
+ <xsl:variable name="ControlPort" select="key('k-control', @id)" />
+ <xsl:variable name="CommandPort" select="key('k-command', @id)" />
+ <xsl:variable name="ControlPorts" select="count($ControlPort)" />
+ <xsl:variable name="CommandPorts" select="count($CommandPort)" />
+ <xsl:variable name="targetcommandoneid" select="$ControlPort/@id" />
+ <xsl:variable name="sourcecommandoneid" select="$CommandPort/@id" />
+ <xsl:variable name="targetcommandonelink" select="key('k-commandtgtlink', $targetcommandoneid)" />
+ <xsl:variable name="sourcecommandonelink" select="key('k-commandsrclink', $sourcecommandoneid)" />
+ <xsl:variable name="ImplicitPort" select="key('k-implicitinput', @id)" />
+ <!-- <xsl:variable name="ImplicitOutputPort" select="key('k-implicitoutput', @id)" /> -->
+ <xsl:variable name="ImplicitPorts" select="count($ImplicitPort)" />
+ <!-- <xsl:variable name="ImplicitOutputPorts" select="count($ImplicitOutputPort)" /> -->
+ <xsl:variable name="targetimplicitoneid" select="$ImplicitPort/@id" />
+ <xsl:variable name="sourceimplicitoneid" select="$ImplicitPort/@id" />
+ <xsl:variable name="targetimplicitonelink" select="key('k-implicittgtlink', $targetimplicitoneid)" />
+ <xsl:variable name="sourceimplicitonelink" select="key('k-implicitsrclink', $sourceimplicitoneid)" />
+ <xsl:variable name="newidone" select="generate-id()" />
+ <xsl:element name="TEST">
+ <xsl:attribute name="ABC">
+ <xsl:value-of select="$ImplicitPorts" />
+ </xsl:attribute>
+ <!-- <xsl:attribute name="ABC1">
+ <xsl:value-of select="$targetimplicitoneid" />
+ </xsl:attribute>
+ <xsl:attribute name="DEF">
+ <xsl:value-of select="$InputPorts" />
+ </xsl:attribute>
+ <xsl:attribute name="DEF1">
+ <xsl:value-of select="$OutputPorts" />
+ </xsl:attribute> -->
+ </xsl:element>
<xsl:variable name="geometry" select="mxGeometry" />
<xsl:variable name="x" select="$geometry/@x" />
<xsl:variable name="y" select="$geometry/@y" />
- <!-- <xsl:variable name="h" select="$geometry/@height" />
- <xsl:variable name="w" select="$geometry/@width" />
- <xsl:value-of select="$x" />
- <xsl:value-of select="$y" />
- <xsl:value-of select="$h" />
- <xsl:value-of select="$w" /> -->
-
- <xsl:element name="mxCell">
- <!-- <xsl:attribute name="test0">
- <xsl:value-of select="$x" />
- </xsl:attribute>
- <xsl:attribute name="test1">
- <xsl:value-of select="$y" />
- </xsl:attribute> -->
- <xsl:attribute name="id">
- <xsl:value-of select="$newidone" />
- </xsl:attribute>
- <xsl:attribute name="edge">1</xsl:attribute>
- <xsl:attribute name="sourceVertex">
- <xsl:value-of select="$targetonelink/@source" />
- </xsl:attribute>
- <xsl:attribute name="targetVertex">
- <xsl:value-of select="$sourceonelink/@target" />
- </xsl:attribute>
- <xsl:attribute name="node">.null</xsl:attribute>
- <xsl:attribute name="CellType">Unknown</xsl:attribute>
- <xsl:attribute name="tarx">0</xsl:attribute>
- <xsl:attribute name="tary">0</xsl:attribute>
- <!-- <xsl:apply-templates select="node()"/> -->
- <!-- <xsl:apply-templates /> -->
- <mxGeometry relative="1" as="geometry">
- <Array as="points">
- <xsl:for-each select="$sourceonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- <xsl:element name="mxPoint">
- <xsl:attribute name="x">
- <xsl:value-of select="$x" />
- </xsl:attribute>
- <xsl:attribute name="y">
- <xsl:value-of select="$y" />
- </xsl:attribute>
-
+
+ <xsl:choose>
+ <xsl:when test="($InputPorts + $OutputPorts) > 0">
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targetonelink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourceonelink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+
+ <mxGeometry relative="1" as="geometry">
+ <Array as="points">
+ <xsl:for-each select="$sourceonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ <xsl:element name="mxPoint">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x" />
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y" />
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:for-each select="$targetonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </Array>
+ </mxGeometry>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
</xsl:element>
- <xsl:for-each select="$targetonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- </Array>
- </mxGeometry>
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- </xsl:element>
-
- <xsl:choose>
- <xsl:when test="$OutputPorts = 2">
- <xsl:variable name="OutputtwoPort" select="$OutputPort[position()=2]" />
- <xsl:variable name="sourcetwoid" select="$OutputtwoPort/@id" />
- <xsl:variable name="sourcetwolink" select="key('k-srclink', $sourcetwoid)" />
- <xsl:element name="mxCell">
- <xsl:attribute name="id">
- <xsl:value-of select="generate-id($targetonelink)" />
- </xsl:attribute>
- <xsl:attribute name="edge">1</xsl:attribute>
- <xsl:attribute name="sourceVertex">
- <xsl:value-of select="$newidone" />
- </xsl:attribute>
- <xsl:attribute name="targetVertex">
- <xsl:value-of select="$sourcetwolink/@target" />
- </xsl:attribute>
- <xsl:attribute name="node">.null</xsl:attribute>
- <xsl:attribute name="CellType">Unknown</xsl:attribute>
- <xsl:attribute name="tarx">0</xsl:attribute>
- <xsl:attribute name="tary">0</xsl:attribute>
- <!-- <xsl:apply-templates select="node()"/> -->
- <!-- <xsl:apply-templates /> -->
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$OutputPorts = 2">
+ <xsl:variable name="OutputtwoPort" select="$OutputPort[position()=2]" />
+ <xsl:variable name="sourcetwoid" select="$OutputtwoPort/@id" />
+ <xsl:variable name="sourcetwolink" select="key('k-srclink', $sourcetwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($targetonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourcetwolink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="InputtwoPort" select="$InputPort[position()=2]" />
+ <xsl:variable name="targettwoid" select="$InputtwoPort/@id" />
+ <xsl:variable name="targettwolink" select="key('k-tgtlink', $targettwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($sourceonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targettwolink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
- <xsl:otherwise>
- <xsl:variable name="InputtwoPort" select="$InputPort[position()=2]" />
- <xsl:variable name="targettwoid" select="$InputtwoPort/@id" />
- <xsl:variable name="targettwolink" select="key('k-tgtlink', $targettwoid)" />
- <xsl:element name="mxCell">
- <xsl:attribute name="id">
- <xsl:value-of select="generate-id($sourceonelink)" />
- </xsl:attribute>
- <xsl:attribute name="edge">1</xsl:attribute>
- <xsl:attribute name="sourceVertex">
- <xsl:value-of select="$targettwolink/@source" />
- </xsl:attribute>
- <xsl:attribute name="targetVertex">
- <xsl:value-of select="$newidone" />
- </xsl:attribute>
- <xsl:attribute name="node">.null</xsl:attribute>
- <xsl:attribute name="CellType">Unknown</xsl:attribute>
- <xsl:attribute name="tarx">0</xsl:attribute>
- <xsl:attribute name="tary">0</xsl:attribute>
- <!-- <xsl:apply-templates select="node()"/> -->
- <!-- <xsl:apply-templates /> -->
- <!-- <mxGeometry relative="1" as="geometry">
- <Array as="points">
- <xsl:for-each select="$sourceonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- <xsl:for-each select="$targetonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- </Array>
- </mxGeometry> -->
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- </xsl:element>
+ <xsl:when test="($ControlPorts + $CommandPorts) > 0">
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targetcommandonelink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourcecommandonelink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+
+ <mxGeometry relative="1" as="geometry">
+ <Array as="points">
+ <xsl:for-each select="$sourcecommandonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ <xsl:element name="mxPoint">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x" />
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y" />
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:for-each select="$targetcommandonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </Array>
+ </mxGeometry>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$CommandPorts = 2">
+ <xsl:variable name="CommmandtwoPort" select="$CommandPort[position()=2]" />
+ <xsl:variable name="sourcecommandtwoid" select="$CommandtwoPort/@id" />
+ <xsl:variable name="sourcecommandtwolink" select="key('k-commandsrclink', $sourcecommandtwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($targetcommandonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourcecommandtwolink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="ControltwoPort" select="$ControlPort[position()=2]" />
+ <xsl:variable name="targetcommandtwoid" select="$ControltwoPort/@id" />
+ <xsl:variable name="targetcommandtwolink" select="key('k-commandtgtlink', $targetcommandtwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($sourcecommandonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targetcommandtwolink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targetimplicitonelink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourceimplicitonelink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+
+ <mxGeometry relative="1" as="geometry">
+ <Array as="points">
+ <xsl:for-each select="$sourceimplicitonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ <xsl:element name="mxPoint">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x" />
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y" />
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:for-each select="$targetimplicitonelink/mxGeometry/Array/mxPoint">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </Array>
+ </mxGeometry>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$ImplicitPorts = 3">
+ <xsl:variable name="ImplicittwoPort" select="$ImplicitPort[position()=3]" />
+ <xsl:variable name="sourceimplicittwoid" select="$ImplicittwoPort/@id" />
+ <xsl:variable name="sourceimplicittwolink" select="key('k-implicitsrclink', $sourceimplicittwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($targetimplicitonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$sourceimplicittwolink/@target" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="ImplicitInputtwoPort" select="$ImplicitPort[position()=2]" />
+ <xsl:variable name="targetimplicittwoid" select="$ImplicitInputtwoPort/@id" />
+ <xsl:variable name="targetimplicittwolink" select="key('k-implicittgtlink', $targetimplicittwoid)" />
+ <xsl:element name="mxCell">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id($sourceimplicitonelink)" />
+ </xsl:attribute>
+ <xsl:attribute name="edge">1</xsl:attribute>
+ <xsl:attribute name="sourceVertex">
+ <xsl:value-of select="$targetimplicittwolink/@source" />
+ </xsl:attribute>
+ <xsl:attribute name="targetVertex">
+ <xsl:value-of select="$newidone" />
+ </xsl:attribute>
+ <xsl:attribute name="node">.null</xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</xsl:attribute>
+ <xsl:attribute name="tarx">0</xsl:attribute>
+ <xsl:attribute name="tary">0</xsl:attribute>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
- <xsl:template match="ExplicitLink | CommandControlLink">
+ <xsl:template match="ExplicitLink | CommandControlLink | ImplicitLink">
<xsl:variable name="sourceId" select="@source"/>
<xsl:variable name="sourceElement" select="//*[@id = $sourceId]"/>
<xsl:variable name="sourceElemId" select="$sourceElement/@parent"/>
@@ -156,7 +354,7 @@
</xsl:choose>
</xsl:template>
- <xsl:template match="ExplicitInputPort | ExplicitOutputPort | ControlPort | CommandPort">
+ <xsl:template match="ExplicitInputPort | ExplicitOutputPort | ImplicitInputPort | ImplicitOutputPort | ControlPort | CommandPort">
<xsl:variable name="parentId" select="@parent"/>
<xsl:variable name="parentElement" select="//*[@id = $parentId]"/>
<xsl:choose>