summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2024-10-07 16:52:55 +0530
committerSunil Shetye2024-10-07 16:52:55 +0530
commit13bb0ba674f03b1dc9dddc5ebd23213fe75e0fcc (patch)
treec4b6d7ec99339e599ef6715b92f6168640dd4466
parent32c1044a9a18b9016b7367778b2772123273acec (diff)
downloadCommon-Interface-Project-13bb0ba674f03b1dc9dddc5ebd23213fe75e0fcc.tar.gz
Common-Interface-Project-13bb0ba674f03b1dc9dddc5ebd23213fe75e0fcc.tar.bz2
Common-Interface-Project-13bb0ba674f03b1dc9dddc5ebd23213fe75e0fcc.zip
remove unused split.xsl
-rw-r--r--blocks/Makefile1
-rw-r--r--blocks/eda-frontend/public/splitblock.xsl30
-rw-r--r--blocks/xcos2xml/split.xsl164
3 files changed, 11 insertions, 184 deletions
diff --git a/blocks/Makefile b/blocks/Makefile
index 29e50902..648ac1bb 100644
--- a/blocks/Makefile
+++ b/blocks/Makefile
@@ -8,7 +8,6 @@ SRCFILES += $(sort $(wildcard Xcos/ports/*.py))
SRCFILES += $(sort $(wildcard Xcos/links/*.py))
XCOS2XMLFILES := $(sort $(wildcard xcos2xml/head.xsl))
-# XCOS2XMLFILES += $(sort $(wildcard xcos2xml/split.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/blocks/*.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/ports/*.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/links/*.xsl))
diff --git a/blocks/eda-frontend/public/splitblock.xsl b/blocks/eda-frontend/public/splitblock.xsl
index 9a67219a..b3742a36 100644
--- a/blocks/eda-frontend/public/splitblock.xsl
+++ b/blocks/eda-frontend/public/splitblock.xsl
@@ -60,7 +60,6 @@
<xsl:for-each select="$targetonelink/mxGeometry/mxPoint">
<xsl:copy>
<xsl:copy-of select="@*"/>
-
</xsl:copy>
</xsl:for-each>
</mxGeometry>
@@ -100,7 +99,7 @@
</Array>
</mxGeometry>
</xsl:element>
- <!-- foreach loop, link copy, source change -->
+ <!-- foreach loop, link copy, source change -->
<xsl:for-each select="$targetonesecondlink">
<xsl:copy>
<xsl:copy-of select="@*"/>
@@ -144,8 +143,6 @@
<xsl:variable name="y" select="$geometry/@y" />
<xsl:variable name="parent" select="@parent" />
-
-
<xsl:choose>
<xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
<xsl:variable name="linktype">ExplicitLink</xsl:variable>
@@ -250,26 +247,21 @@
<xsl:variable name="targetElemId" select="$targetElement/@parent"/>
<xsl:variable name="parentTargetElement" select="//*[@id = $targetElemId]"/>
<xsl:variable name="SPLITID" select="//SplitBlock[position() = 1]/@id"/>
-
-
-
+
<xsl:choose>
<xsl:when test="$sourceElemId != $SPLITID and $targetElemId != $SPLITID">
- <xsl:variable name="tgtsrcid" select="//*[@id = $targetElement/@source]/@parent"/>
- <xsl:variable name="srctgtid" select="//*[@id = $sourceElement/@target]/@parent"/>
- <xsl:variable name="srcsrcid" select="//*[@id = $sourceElement/@source]/@parent"/>
- <xsl:variable name="tgttgtid" select="//*[@id = $targetElement/@target]/@parent"/>
+ <xsl:variable name="tgtsrcid" select="//*[@id = $targetElement/@source]/@parent"/>
+ <xsl:variable name="srctgtid" select="//*[@id = $sourceElement/@target]/@parent"/>
+ <xsl:variable name="srcsrcid" select="//*[@id = $sourceElement/@source]/@parent"/>
+ <xsl:variable name="tgttgtid" select="//*[@id = $targetElement/@target]/@parent"/>
- <xsl:choose>
+ <xsl:choose>
<xsl:when test="((string-length($tgtsrcid) = 0 or $tgtsrcid != $SPLITID) and (string-length($tgttgtid) = 0 or $tgttgtid != $SPLITID)) and ((string-length($srctgtid) = 0 or $srctgtid != $SPLITID) and (string-length($srcsrcid) = 0 or $srcsrcid != $SPLITID))">
-
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="node()"/>
- </xsl:copy>
-
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:copy-of select="node()"/>
+ </xsl:copy>
</xsl:when>
-
</xsl:choose>
</xsl:when>
</xsl:choose>
diff --git a/blocks/xcos2xml/split.xsl b/blocks/xcos2xml/split.xsl
deleted file mode 100644
index 72915c76..00000000
--- a/blocks/xcos2xml/split.xsl
+++ /dev/null
@@ -1,164 +0,0 @@
- <!-- <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-implicitsrclink" match="ImplicitLink" use="@source | @target" /> -->
-
- <!-- <xsl:template name="links">
- <xsl:param name="linktype" />
- <xsl:param name="targetonelink" />
- <xsl:param name="sourceonelink" />
- <xsl:param name="sourcetwolink" />
- <xsl:param name="x" />
- <xsl:param name="y" />
-
- <xsl:variable name="newidone" select="generate-id()" />
-
- <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="$targetonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- <xsl:for-each select="$sourceonelink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- </Array>
- </mxGeometry>
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- </xsl:element>
-
- <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="$sourcetwolink/@target" />
- </xsl:attribute>
- <xsl:attribute name="targetVertex">
- <xsl:value-of select="$newidone" />
- </xsl:attribute>
- <xsl:attribute name="tarx">
- <xsl:value-of select="$x" />
- </xsl:attribute>
- <xsl:attribute name="tary">
- <xsl:value-of select="$y" />
- </xsl:attribute>
- <xsl:attribute name="CellType">Unknown</xsl:attribute>
- <mxGeometry relative="1" as="geometry">
- <mxPoint>
- <xsl:attribute name="x">
- <xsl:value-of select="$x" />
- </xsl:attribute>
- <xsl:attribute name="y">
- <xsl:value-of select="$y" />
- </xsl:attribute>
- <xsl:attribute name="as">targetPoint</xsl:attribute>
- </mxPoint>
- <Array as="points">
- <xsl:for-each select="$sourcetwolink/mxGeometry/Array/mxPoint">
- <xsl:copy-of select="." />
- </xsl:for-each>
- </Array>
- </mxGeometry>
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- </xsl:element>
- </xsl:template> -->
-
- <!-- <xsl:template match="SplitBlock">
- <xsl:variable name="InputPort" select="key('k-input', @id)" />
- <xsl:variable name="OutputPort" select="key('k-output', @id)" />
-
- <xsl:variable name="ControlPort" select="key('k-control', @id)" />
- <xsl:variable name="CommandPort" select="key('k-command', @id)" />
-
- <xsl:variable name="ImplicitPort" select="key('k-implicitinput', @id)" />
-
- <xsl:variable name="geometry" select="mxGeometry" />
- <xsl:variable name="x" select="$geometry/@x" />
- <xsl:variable name="y" select="$geometry/@y" />
-
- <xsl:choose>
- <xsl:when test="count($InputPort) >= 1 and count($OutputPort) >= 2">
- <xsl:variable name="targetoneid" select="$InputPort[position()=1]/@id" />
- <xsl:variable name="sourceoneid" select="$OutputPort[position()=1]/@id" />
- <xsl:variable name="sourcetwoid" select="$OutputPort[position()=2]/@id" />
- <xsl:variable name="targetonelink" select="key('k-tgtlink', $targetoneid)" />
- <xsl:variable name="sourceonelink" select="key('k-srclink', $sourceoneid)" />
- <xsl:variable name="sourcetwolink" select="key('k-srclink', $sourcetwoid)" />
-
- <xsl:call-template name="links">
- <xsl:with-param name="linktype" select="ExplicitLink"/>
- <xsl:with-param name="targetonelink" select="$targetonelink"/>
- <xsl:with-param name="sourceonelink" select="$sourceonelink"/>
- <xsl:with-param name="sourcetwolink" select="$sourcetwolink"/>
- <xsl:with-param name="x" select="$x"/>
- <xsl:with-param name="y" select="$y"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="count($ControlPort) >= 1 and count($CommandPort) >= 2">
- <xsl:variable name="targetcommandoneid" select="$ControlPort[position()=1]/@id" />
- <xsl:variable name="sourcecommandoneid" select="$CommandPort[position()=1]/@id" />
- <xsl:variable name="sourcecommandtwoid" select="$CommandPort[position()=2]/@id" />
- <xsl:variable name="targetcommandonelink" select="key('k-commandtgtlink', $targetcommandoneid)" />
- <xsl:variable name="sourcecommandonelink" select="key('k-commandsrclink', $sourcecommandoneid)" />
- <xsl:variable name="sourcecommandtwolink" select="key('k-commandsrclink', $sourcecommandtwoid)" />
-
- <xsl:call-template name="links">
- <xsl:with-param name="linktype" select="ImplicitLink"/>
- <xsl:with-param name="targetonelink" select="$targetcommandonelink"/>
- <xsl:with-param name="sourceonelink" select="$sourcecommandonelink"/>
- <xsl:with-param name="sourcetwolink" select="$sourcecommandtwolink"/>
- <xsl:with-param name="x" select="$x"/>
- <xsl:with-param name="y" select="$y"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="count($ImplicitPort) >= 3">
- <xsl:variable name="targetimplicitoneid" select="$ImplicitPort[position()=1]/@id" />
- <xsl:variable name="sourceimplicitoneid" select="$ImplicitPort[position()=2]/@id" />
- <xsl:variable name="sourceimplicittwoid" select="$ImplicitPort[position()=3]/@id" />
- <xsl:variable name="targetimplicitonelink" select="key('k-implicitsrclink', $targetimplicitoneid)" />
- <xsl:variable name="sourceimplicitonelink" select="key('k-implicitsrclink', $sourceimplicitoneid)" />
- <xsl:variable name="sourceimplicittwolink" select="key('k-implicitsrclink', $sourceimplicittwoid)" />
-
- <xsl:call-template name="links">
- <xsl:with-param name="linktype" select="CommandControlLink"/>
- <xsl:with-param name="targetonelink" select="$targetimplicitonelink"/>
- <xsl:with-param name="sourceonelink" select="$sourceimplicitonelink"/>
- <xsl:with-param name="sourcetwolink" select="$sourceimplicittwolink"/>
- <xsl:with-param name="x" select="$x"/>
- <xsl:with-param name="y" select="$y"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </xsl:template> -->
-
-
-
-