Skip to content

Commit

Permalink
initialize the variables outside the mxCell element
Browse files Browse the repository at this point in the history
  • Loading branch information
sunilshetye committed Jul 11, 2024
1 parent 869aa1b commit e8fcb47
Show file tree
Hide file tree
Showing 232 changed files with 1,625 additions and 1,625 deletions.
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/ABS_VALUE.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'ABS_VALUE']">
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
26 changes: 13 additions & 13 deletions blocks/xcos2xml/blocks/AFFICH_m.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<xsl:template match="*[@interfaceFunctionName = 'AFFICH_m']">
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="value" select="(*[@as='exprs']/data[7]/@value)" />
<xsl:variable name="controlPorts">
<xsl:choose>
<xsl:when test="$value = 0">
<xsl:text>1</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,19 +23,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="value" select="(*[@as='exprs']/data[7]/@value)" />
<xsl:variable name="controlPorts">
<xsl:choose>
<xsl:when test="$value = 0">
<xsl:text>1</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/ANDBLK.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'ANDBLK']">
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">2</xsl:variable>
<xsl:variable name="commandPorts">1</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">2</xsl:variable>
<xsl:variable name="commandPorts">1</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/ANDLOG_f.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'ANDLOG_f']">
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">2</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">2</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
16 changes: 8 additions & 8 deletions blocks/xcos2xml/blocks/AUTOMAT.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<xsl:template match="*[@interfaceFunctionName = 'AUTOMAT']">
<xsl:variable name="explicitInputPorts">
<xsl:value-of select="(*[@as='exprs']/data/@value)"/>
</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">2</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">1</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,14 +18,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">
<xsl:value-of select="(*[@as='exprs']/data/@value)"/>
</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">2</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">1</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BACKLASH.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BACKLASH']">
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BARXY.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BARXY']">
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
20 changes: 10 additions & 10 deletions blocks/xcos2xml/blocks/BIGSOM_f.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<xsl:template match="*[@interfaceFunctionName = 'BIGSOM_f']">
<xsl:variable name="explicitInputPorts">
<xsl:variable name="value" select="(*[@as='exprs']/data/@value)" />
<xsl:variable name="count" select="string-length($value) - string-length(translate($value, ';,', '')) + 1" />
<xsl:value-of select="$count" />
</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,16 +20,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">
<xsl:variable name="value" select="(*[@as='exprs']/data/@value)" />
<xsl:variable name="count" select="string-length($value) - string-length(translate($value, ';,', '')) + 1" />
<xsl:value-of select="$count" />
</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BITCLEAR.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BITCLEAR']">
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BITSET.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BITSET']">
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">1</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BOUNCE.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BOUNCE']">
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">2</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">2</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BOUNCEXY.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BOUNCEXY']">
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/BPLATFORM.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'BPLATFORM']">
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">2</xsl:variable>
<xsl:variable name="implicitInputPorts">0</xsl:variable>
<xsl:variable name="explicitOutputPorts">0</xsl:variable>
<xsl:variable name="implicitOutputPorts">0</xsl:variable>
<xsl:variable name="controlPorts">1</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
12 changes: 6 additions & 6 deletions blocks/xcos2xml/blocks/Bache.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<xsl:template match="*[@interfaceFunctionName = 'Bache']">
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">2</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">2</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
<xsl:value-of select="@style" />
Expand All @@ -10,12 +16,6 @@
<xsl:attribute name="connectable">0</xsl:attribute>
<xsl:attribute name="CellType">Component</xsl:attribute>
<xsl:attribute name="blockprefix">XCOS</xsl:attribute>
<xsl:variable name="explicitInputPorts">0</xsl:variable>
<xsl:variable name="implicitInputPorts">2</xsl:variable>
<xsl:variable name="explicitOutputPorts">1</xsl:variable>
<xsl:variable name="implicitOutputPorts">2</xsl:variable>
<xsl:variable name="controlPorts">0</xsl:variable>
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:attribute name="explicitInputPorts">
<xsl:value-of select="$explicitInputPorts" />
</xsl:attribute>
Expand Down
Loading

0 comments on commit e8fcb47

Please sign in to comment.