diff options
author | Suchita Lad | 2024-07-04 12:48:20 +0530 |
---|---|---|
committer | Suchita Lad | 2024-07-04 12:48:20 +0530 |
commit | 86cba594fd55f71197d4f8ae5f508c076bb8eb2d (patch) | |
tree | c4dbb20bdf77f1e6942ae40c775b0441a2682cbd | |
parent | d0ad318846b72c0b74b50e18ec93b4144256289b (diff) | |
download | Common-Interface-Project-86cba594fd55f71197d4f8ae5f508c076bb8eb2d.tar.gz Common-Interface-Project-86cba594fd55f71197d4f8ae5f508c076bb8eb2d.tar.bz2 Common-Interface-Project-86cba594fd55f71197d4f8ae5f508c076bb8eb2d.zip |
Updated SUMMATION block file
-rw-r--r-- | blocks/xcos2xml/blocks/SUMMATION.xsl | 13 | ||||
-rw-r--r-- | blocks/xcos2xml/foot.xsl | 4 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/CommandPort.xsl | 25 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/ControlPort.xsl | 25 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/ExplicitInputPort.xsl | 25 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/ExplicitOutputPort.xsl | 25 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/ImplicitInputPort.xsl | 22 | ||||
-rw-r--r-- | blocks/xcos2xml/ports/ImplicitOutputPort.xsl | 22 |
8 files changed, 8 insertions, 153 deletions
diff --git a/blocks/xcos2xml/blocks/SUMMATION.xsl b/blocks/xcos2xml/blocks/SUMMATION.xsl index 209a7bd8..5de495ef 100644 --- a/blocks/xcos2xml/blocks/SUMMATION.xsl +++ b/blocks/xcos2xml/blocks/SUMMATION.xsl @@ -1,8 +1,8 @@ <xsl:template match="*[@interfaceFunctionName = 'SUMMATION']"> - <xsl:variable name="total" select="(*[@as='exprs']/data)" /> + <xsl:variable name="total" select="count(*[@as='exprs']/data)" /> <xsl:variable name="parameters1"> <xsl:choose> - <xsl:when test="count($total) = 1">1</xsl:when> + <xsl:when test="$total = 1">1</xsl:when> <xsl:otherwise> <xsl:value-of select="(*[@as='exprs']/data[1]/@value)" /> </xsl:otherwise> @@ -11,7 +11,7 @@ <xsl:variable name="parameters2"> <xsl:choose> - <xsl:when test="count($total) = 1"> + <xsl:when test="$total = 1"> <xsl:value-of select="(*[@as='exprs']/data[1]/@value)" /> </xsl:when> <xsl:otherwise> @@ -22,21 +22,16 @@ <xsl:variable name="parameters3"> <xsl:choose> - <xsl:when test="count($total) = 1">0</xsl:when> + <xsl:when test="$total = 1">0</xsl:when> <xsl:otherwise> <xsl:value-of select="(*[@as='exprs']/data[3]/@value)" /> </xsl:otherwise> </xsl:choose> </xsl:variable> - <!-- <xsl:variable name="total1" select="(*[@as='exprs']/data)" /> --> - <!-- <xsl:variable name="value"> - <xsl:value-of select="parameter[1]" /> - </xsl:variable> --> <xsl:variable name="explicitInputPorts"> - <!-- <xsl:variable name="count" select="string-length($parameters2) - string-length(translate($parameters2, ';,', '')) + 1" /> --> <xsl:value-of select="string-length($parameters2) - string-length(translate($parameters2, ';,', '')) + 1" /> </xsl:variable> <xsl:variable name="implicitInputPorts">0</xsl:variable> diff --git a/blocks/xcos2xml/foot.xsl b/blocks/xcos2xml/foot.xsl index 25c82141..0c4704e2 100644 --- a/blocks/xcos2xml/foot.xsl +++ b/blocks/xcos2xml/foot.xsl @@ -7,4 +7,8 @@ <xsl:template match="ScilabString" /> <xsl:template match="ExplicitInputPort" /> <xsl:template match="ExplicitOutputPort" /> + <xsl:template match="ImplicitInputPort" /> + <xsl:template match="ImplicitOutputPort" /> + <xsl:template match="CommandPort" /> + <xsl:template match="ControlPort" /> </xsl:stylesheet> diff --git a/blocks/xcos2xml/ports/CommandPort.xsl b/blocks/xcos2xml/ports/CommandPort.xsl deleted file mode 100644 index 73dbd17a..00000000 --- a/blocks/xcos2xml/ports/CommandPort.xsl +++ /dev/null @@ -1,25 +0,0 @@ - <xsl:template match="CommandPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <mxGeometry x="0.5" y="1" width="8" height="8" relative="1" as="geometry"> - <mxPoint x="-4" as="offset"/> - </mxGeometry> - <xsl:apply-templates select="node()"/> - <Object as="parameter_values"/> - <Object as="displayProperties"/> - </xsl:element> - </xsl:template> diff --git a/blocks/xcos2xml/ports/ControlPort.xsl b/blocks/xcos2xml/ports/ControlPort.xsl deleted file mode 100644 index a7980ebf..00000000 --- a/blocks/xcos2xml/ports/ControlPort.xsl +++ /dev/null @@ -1,25 +0,0 @@ - <xsl:template match="ControlPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <mxGeometry x="0.5" width="8" height="8" relative="1" as="geometry"> - <mxPoint x="-4" y="-8" as="offset"/> - </mxGeometry> - <xsl:apply-templates select="node()"/> - <Object as="parameter_values"/> - <Object as="displayProperties"/> - </xsl:element> - </xsl:template> diff --git a/blocks/xcos2xml/ports/ExplicitInputPort.xsl b/blocks/xcos2xml/ports/ExplicitInputPort.xsl deleted file mode 100644 index 06cb1e0d..00000000 --- a/blocks/xcos2xml/ports/ExplicitInputPort.xsl +++ /dev/null @@ -1,25 +0,0 @@ - <xsl:template match="ExplicitInputPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <mxGeometry y="0.5" width="8" height="8" relative="1" as="geometry"> - <mxPoint x="-8" y="-4" as="offset"/> - </mxGeometry> - <xsl:apply-templates select="node()"/> - <Object as="parameter_values"/> - <Object as="displayProperties"/> - </xsl:element> - </xsl:template> diff --git a/blocks/xcos2xml/ports/ExplicitOutputPort.xsl b/blocks/xcos2xml/ports/ExplicitOutputPort.xsl deleted file mode 100644 index 29ae4746..00000000 --- a/blocks/xcos2xml/ports/ExplicitOutputPort.xsl +++ /dev/null @@ -1,25 +0,0 @@ - <xsl:template match="ExplicitOutputPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <mxGeometry x="1" y="0.5" width="8" height="8" relative="1" as="geometry"> - <mxPoint y="-4" as="offset"/> - </mxGeometry> - <xsl:apply-templates select="node()"/> - <Object as="parameter_values"/> - <Object as="displayProperties"/> - </xsl:element> - </xsl:template> diff --git a/blocks/xcos2xml/ports/ImplicitInputPort.xsl b/blocks/xcos2xml/ports/ImplicitInputPort.xsl deleted file mode 100644 index 31e0b5bd..00000000 --- a/blocks/xcos2xml/ports/ImplicitInputPort.xsl +++ /dev/null @@ -1,22 +0,0 @@ - <xsl:template match="ImplicitInputPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <xsl:apply-templates select="node()"/> - <Object display_parameter="" as="displayProperties"/> - <Object as="parameter_values"/> - </xsl:element> - </xsl:template> diff --git a/blocks/xcos2xml/ports/ImplicitOutputPort.xsl b/blocks/xcos2xml/ports/ImplicitOutputPort.xsl deleted file mode 100644 index 3837970b..00000000 --- a/blocks/xcos2xml/ports/ImplicitOutputPort.xsl +++ /dev/null @@ -1,22 +0,0 @@ - <xsl:template match="ImplicitOutputPort"> - <xsl:element name="mxCell"> - <xsl:attribute name="style"> - <xsl:value-of select="@style" /> - </xsl:attribute> - <xsl:attribute name="id"> - <xsl:value-of select="@id" /> - </xsl:attribute> - <xsl:attribute name="vertex">1</xsl:attribute> - <xsl:attribute name="CellType">Pin</xsl:attribute> - <xsl:attribute name="ParentComponent"> - <xsl:value-of select="@parent" /> - </xsl:attribute> - <xsl:attribute name="sourceVertex">0</xsl:attribute> - <xsl:attribute name="targetVertex">0</xsl:attribute> - <xsl:attribute name="tarx">0</xsl:attribute> - <xsl:attribute name="tary">0</xsl:attribute> - <xsl:apply-templates select="node()"/> - <Object display_parameter="" as="displayProperties"/> - <Object as="parameter_values"/> - </xsl:element> - </xsl:template> |