summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2024-11-22 19:19:24 +0530
committerSunil Shetye2024-11-22 19:19:24 +0530
commitb43f6e0dc9e7bad75019f52620b8a526f306fc4d (patch)
tree811bae0b7247b047246906d1e5a68cc5585d748d
parent4b9967c21f677943e0a764f8fa50349f05ff45f0 (diff)
downloadCommon-Interface-Project-b43f6e0dc9e7bad75019f52620b8a526f306fc4d.tar.gz
Common-Interface-Project-b43f6e0dc9e7bad75019f52620b8a526f306fc4d.tar.bz2
Common-Interface-Project-b43f6e0dc9e7bad75019f52620b8a526f306fc4d.zip
rename variables for clarity
-rw-r--r--blocks/eda-frontend/public/splitblock.xsl474
1 files changed, 252 insertions, 222 deletions
diff --git a/blocks/eda-frontend/public/splitblock.xsl b/blocks/eda-frontend/public/splitblock.xsl
index b7771126..3e7bf57f 100644
--- a/blocks/eda-frontend/public/splitblock.xsl
+++ b/blocks/eda-frontend/public/splitblock.xsl
@@ -33,50 +33,56 @@
<xsl:template name="links">
<!-- links template parameters {{{ -->
- <xsl:param name="linktype" />
- <xsl:param name="targetonelink" />
- <xsl:param name="targetonelinksrcortgt" />
- <xsl:param name="sourceonelink" />
- <xsl:param name="sourceonelinksrcortgt" />
- <xsl:param name="sourcetwolink" />
- <xsl:param name="sourcetwolinksrcortgt" />
- <xsl:param name="sourcethreelink" />
- <xsl:param name="sourcethreelinksrcortgt" />
- <xsl:param name="targetonesrcsecondlink" />
- <xsl:param name="targetonetgtsecondlink" />
- <xsl:param name="sourceonesrcsecondlink" />
- <xsl:param name="sourceonetgtsecondlink" />
- <xsl:param name="sourcetwosrcsecondlink" />
- <xsl:param name="sourcetwotgtsecondlink" />
- <xsl:param name="sourcethreesrcsecondlink" />
- <xsl:param name="sourcethreetgtsecondlink" />
- <xsl:param name="targetonewaypoints" />
- <xsl:param name="sourceonewaypoints" />
- <xsl:param name="sourcetwowaypoints" />
<xsl:param name="x" />
<xsl:param name="y" />
<xsl:param name="parent" />
- <xsl:param name="targetoneblockx" />
- <xsl:param name="targetoneblocky" />
- <xsl:param name="sourceoneblockx" />
- <xsl:param name="sourceoneblocky" />
- <xsl:param name="sourcetwoblockx" />
- <xsl:param name="sourcetwoblocky" />
- <xsl:param name="sourcethreeblockx" />
- <xsl:param name="sourcethreeblocky" />
+
+ <xsl:param name="linktype" />
+
+ <xsl:param name="tgtonelink" />
+ <xsl:param name="tgtonelinkwaypoints" />
+ <xsl:param name="tgtoneotherportid" />
+ <xsl:param name="tgtoneotherblockx" />
+ <xsl:param name="tgtoneotherblocky" />
+ <xsl:param name="tgtonesrcsecondlink" />
+ <xsl:param name="tgtonetgtsecondlink" />
+
+ <xsl:param name="srconelink" />
+ <xsl:param name="srconelinkwaypoints" />
+ <xsl:param name="srconeotherportid" />
+ <xsl:param name="srconeotherblockx" />
+ <xsl:param name="srconeotherblocky" />
+ <xsl:param name="srconesrcsecondlink" />
+ <xsl:param name="srconetgtsecondlink" />
+
+ <xsl:param name="srctwolink" />
+ <xsl:param name="srctwolinkwaypoints" />
+ <xsl:param name="srctwootherportid" />
+ <xsl:param name="srctwootherblockx" />
+ <xsl:param name="srctwootherblocky" />
+ <xsl:param name="srctwosrcsecondlink" />
+ <xsl:param name="srctwotgtsecondlink" />
+
+ <xsl:param name="srcthreelink" />
+ <xsl:param name="srcthreelinkwaypoints" />
+ <xsl:param name="srcthreeotherportid" />
+ <xsl:param name="srcthreeotherblockx" />
+ <xsl:param name="srcthreeotherblocky" />
+ <xsl:param name="srcthreesrcsecondlink" />
+ <xsl:param name="srcthreetgtsecondlink" />
<!-- }}} -->
<!-- generate new primary link one id {{{ -->
<xsl:variable name="newidone">
<xsl:choose>
- <xsl:when test="$targetonelink/@id != '' and $sourceonelink/@id != ''">
- <xsl:value-of select="concat($targetonelink/@id, generate-id())" />
+ <xsl:when test="$tgtonelink/@id != '' and $srconelink/@id != ''">
+ <xsl:value-of select="concat($tgtonelink/@id, generate-id())" />
</xsl:when>
- <xsl:when test="$targetonelink/@id != ''">
- <xsl:value-of select="$targetonelink/@id" />
+ <xsl:when test="$tgtonelink/@id != ''">
+ <xsl:value-of select="$tgtonelink/@id" />
</xsl:when>
- <xsl:when test="$sourceonelink/@id != ''">
- <xsl:value-of select="$sourceonelink/@id" />
+ <xsl:when test="$srconelink/@id != ''">
+ <xsl:value-of select="$srconelink/@id" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
@@ -84,7 +90,7 @@
<!-- }}} -->
<!-- generate new primary link one {{{ -->
- <xsl:if test="$targetonelink/@id != '' and $sourceonelink/@id != ''">
+ <xsl:if test="$tgtonelink/@id != '' and $srconelink/@id != ''">
<xsl:element name="{$linktype}">
<xsl:attribute name="id">
<xsl:value-of select="$newidone" />
@@ -93,10 +99,10 @@
<xsl:value-of select="$parent" />
</xsl:attribute>
<xsl:attribute name="source">
- <xsl:value-of select="$targetonelinksrcortgt" /> <!-- removed by suchita $targetonelink/@source-->
+ <xsl:value-of select="$tgtoneotherportid" />
</xsl:attribute>
<xsl:attribute name="target">
- <xsl:value-of select="$sourceonelinksrcortgt" /> <!-- removed by suchita sourceonelink/@target-->
+ <xsl:value-of select="$srconeotherportid" />
</xsl:attribute>
<xsl:attribute name="style">
<xsl:value-of select="$linktype" />
@@ -105,27 +111,27 @@
<mxGeometry relative="1" as="geometry">
<mxPoint>
<xsl:attribute name="x">
- <xsl:value-of select="$targetoneblockx" />
+ <xsl:value-of select="$tgtoneotherblockx" />
</xsl:attribute>
<xsl:attribute name="y">
- <xsl:value-of select="$targetoneblocky" />
+ <xsl:value-of select="$tgtoneotherblocky" />
</xsl:attribute>
<xsl:attribute name="as">sourcePoint</xsl:attribute>
</mxPoint>
<mxPoint>
<xsl:attribute name="x">
- <xsl:value-of select="$sourceoneblockx" />
+ <xsl:value-of select="$srconeotherblockx" />
</xsl:attribute>
<xsl:attribute name="y">
- <xsl:value-of select="$sourceoneblocky" />
+ <xsl:value-of select="$srconeotherblocky" />
</xsl:attribute>
<xsl:attribute name="as">targetPoint</xsl:attribute>
</mxPoint>
<Array as="points">
- <xsl:for-each select="$targetonewaypoints">
+ <xsl:for-each select="$tgtonelinkwaypoints">
<xsl:copy-of select="." />
</xsl:for-each>
- <xsl:for-each select="$sourceonewaypoints">
+ <xsl:for-each select="$srconelinkwaypoints">
<xsl:copy-of select="." />
</xsl:for-each>
</Array>
@@ -137,8 +143,8 @@
<!-- generate new primary link two id {{{ -->
<xsl:variable name="newidtwo">
<xsl:choose>
- <xsl:when test="($targetonelink/@id != '' or $sourceonelink/@id != '') and $sourcetwolink/@id != ''">
- <xsl:value-of select="concat($sourcetwolink/@id, generate-id($sourcetwolink))" />
+ <xsl:when test="($tgtonelink/@id != '' or $srconelink/@id != '') and $srctwolink/@id != ''">
+ <xsl:value-of select="concat($srctwolink/@id, generate-id($srctwolink))" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
@@ -148,14 +154,14 @@
<!-- generate new primary link three id {{{ -->
<xsl:variable name="newidthree">
<xsl:choose>
- <xsl:when test="$targetonelink/@id != '' and $sourceonelink/@id != ''">
+ <xsl:when test="$tgtonelink/@id != '' and $srconelink/@id != ''">
<xsl:value-of select="$newidone" />
</xsl:when>
- <xsl:when test="$targetonelink/@id != ''">
- <xsl:value-of select="$targetonelinksrcortgt" />
+ <xsl:when test="$tgtonelink/@id != ''">
+ <xsl:value-of select="$tgtoneotherportid" />
</xsl:when>
- <xsl:when test="$sourceonelink/@id != ''">
- <xsl:value-of select="$sourceonelinksrcortgt" />
+ <xsl:when test="$srconelink/@id != ''">
+ <xsl:value-of select="$srconeotherportid" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
@@ -165,7 +171,7 @@
<!-- generate new primary link four id {{{ -->
<xsl:variable name="newidfour">
<xsl:choose>
- <xsl:when test="$targetonelink/@id != '' and $sourceonelink/@id != ''">
+ <xsl:when test="$tgtonelink/@id != '' and $srconelink/@id != ''">
<xsl:value-of select="$newidone" />
</xsl:when>
<xsl:otherwise>
@@ -176,7 +182,7 @@
<!-- }}} -->
<!-- generate new primary link two {{{ -->
- <xsl:if test="$newidthree != 'No match found' and $sourcetwolink/@id != ''">
+ <xsl:if test="$newidthree != 'No match found' and $srctwolink/@id != ''">
<xsl:element name="{$linktype}">
<xsl:attribute name="id">
<xsl:value-of select="$newidtwo" />
@@ -188,7 +194,7 @@
<xsl:value-of select="$newidthree" />
</xsl:attribute>
<xsl:attribute name="target">
- <xsl:value-of select="$sourcetwolinksrcortgt" />
+ <xsl:value-of select="$srctwootherportid" />
</xsl:attribute>
<xsl:attribute name="style">
<xsl:value-of select="$linktype" />
@@ -206,15 +212,15 @@
</mxPoint>
<mxPoint>
<xsl:attribute name="x">
- <xsl:value-of select="$sourcetwoblockx" />
+ <xsl:value-of select="$srctwootherblockx" />
</xsl:attribute>
<xsl:attribute name="y">
- <xsl:value-of select="$sourcetwoblocky" />
+ <xsl:value-of select="$srctwootherblocky" />
</xsl:attribute>
<xsl:attribute name="as">targetPoint</xsl:attribute>
</mxPoint>
<Array as="points">
- <xsl:for-each select="$sourcetwowaypoints">
+ <xsl:for-each select="$srctwolinkwaypoints">
<xsl:copy-of select="." />
</xsl:for-each>
</Array>
@@ -224,7 +230,7 @@
<!-- }}} -->
<!-- change source or target of secondary link: foreach loop, link copy, source change {{{ -->
- <xsl:for-each select="$targetonesrcsecondlink">
+ <xsl:for-each select="$tgtonesrcsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="source">
@@ -233,7 +239,7 @@
<xsl:copy-of select="node()" />
</xsl:copy>
</xsl:for-each>
- <xsl:for-each select="$targetonetgtsecondlink">
+ <xsl:for-each select="$tgtonetgtsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="target">
@@ -242,7 +248,7 @@
<xsl:copy-of select="node()" />
</xsl:copy>
</xsl:for-each>
- <xsl:for-each select="$sourceonesrcsecondlink">
+ <xsl:for-each select="$srconesrcsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="source">
@@ -251,7 +257,7 @@
<xsl:copy-of select="node()" />
</xsl:copy>
</xsl:for-each>
- <xsl:for-each select="$sourceonetgtsecondlink">
+ <xsl:for-each select="$srconetgtsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="target">
@@ -260,7 +266,7 @@
<xsl:copy-of select="node()" />
</xsl:copy>
</xsl:for-each>
- <xsl:for-each select="$sourcetwosrcsecondlink">
+ <xsl:for-each select="$srctwosrcsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="source">
@@ -269,7 +275,7 @@
<xsl:copy-of select="node()" />
</xsl:copy>
</xsl:for-each>
- <xsl:for-each select="$sourcetwotgtsecondlink">
+ <xsl:for-each select="$srctwotgtsecondlink">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:attribute name="target">
@@ -310,8 +316,8 @@
</xsl:variable>
<!-- }}} -->
- <!-- targetoneid, sourceoneid: find ports connected to splitblock (value) {{{ -->
- <xsl:variable name="targetoneid">
+ <!-- tgtoneid, srconeid: find ports connected to splitblock (value) {{{ -->
+ <xsl:variable name="tgtoneid">
<xsl:choose>
<xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
<xsl:value-of select="$InputPort[position()=1]/@id" />
@@ -325,7 +331,7 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourceoneid">
+ <xsl:variable name="srconeid">
<xsl:choose>
<xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
<xsl:value-of select="$OutputPort[position()=1]/@id" />
@@ -339,7 +345,7 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcetwoid">
+ <xsl:variable name="srctwoid">
<xsl:choose>
<xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
<xsl:value-of select="$OutputPort[position()=2]/@id" />
@@ -353,7 +359,7 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcethreeid">
+ <xsl:variable name="srcthreeid">
<xsl:choose>
<xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
<xsl:value-of select="$OutputPort[position()=3]/@id" />
@@ -368,326 +374,350 @@
</xsl:variable>
<!-- }}} -->
- <!-- targetonelink, sourceonelink: find links connected to ports connected to splitblock (node-set) {{{ -->
- <xsl:variable name="targetonelink" select="key('k-link', $targetoneid)" />
- <xsl:variable name="sourceonelink" select="key('k-link', $sourceoneid)" />
- <xsl:variable name="sourcetwolink" select="key('k-link', $sourcetwoid)" />
- <xsl:variable name="sourcethreelink" select="key('k-link', $sourcethreeid)" />
- <!-- }}} -->
-
- <!-- targetonesrcsecondlink, targetonetgtsecondlink, sourceonesrcsecondlink, sourceonetgtsecondlink: find secondary links connected to links connected to ports connected to splitblock (node-set) {{{ -->
- <xsl:variable name="targetonesrcsecondlink" select="key('k-linksrc', $targetonelink/@id)" />
- <xsl:variable name="targetonetgtsecondlink" select="key('k-linktgt', $targetonelink/@id)" />
- <xsl:variable name="sourceonesrcsecondlink" select="key('k-linksrc', $sourceonelink/@id)" />
- <xsl:variable name="sourceonetgtsecondlink" select="key('k-linktgt', $sourceonelink/@id)" />
- <xsl:variable name="sourcetwosrcsecondlink" select="key('k-linksrc', $sourcetwolink/@id)" />
- <xsl:variable name="sourcetwotgtsecondlink" select="key('k-linktgt', $sourcetwolink/@id)" />
- <xsl:variable name="sourcethreesrcsecondlink" select="key('k-linksrc', $sourcethreelink/@id)" />
- <xsl:variable name="sourcethreetgtsecondlink" select="key('k-linktgt', $sourcethreelink/@id)" />
+ <!-- tgtonelink, srconelink: find links connected to ports connected to splitblock (node-set) {{{ -->
+ <xsl:variable name="tgtonelink" select="key('k-link', $tgtoneid)" />
+ <xsl:variable name="srconelink" select="key('k-link', $srconeid)" />
+ <xsl:variable name="srctwolink" select="key('k-link', $srctwoid)" />
+ <xsl:variable name="srcthreelink" select="key('k-link', $srcthreeid)" />
<!-- }}} -->
- <!-- targetonelinksort, sourceonelinksort: find other (tgt|src) ports connected to links connected to (src|tgt) ports connected to splitblock (value) {{{ -->
- <xsl:variable name="targetonelinksort">
+ <!-- tgtoneotherportid, srconeotherportid: find other (tgt|src) ports connected to links connected to (src|tgt) ports connected to splitblock (value) {{{ -->
+ <xsl:variable name="tgtoneotherportid">
<xsl:choose>
- <xsl:when test="$targetoneid = $targetonelink/@source">
- <xsl:value-of select="$targetonelink/@target" />
+ <xsl:when test="$tgtoneid = $tgtonelink/@source">
+ <xsl:value-of select="$tgtonelink/@target" />
</xsl:when>
- <xsl:when test="$targetoneid = $targetonelink/@target">
- <xsl:value-of select="$targetonelink/@source" />
+ <xsl:when test="$tgtoneid = $tgtonelink/@target">
+ <xsl:value-of select="$tgtonelink/@source" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourceonelinksort">
+ <xsl:variable name="srconeotherportid">
<xsl:choose>
- <xsl:when test="$sourceoneid = $sourceonelink/@source">
- <xsl:value-of select="$sourceonelink/@target" />
+ <xsl:when test="$srconeid = $srconelink/@source">
+ <xsl:value-of select="$srconelink/@target" />
</xsl:when>
- <xsl:when test="$sourceoneid = $sourceonelink/@target">
- <xsl:value-of select="$sourceonelink/@source" />
+ <xsl:when test="$srconeid = $srconelink/@target">
+ <xsl:value-of select="$srconelink/@source" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcetwolinksort">
+ <xsl:variable name="srctwootherportid">
<xsl:choose>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@source">
- <xsl:value-of select="$sourcetwolink/@target" />
+ <xsl:when test="$srctwoid = $srctwolink/@source">
+ <xsl:value-of select="$srctwolink/@target" />
</xsl:when>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@target">
- <xsl:value-of select="$sourcetwolink/@source" />
+ <xsl:when test="$srctwoid = $srctwolink/@target">
+ <xsl:value-of select="$srctwolink/@source" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcethreelinksort">
+ <xsl:variable name="srcthreeotherportid">
<xsl:choose>
- <xsl:when test="$sourcethreeid = $sourcethreelink/@source">
- <xsl:value-of select="$sourcethreelink/@target" />
+ <xsl:when test="$srcthreeid = $srcthreelink/@source">
+ <xsl:value-of select="$srcthreelink/@target" />
</xsl:when>
- <xsl:when test="$sourcethreeid = $sourcethreelink/@target">
- <xsl:value-of select="$sourcethreelink/@source" />
+ <xsl:when test="$srcthreeid = $srcthreelink/@target">
+ <xsl:value-of select="$srcthreelink/@source" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- }}} -->
- <!-- targetoneblockx, targetoneblocky, sourceoneblockx, sourceoneblocky: find x, y position of other (tgt|src) ports connected to links connected to (src|tgt) ports connected to splitblock (value) {{{ -->
- <xsl:variable name="targetonelinkassort">
+ <!-- tgtoneotherblockx, tgtoneotherblocky, srconeotherblockx, srconeotherblocky: find x, y position of other (tgt|src) ports connected to links connected to (src|tgt) ports connected to splitblock (value) {{{ -->
+ <xsl:variable name="tgtoneotherportsort">
<xsl:choose>
- <xsl:when test="$targetoneid = $targetonelink/@source">targetPoint</xsl:when>
- <xsl:when test="$targetoneid = $targetonelink/@target">sourcePoint</xsl:when>
+ <xsl:when test="$tgtoneid = $tgtonelink/@source">targetPoint</xsl:when>
+ <xsl:when test="$tgtoneid = $tgtonelink/@target">sourcePoint</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="targetoneportsort" select="key('k-port', $targetonelinksort)" />
- <xsl:variable name="targetoneblocksort" select="key('k-block', $targetoneportsort/@parent)" />
+ <xsl:variable name="tgtoneotherport" select="key('k-port', $tgtoneotherportid)" />
+ <xsl:variable name="tgtoneotherblock" select="key('k-block', $tgtoneotherport/@parent)" />
- <xsl:variable name="targetoneblockx">
+ <xsl:variable name="tgtoneotherblockx">
<xsl:choose>
- <xsl:when test="$targetonelink/mxGeometry/mxPoint[@as=$targetonelinkassort]">
- <xsl:value-of select="$targetonelink/mxGeometry/mxPoint[@as=$targetonelinkassort]/@x" />
+ <xsl:when test="$tgtonelink/mxGeometry/mxPoint[@as=$tgtoneotherportsort]">
+ <xsl:value-of select="$tgtonelink/mxGeometry/mxPoint[@as=$tgtoneotherportsort]/@x" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$targetoneblocksort/mxGeometry/@x" />
+ <xsl:value-of select="$tgtoneotherblock/mxGeometry/@x" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="targetoneblocky" >
+ <xsl:variable name="tgtoneotherblocky" >
<xsl:choose>
- <xsl:when test="$targetonelink/mxGeometry/mxPoint[@as=$targetonelinkassort]">
- <xsl:value-of select="$targetonelink/mxGeometry/mxPoint[@as=$targetonelinkassort]/@y" />
+ <xsl:when test="$tgtonelink/mxGeometry/mxPoint[@as=$tgtoneotherportsort]">
+ <xsl:value-of select="$tgtonelink/mxGeometry/mxPoint[@as=$tgtoneotherportsort]/@y" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$targetoneblocksort/mxGeometry/@y" />
+ <xsl:value-of select="$tgtoneotherblock/mxGeometry/@y" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourceonelinkassort">
+ <xsl:variable name="srconeotherportsort">
<xsl:choose>
- <xsl:when test="$sourceoneid = $sourceonelink/@source">targetPoint</xsl:when>
- <xsl:when test="$sourceoneid = $sourceonelink/@target">sourcePoint</xsl:when>
+ <xsl:when test="$srconeid = $srconelink/@source">targetPoint</xsl:when>
+ <xsl:when test="$srconeid = $srconelink/@target">sourcePoint</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourceoneportsort" select="key('k-port', $sourceonelinksort)" />
- <xsl:variable name="sourceoneblocksort" select="key('k-block', $sourceoneportsort/@parent)" />
+ <xsl:variable name="srconeotherport" select="key('k-port', $srconeotherportid)" />
+ <xsl:variable name="srconeotherblock" select="key('k-block', $srconeotherport/@parent)" />
- <xsl:variable name="sourceoneblockx">
+ <xsl:variable name="srconeotherblockx">
<xsl:choose>
- <xsl:when test="$sourceonelink/mxGeometry/mxPoint[@as=$sourceonelinkassort]">
- <xsl:value-of select="$sourceonelink/mxGeometry/mxPoint[@as=$sourceonelinkassort]/@x" />
+ <xsl:when test="$srconelink/mxGeometry/mxPoint[@as=$srconeotherportsort]">
+ <xsl:value-of select="$srconelink/mxGeometry/mxPoint[@as=$srconeotherportsort]/@x" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourceoneblocksort/mxGeometry/@x" />
+ <xsl:value-of select="$srconeotherblock/mxGeometry/@x" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourceoneblocky" >
+ <xsl:variable name="srconeotherblocky" >
<xsl:choose>
- <xsl:when test="$sourceonelink/mxGeometry/mxPoint[@as=$sourceonelinkassort]">
- <xsl:value-of select="$sourceonelink/mxGeometry/mxPoint[@as=$sourceonelinkassort]/@y" />
+ <xsl:when test="$srconelink/mxGeometry/mxPoint[@as=$srconeotherportsort]">
+ <xsl:value-of select="$srconelink/mxGeometry/mxPoint[@as=$srconeotherportsort]/@y" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourceoneblocksort/mxGeometry/@y" />
+ <xsl:value-of select="$srconeotherblock/mxGeometry/@y" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcetwolinkassort">
+ <xsl:variable name="srctwootherportsort">
<xsl:choose>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@source">targetPoint</xsl:when>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@target">sourcePoint</xsl:when>
+ <xsl:when test="$srctwoid = $srctwolink/@source">targetPoint</xsl:when>
+ <xsl:when test="$srctwoid = $srctwolink/@target">sourcePoint</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcetwoportsort" select="key('k-port', $sourcetwolinksort)" />
- <xsl:variable name="sourcetwoblocksort" select="key('k-block', $sourcetwoportsort/@parent)" />
+ <xsl:variable name="srctwootherport" select="key('k-port', $srctwootherportid)" />
+ <xsl:variable name="srctwootherblock" select="key('k-block', $srctwootherport/@parent)" />
- <xsl:variable name="sourcetwoblockx">
+ <xsl:variable name="srctwootherblockx">
<xsl:choose>
- <xsl:when test="$sourcetwolink/mxGeometry/mxPoint[@as=$sourcetwolinkassort]">
- <xsl:value-of select="$sourcetwolink/mxGeometry/mxPoint[@as=$sourcetwolinkassort]/@x" />
+ <xsl:when test="$srctwolink/mxGeometry/mxPoint[@as=$srctwootherportsort]">
+ <xsl:value-of select="$srctwolink/mxGeometry/mxPoint[@as=$srctwootherportsort]/@x" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourcetwoblocksort/mxGeometry/@x" />
+ <xsl:value-of select="$srctwootherblock/mxGeometry/@x" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcetwoblocky" >
+ <xsl:variable name="srctwootherblocky" >
<xsl:choose>
- <xsl:when test="$sourcetwolink/mxGeometry/mxPoint[@as=$sourcetwolinkassort]">
- <xsl:value-of select="$sourcetwolink/mxGeometry/mxPoint[@as=$sourcetwolinkassort]/@y" />
+ <xsl:when test="$srctwolink/mxGeometry/mxPoint[@as=$srctwootherportsort]">
+ <xsl:value-of select="$srctwolink/mxGeometry/mxPoint[@as=$srctwootherportsort]/@y" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourcetwoblocksort/mxGeometry/@y" />
+ <xsl:value-of select="$srctwootherblock/mxGeometry/@y" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcethreelinkassort">
+ <xsl:variable name="srcthreeotherportsort">
<xsl:choose>
- <xsl:when test="$sourcethreeid = $sourcethreelink/@source">targetPoint</xsl:when>
- <xsl:when test="$sourcethreeid = $sourcethreelink/@target">sourcePoint</xsl:when>
+ <xsl:when test="$srcthreeid = $srcthreelink/@source">targetPoint</xsl:when>
+ <xsl:when test="$srcthreeid = $srcthreelink/@target">sourcePoint</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcethreeportsort" select="key('k-port', $sourcethreelinksort)" />
- <xsl:variable name="sourcethreeblocksort" select="key('k-block', $sourcethreeportsort/@parent)" />
- <xsl:variable name="sourcethreeblockx">
+ <xsl:variable name="srcthreeotherport" select="key('k-port', $srcthreeotherportid)" />
+ <xsl:variable name="srcthreeotherblock" select="key('k-block', $srcthreeotherport/@parent)" />
+ <xsl:variable name="srcthreeotherblockx">
<xsl:choose>
- <xsl:when test="$sourcethreelink/mxGeometry/mxPoint[@as=$sourcethreelinkassort]">
- <xsl:value-of select="$sourcethreelink/mxGeometry/mxPoint[@as=$sourcethreelinkassort]/@x" />
+ <xsl:when test="$srcthreelink/mxGeometry/mxPoint[@as=$srcthreeotherportsort]">
+ <xsl:value-of select="$srcthreelink/mxGeometry/mxPoint[@as=$srcthreeotherportsort]/@x" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourcethreeblocksort/mxGeometry/@x" />
+ <xsl:value-of select="$srcthreeotherblock/mxGeometry/@x" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="sourcethreeblocky" >
+ <xsl:variable name="srcthreeotherblocky" >
<xsl:choose>
- <xsl:when test="$sourcethreelink/mxGeometry/mxPoint[@as=$sourcethreelinkassort]">
- <xsl:value-of select="$sourcethreelink/mxGeometry/mxPoint[@as=$sourcethreelinkassort]/@y" />
+ <xsl:when test="$srcthreelink/mxGeometry/mxPoint[@as=$srcthreeotherportsort]">
+ <xsl:value-of select="$srcthreelink/mxGeometry/mxPoint[@as=$srcthreeotherportsort]/@y" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$sourcethreeblocksort/mxGeometry/@y" />
+ <xsl:value-of select="$srcthreeotherblock/mxGeometry/@y" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- <xsl:element name="variables">
- <xsl:attribute name="targetonelinkassort">
- <xsl:value-of select="$targetonelinkassort" />
+ <xsl:attribute name="tgtoneotherportsort">
+ <xsl:value-of select="$tgtoneotherportsort" />
</xsl:attribute>
- <xsl:attribute name="targetoneblockx">
- <xsl:value-of select="$targetoneblockx" />
+ <xsl:attribute name="tgtoneotherblockx">
+ <xsl:value-of select="$tgtoneotherblockx" />
</xsl:attribute>
- <xsl:attribute name="targetoneblocky">
- <xsl:value-of select="$targetoneblocky" />
+ <xsl:attribute name="tgtoneotherblocky">
+ <xsl:value-of select="$tgtoneotherblocky" />
</xsl:attribute>
- <xsl:attribute name="sourceonelinkassort">
- <xsl:value-of select="$sourceonelinkassort" />
+ <xsl:attribute name="srconeotherportsort">
+ <xsl:value-of select="$srconeotherportsort" />
</xsl:attribute>
- <xsl:attribute name="sourceoneblockx">
- <xsl:value-of select="$sourceoneblockx" />
+ <xsl:attribute name="srconeotherblockx">
+ <xsl:value-of select="$srconeotherblockx" />
</xsl:attribute>
- <xsl:attribute name="sourceoneblocky">
- <xsl:value-of select="$sourceoneblocky" />
+ <xsl:attribute name="srconeotherblocky">
+ <xsl:value-of select="$srconeotherblocky" />
</xsl:attribute>
- <xsl:attribute name="sourcetwolinkassort">
- <xsl:value-of select="$sourcetwolinkassort" />
+ <xsl:attribute name="srctwootherportsort">
+ <xsl:value-of select="$srctwootherportsort" />
</xsl:attribute>
- <xsl:attribute name="sourcetwoblockx">
- <xsl:value-of select="$sourcetwoblockx" />
+ <xsl:attribute name="srctwootherblockx">
+ <xsl:value-of select="$srctwootherblockx" />
</xsl:attribute>
- <xsl:attribute name="sourcetwoblocky">
- <xsl:value-of select="$sourcetwoblocky" />
+ <xsl:attribute name="srctwootherblocky">
+ <xsl:value-of select="$srctwootherblocky" />
</xsl:attribute>
</xsl:element> -->
<!-- }}} -->
- <!-- targetonewaypoints, sourceonewaypoints: find waypoints of links connected to ports connected to splitblock (node-set) {{{ -->
- <xsl:variable name="tmptargetonewaypoints">
+ <!-- tgtonelinkwaypoints, srconelinkwaypoints: find waypoints of links connected to ports connected to splitblock (node-set) {{{ -->
+ <xsl:variable name="tmptgtonelinkwaypoints">
+ <waypoints>
+ <xsl:choose>
+ <xsl:when test="$tgtoneid = $tgtonelink/@source">
+ <xsl:for-each select="$tgtonelink/mxGeometry/Array/mxPoint">
+ <xsl:sort select="position()" order="descending"/>
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="$tgtoneid = $tgtonelink/@target">
+ <xsl:copy-of select="$tgtonelink/mxGeometry/Array/mxPoint" />
+ </xsl:when>
+ <xsl:otherwise>No match found</xsl:otherwise>
+ </xsl:choose>
+ </waypoints>
+ </xsl:variable>
+ <xsl:variable name="tgtonelinkwaypoints" select="ext:node-set($tmptgtonelinkwaypoints)/waypoints/mxPoint" />
+
+ <xsl:variable name="tmpsrconelinkwaypoints">
<waypoints>
<xsl:choose>
- <xsl:when test="$targetoneid = $targetonelink/@source">
- <xsl:for-each select="$targetonelink/mxGeometry/Array/mxPoint">
+ <xsl:when test="$srconeid = $srconelink/@target">
+ <xsl:for-each select="$srconelink/mxGeometry/Array/mxPoint">
<xsl:sort select="position()" order="descending"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:when>
- <xsl:when test="$targetoneid = $targetonelink/@target">
- <xsl:copy-of select="$targetonelink/mxGeometry/Array/mxPoint" />
+ <xsl:when test="$srconeid = $srconelink/@source">
+ <xsl:copy-of select="$srconelink/mxGeometry/Array/mxPoint" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</waypoints>
</xsl:variable>
- <xsl:variable name="targetonewaypoints" select="ext:node-set($tmptargetonewaypoints)/waypoints/mxPoint" />
+ <xsl:variable name="srconelinkwaypoints" select="ext:node-set($tmpsrconelinkwaypoints)/waypoints/mxPoint" />
- <xsl:variable name="tmpsourceonewaypoints">
+ <xsl:variable name="tmpsrctwolinkwaypoints">
<waypoints>
<xsl:choose>
- <xsl:when test="$sourceoneid = $sourceonelink/@target">
- <xsl:for-each select="$sourceonelink/mxGeometry/Array/mxPoint">
+ <xsl:when test="$srctwoid = $srctwolink/@target">
+ <xsl:for-each select="$srctwolink/mxGeometry/Array/mxPoint">
<xsl:sort select="position()" order="descending"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:when>
- <xsl:when test="$sourceoneid = $sourceonelink/@source">
- <xsl:copy-of select="$sourceonelink/mxGeometry/Array/mxPoint" />
+ <xsl:when test="$srctwoid = $srctwolink/@source">
+ <xsl:copy-of select="$srctwolink/mxGeometry/Array/mxPoint" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</waypoints>
</xsl:variable>
- <xsl:variable name="sourceonewaypoints" select="ext:node-set($tmpsourceonewaypoints)/waypoints/mxPoint" />
+ <xsl:variable name="srctwolinkwaypoints" select="ext:node-set($tmpsrctwolinkwaypoints)/waypoints/mxPoint" />
- <xsl:variable name="tmpsourcetwowaypoints">
+ <xsl:variable name="tmpsrcthreelinkwaypoints">
<waypoints>
<xsl:choose>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@target">
- <xsl:for-each select="$sourcetwolink/mxGeometry/Array/mxPoint">
+ <xsl:when test="$srcthreeid = $srcthreelink/@target">
+ <xsl:for-each select="$srcthreelink/mxGeometry/Array/mxPoint">
<xsl:sort select="position()" order="descending"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:when>
- <xsl:when test="$sourcetwoid = $sourcetwolink/@source">
- <xsl:copy-of select="$sourcetwolink/mxGeometry/Array/mxPoint" />
+ <xsl:when test="$srcthreeid = $srcthreelink/@source">
+ <xsl:copy-of select="$srcthreelink/mxGeometry/Array/mxPoint" />
</xsl:when>
<xsl:otherwise>No match found</xsl:otherwise>
</xsl:choose>
</waypoints>
</xsl:variable>
- <xsl:variable name="sourcetwowaypoints" select="ext:node-set($tmpsourcetwowaypoints)/waypoints/mxPoint" />
+ <xsl:variable name="srcthreelinkwaypoints" select="ext:node-set($tmpsrcthreelinkwaypoints)/waypoints/mxPoint" />
+ <!-- }}} -->
+
+ <!-- tgtonesrcsecondlink, tgtonetgtsecondlink, srconesrcsecondlink, srconetgtsecondlink: find secondary links connected to links connected to ports connected to splitblock (node-set) {{{ -->
+ <xsl:variable name="tgtonesrcsecondlink" select="key('k-linksrc', $tgtonelink/@id)" />
+ <xsl:variable name="tgtonetgtsecondlink" select="key('k-linktgt', $tgtonelink/@id)" />
+ <xsl:variable name="srconesrcsecondlink" select="key('k-linksrc', $srconelink/@id)" />
+ <xsl:variable name="srconetgtsecondlink" select="key('k-linktgt', $srconelink/@id)" />
+ <xsl:variable name="srctwosrcsecondlink" select="key('k-linksrc', $srctwolink/@id)" />
+ <xsl:variable name="srctwotgtsecondlink" select="key('k-linktgt', $srctwolink/@id)" />
+ <xsl:variable name="srcthreesrcsecondlink" select="key('k-linksrc', $srcthreelink/@id)" />
+ <xsl:variable name="srcthreetgtsecondlink" select="key('k-linktgt', $srcthreelink/@id)" />
<!-- }}} -->
<!-- call the template {{{ -->
<xsl:call-template name="links">
- <xsl:with-param name="linktype" select="$linktype" />
- <xsl:with-param name="targetonelink" select="$targetonelink" />
- <xsl:with-param name="targetonelinksrcortgt" select="$targetonelinksort" />
- <xsl:with-param name="sourceonelink" select="$sourceonelink" />
- <xsl:with-param name="sourceonelinksrcortgt" select="$sourceonelinksort" />
- <xsl:with-param name="sourcetwolink" select="$sourcetwolink" />
- <xsl:with-param name="sourcetwolinksrcortgt" select="$sourcetwolinksort" />
- <xsl:with-param name="sourcethreelink" select="$sourcethreelink" />
- <xsl:with-param name="sourcethreelinksrcortgt" select="$sourcethreelinksort" />
- <xsl:with-param name="targetonesrcsecondlink" select="$targetonesrcsecondlink" />
- <xsl:with-param name="targetonetgtsecondlink" select="$targetonetgtsecondlink" />
- <xsl:with-param name="sourceonesrcsecondlink" select="$sourceonesrcsecondlink" />
- <xsl:with-param name="sourceonetgtsecondlink" select="$sourceonetgtsecondlink" />
- <xsl:with-param name="sourcetwosrcsecondlink" select="$sourcetwosrcsecondlink" />
- <xsl:with-param name="sourcetwotgtsecondlink" select="$sourcetwotgtsecondlink" />
- <xsl:with-param name="sourcethreesrcsecondlink" select="$sourcethreesrcsecondlink" />
- <xsl:with-param name="sourcethreetgtsecondlink" select="$sourcethreetgtsecondlink" />
- <xsl:with-param name="targetonewaypoints" select="$targetonewaypoints" />
- <xsl:with-param name="sourceonewaypoints" select="$sourceonewaypoints" />
- <xsl:with-param name="sourcetwowaypoints" select="$sourcetwowaypoints" />
<xsl:with-param name="x" select="$x" />
<xsl:with-param name="y" select="$y" />
<xsl:with-param name="parent" select="$parent" />
- <xsl:with-param name="targetoneblockx" select="$targetoneblockx" />
- <xsl:with-param name="targetoneblocky" select="$targetoneblocky" />
- <xsl:with-param name="sourceoneblockx" select="$sourceoneblockx" />
- <xsl:with-param name="sourceoneblocky" select="$sourceoneblocky" />
- <xsl:with-param name="sourcetwoblockx" select="$sourcetwoblockx" />
- <xsl:with-param name="sourcetwoblocky" select="$sourcetwoblocky" />
- <xsl:with-param name="sourcethreeblockx" select="$sourcethreeblockx" />
- <xsl:with-param name="sourcethreeblocky" select="$sourcethreeblocky" />
+
+ <xsl:with-param name="linktype" select="$linktype" />
+
+ <xsl:with-param name="tgtonelink" select="$tgtonelink" />
+ <xsl:with-param name="tgtonelinkwaypoints" select="$tgtonelinkwaypoints" />
+ <xsl:with-param name="tgtoneotherportid" select="$tgtoneotherportid" />
+ <xsl:with-param name="tgtoneotherblockx" select="$tgtoneotherblockx" />
+ <xsl:with-param name="tgtoneotherblocky" select="$tgtoneotherblocky" />
+ <xsl:with-param name="tgtonesrcsecondlink" select="$tgtonesrcsecondlink" />
+ <xsl:with-param name="tgtonetgtsecondlink" select="$tgtonetgtsecondlink" />
+
+ <xsl:with-param name="srconelink" select="$srconelink" />
+ <xsl:with-param name="srconelinkwaypoints" select="$srconelinkwaypoints" />
+ <xsl:with-param name="srconeotherportid" select="$srconeotherportid" />
+ <xsl:with-param name="srconeotherblockx" select="$srconeotherblockx" />
+ <xsl:with-param name="srconeotherblocky" select="$srconeotherblocky" />
+ <xsl:with-param name="srconesrcsecondlink" select="$srconesrcsecondlink" />
+ <xsl:with-param name="srconetgtsecondlink" select="$srconetgtsecondlink" />
+
+ <xsl:with-param name="srctwolink" select="$srctwolink" />
+ <xsl:with-param name="srctwolinkwaypoints" select="$srctwolinkwaypoints" />
+ <xsl:with-param name="srctwootherportid" select="$srctwootherportid" />
+ <xsl:with-param name="srctwootherblockx" select="$srctwootherblockx" />
+ <xsl:with-param name="srctwootherblocky" select="$srctwootherblocky" />
+ <xsl:with-param name="srctwosrcsecondlink" select="$srctwosrcsecondlink" />
+ <xsl:with-param name="srctwotgtsecondlink" select="$srctwotgtsecondlink" />
+
+ <xsl:with-param name="srcthreelink" select="$srcthreelink" />
+ <xsl:with-param name="srcthreelinkwaypoints" select="$srcthreelinkwaypoints" />
+ <xsl:with-param name="srcthreeotherportid" select="$srcthreeotherportid" />
+ <xsl:with-param name="srcthreeotherblockx" select="$srcthreeotherblockx" />
+ <xsl:with-param name="srcthreeotherblocky" select="$srcthreeotherblocky" />
+ <xsl:with-param name="srcthreesrcsecondlink" select="$srcthreesrcsecondlink" />
+ <xsl:with-param name="srcthreetgtsecondlink" select="$srcthreetgtsecondlink" />
</xsl:call-template>
<!-- }}} -->