summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuchita Lad2024-05-17 11:46:29 +0530
committerSuchita Lad2024-05-17 11:46:29 +0530
commite562bf7d3358919c4df0102b945dbdb1f2aaf2a7 (patch)
tree0dbfb89a7185abb012255f2df086184a2dc1db1a
parent34a47badf4f82a6572b0e4ca42a7edc74d2bcd33 (diff)
downloadCommon-Interface-Project-e562bf7d3358919c4df0102b945dbdb1f2aaf2a7.tar.gz
Common-Interface-Project-e562bf7d3358919c4df0102b945dbdb1f2aaf2a7.tar.bz2
Common-Interface-Project-e562bf7d3358919c4df0102b945dbdb1f2aaf2a7.zip
Split xsl into multiple files
-rw-r--r--.gitignore1
-rw-r--r--blocks/Makefile15
-rw-r--r--blocks/eda-frontend/src/static/xcos2xml.xsl140
-rw-r--r--blocks/xcos2xml/blocks/ANDBLK.xsl31
-rw-r--r--blocks/xcos2xml/blocks/ANDLOG_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/CCS.xsl31
-rw-r--r--blocks/xcos2xml/blocks/CLINDUMMY_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/CLKSOMV_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/COSBLK_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/CVS.xsl31
-rw-r--r--blocks/xcos2xml/blocks/CurrentSensor.xsl31
-rw-r--r--blocks/xcos2xml/blocks/DERIV.xsl31
-rw-r--r--blocks/xcos2xml/blocks/DFLIPFLOP.xsl31
-rw-r--r--blocks/xcos2xml/blocks/DLATCH.xsl31
-rw-r--r--blocks/xcos2xml/blocks/Extract_Activation.xsl31
-rw-r--r--blocks/xcos2xml/blocks/Flowmeter.xsl31
-rw-r--r--blocks/xcos2xml/blocks/Ground.xsl31
-rw-r--r--blocks/xcos2xml/blocks/INVBLK.xsl31
-rw-r--r--blocks/xcos2xml/blocks/MATZCONJ.xsl31
-rw-r--r--blocks/xcos2xml/blocks/MAX_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/MIN_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/NEGTOPOS_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/OpAmp.xsl31
-rw-r--r--blocks/xcos2xml/blocks/POSTONEG_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/PROD_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/PotentialSensor.xsl31
-rw-r--r--blocks/xcos2xml/blocks/SAWTOOTH_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/SELF_SWITCH.xsl31
-rw-r--r--blocks/xcos2xml/blocks/SINBLK_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/SOM_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/SUM_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/TANBLK_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/TEXT_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/TIME_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/TRASH_f.xsl31
-rw-r--r--blocks/xcos2xml/blocks/VariableResistor.xsl31
-rw-r--r--blocks/xcos2xml/blocks/VirtualCLK0.xsl31
-rw-r--r--blocks/xcos2xml/blocks/VoltageSensor.xsl31
-rw-r--r--blocks/xcos2xml/foot.xsl6
-rw-r--r--blocks/xcos2xml/head.xsl50
40 files changed, 1156 insertions, 141 deletions
diff --git a/.gitignore b/.gitignore
index 668b5ef3..f6e0787b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ blocks/*.xml
blocks/xcosblocks.py
blocks/Xcos/xcosblocks.py
blocks/blocks/xcosblocks/xcosblocks.py
+blocks/eda-frontend/src/static/xcos2xml.xsl
diff --git a/blocks/Makefile b/blocks/Makefile
index d93572a0..da7d54f7 100644
--- a/blocks/Makefile
+++ b/blocks/Makefile
@@ -7,11 +7,18 @@ SRCFILES += $(sort $(wildcard Xcos/blocks/*.py))
SRCFILES += $(sort $(wildcard Xcos/ports/*.py))
SRCFILES += $(sort $(wildcard Xcos/links/*.py))
+XCOS2XMLFILES := $(sort $(wildcard xcos2xml/head.xsl))
+XCOS2XMLFILES += $(sort $(wildcard xcos2xml/blocks/*.xsl))
+#XCOS2XMLFILES += $(sort $(wildcard xcos2xml/ports/*.xsl))
+#XCOS2XMLFILES += $(sort $(wildcard xcos2xml/links/*.xsl))
+XCOS2XMLFILES += $(sort $(wildcard xcos2xml/foot.xsl))
+
IMPORT := Xcos/xcosblocks.py
TARGET := xcosblocks.py
TARGET2 := $(BLOCKDIR)/$(TARGET)
+TARGET3 := eda-frontend/src/static/xcos2xml.xsl
-all : $(IMPORT) $(TARGET) $(TARGET2)
+all : $(IMPORT) $(TARGET) $(TARGET2) $(TARGET3)
$(IMPORT) : $(SRCFILES)
@echo Making $@ ...
@@ -47,3 +54,9 @@ flake8 : $(TARGET)
$(TARGET2) : .srcflake8
cp -f $(TARGET) $@
+
+$(TARGET3) : $(XCOS2XMLFILES)
+ @echo Making $@ ...
+ @for f in $^; do \
+ cat "$$f"; \
+ done > $@
diff --git a/blocks/eda-frontend/src/static/xcos2xml.xsl b/blocks/eda-frontend/src/static/xcos2xml.xsl
deleted file mode 100644
index 9771aa44..00000000
--- a/blocks/eda-frontend/src/static/xcos2xml.xsl
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" indent="no" />
- <xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="comment()"/>
- <xsl:template match="XcosDiagram">
- <xsl:apply-templates select="node()"/>
- </xsl:template>
- <xsl:template match="mxGraphModel">
- <xsl:copy>
- <xsl:apply-templates select="@*[name(.)!='as']"/>
- <xsl:apply-templates select="node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="mxCell[position()=1]">
- <xsl:copy>
- <xsl:attribute name="id">
- <xsl:value-of select="@id" />
- </xsl:attribute>
- <xsl:attribute name="appname">Xcos</xsl:attribute>
- <xsl:attribute name="description"></xsl:attribute>
- <xsl:attribute name="CellType">Unknown</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>
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- <xsl:apply-templates select="node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="mxCell[position()=2]">
- <xsl:copy>
- <xsl:attribute name="id">
- <xsl:value-of select="@id" />
- </xsl:attribute>
- <xsl:attribute name="CellType">Unknown</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>
- <Object as="parameter_values"/>
- <Object as="displayProperties"/>
- <xsl:apply-templates select="node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="BasicBlock[@interfaceFunctionName = 'STEP_FUNCTION']">
- <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="connectable">0</xsl:attribute>
- <xsl:attribute name="CellType">Component</xsl:attribute>
- <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
- <xsl:attribute name="explicitInputPorts">0</xsl:attribute>
- <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
- <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
- <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
- <xsl:attribute name="controlPorts">0</xsl:attribute>
- <xsl:attribute name="commandPorts">0</xsl:attribute>
- <xsl:attribute name="simulationFunction">
- <xsl:value-of select="@simulationFunctionName" />
- </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 p000_value="1" p001_value="0" p002_value="1" as="parameter_values"/>
-
- </xsl:element>
- </xsl:template>
- <xsl:template name="mxGeometry" match="mxGeometry">
- <xsl:copy>
- <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="width">
- <xsl:value-of select="@width" />
- </xsl:attribute>
- <xsl:attribute name="height">
- <xsl:value-of select="@height" />
- </xsl:attribute>
- <xsl:attribute name="as">
- <xsl:value-of select="@as" />
- </xsl:attribute>
- <xsl:apply-templates />
- </xsl:copy>
- </xsl:template>
-<!-- for no param -->
- <xsl:template match="BasicBlock[@interfaceFunctionName = 'DERIV' or @interfaceFunctionName = 'GAINBLK_f']">
- <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="connectable">0</xsl:attribute>
- <xsl:attribute name="CellType">Component</xsl:attribute>
- <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
- <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
- <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
- <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
- <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
- <xsl:attribute name="controlPorts">0</xsl:attribute>
- <xsl:attribute name="commandPorts">0</xsl:attribute>
- <xsl:attribute name="simulationFunction">
- <xsl:value-of select="@simulationFunctionName" />
- </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>
-
- <xsl:template match="Array" />
- <xsl:template match="ScilabDouble" />
- <xsl:template match="ScilabInteger" />
- <xsl:template match="SuperBlockDiagram" />
- <xsl:template match="ScilabString" />
-</xsl:stylesheet>
diff --git a/blocks/xcos2xml/blocks/ANDBLK.xsl b/blocks/xcos2xml/blocks/ANDBLK.xsl
new file mode 100644
index 00000000..d52adbf2
--- /dev/null
+++ b/blocks/xcos2xml/blocks/ANDBLK.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'ANDBLK']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/ANDLOG_f.xsl b/blocks/xcos2xml/blocks/ANDLOG_f.xsl
new file mode 100644
index 00000000..73f2bcef
--- /dev/null
+++ b/blocks/xcos2xml/blocks/ANDLOG_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'ANDLOG_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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> \ No newline at end of file
diff --git a/blocks/xcos2xml/blocks/CCS.xsl b/blocks/xcos2xml/blocks/CCS.xsl
new file mode 100644
index 00000000..e9ca47e9
--- /dev/null
+++ b/blocks/xcos2xml/blocks/CCS.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'CCS']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/CLINDUMMY_f.xsl b/blocks/xcos2xml/blocks/CLINDUMMY_f.xsl
new file mode 100644
index 00000000..eaa2b796
--- /dev/null
+++ b/blocks/xcos2xml/blocks/CLINDUMMY_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'CLINDUMMY_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/CLKSOMV_f.xsl b/blocks/xcos2xml/blocks/CLKSOMV_f.xsl
new file mode 100644
index 00000000..33f29232
--- /dev/null
+++ b/blocks/xcos2xml/blocks/CLKSOMV_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'CLKSOMV_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/COSBLK_f.xsl b/blocks/xcos2xml/blocks/COSBLK_f.xsl
new file mode 100644
index 00000000..99a4b4d2
--- /dev/null
+++ b/blocks/xcos2xml/blocks/COSBLK_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'COSBLK_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/CVS.xsl b/blocks/xcos2xml/blocks/CVS.xsl
new file mode 100644
index 00000000..e49a8c8e
--- /dev/null
+++ b/blocks/xcos2xml/blocks/CVS.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'CVS']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/CurrentSensor.xsl b/blocks/xcos2xml/blocks/CurrentSensor.xsl
new file mode 100644
index 00000000..83172ca1
--- /dev/null
+++ b/blocks/xcos2xml/blocks/CurrentSensor.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'CurrentSensor']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/DERIV.xsl b/blocks/xcos2xml/blocks/DERIV.xsl
new file mode 100644
index 00000000..b5d392f9
--- /dev/null
+++ b/blocks/xcos2xml/blocks/DERIV.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'DERIV']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/DFLIPFLOP.xsl b/blocks/xcos2xml/blocks/DFLIPFLOP.xsl
new file mode 100644
index 00000000..6a6f64b4
--- /dev/null
+++ b/blocks/xcos2xml/blocks/DFLIPFLOP.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'DFLIPFLOP']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/DLATCH.xsl b/blocks/xcos2xml/blocks/DLATCH.xsl
new file mode 100644
index 00000000..f8cc86e9
--- /dev/null
+++ b/blocks/xcos2xml/blocks/DLATCH.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'DLATCH']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/Extract_Activation.xsl b/blocks/xcos2xml/blocks/Extract_Activation.xsl
new file mode 100644
index 00000000..b29d5bb8
--- /dev/null
+++ b/blocks/xcos2xml/blocks/Extract_Activation.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'Extract_Activation']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/Flowmeter.xsl b/blocks/xcos2xml/blocks/Flowmeter.xsl
new file mode 100644
index 00000000..ff2aed15
--- /dev/null
+++ b/blocks/xcos2xml/blocks/Flowmeter.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'Flowmeter']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/Ground.xsl b/blocks/xcos2xml/blocks/Ground.xsl
new file mode 100644
index 00000000..93a780c3
--- /dev/null
+++ b/blocks/xcos2xml/blocks/Ground.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'Ground']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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> \ No newline at end of file
diff --git a/blocks/xcos2xml/blocks/INVBLK.xsl b/blocks/xcos2xml/blocks/INVBLK.xsl
new file mode 100644
index 00000000..107d9544
--- /dev/null
+++ b/blocks/xcos2xml/blocks/INVBLK.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'INVBLK']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/MATZCONJ.xsl b/blocks/xcos2xml/blocks/MATZCONJ.xsl
new file mode 100644
index 00000000..8b5ffdeb
--- /dev/null
+++ b/blocks/xcos2xml/blocks/MATZCONJ.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'MATZCONJ']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/MAX_f.xsl b/blocks/xcos2xml/blocks/MAX_f.xsl
new file mode 100644
index 00000000..85b555f3
--- /dev/null
+++ b/blocks/xcos2xml/blocks/MAX_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'MAX_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/MIN_f.xsl b/blocks/xcos2xml/blocks/MIN_f.xsl
new file mode 100644
index 00000000..5a5fdf73
--- /dev/null
+++ b/blocks/xcos2xml/blocks/MIN_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'MIN_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/NEGTOPOS_f.xsl b/blocks/xcos2xml/blocks/NEGTOPOS_f.xsl
new file mode 100644
index 00000000..4860d39e
--- /dev/null
+++ b/blocks/xcos2xml/blocks/NEGTOPOS_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'NEGTOPOS_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/OpAmp.xsl b/blocks/xcos2xml/blocks/OpAmp.xsl
new file mode 100644
index 00000000..c3f9c7a8
--- /dev/null
+++ b/blocks/xcos2xml/blocks/OpAmp.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'OpAmp']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/POSTONEG_f.xsl b/blocks/xcos2xml/blocks/POSTONEG_f.xsl
new file mode 100644
index 00000000..7de691db
--- /dev/null
+++ b/blocks/xcos2xml/blocks/POSTONEG_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'POSTONEG_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/PROD_f.xsl b/blocks/xcos2xml/blocks/PROD_f.xsl
new file mode 100644
index 00000000..6c804d88
--- /dev/null
+++ b/blocks/xcos2xml/blocks/PROD_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'PROD_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/PotentialSensor.xsl b/blocks/xcos2xml/blocks/PotentialSensor.xsl
new file mode 100644
index 00000000..e97cfd1e
--- /dev/null
+++ b/blocks/xcos2xml/blocks/PotentialSensor.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'PotentialSensor']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/SAWTOOTH_f.xsl b/blocks/xcos2xml/blocks/SAWTOOTH_f.xsl
new file mode 100644
index 00000000..62d8ad3c
--- /dev/null
+++ b/blocks/xcos2xml/blocks/SAWTOOTH_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'SAWTOOTH_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/SELF_SWITCH.xsl b/blocks/xcos2xml/blocks/SELF_SWITCH.xsl
new file mode 100644
index 00000000..62d8ad3c
--- /dev/null
+++ b/blocks/xcos2xml/blocks/SELF_SWITCH.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'SAWTOOTH_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/SINBLK_f.xsl b/blocks/xcos2xml/blocks/SINBLK_f.xsl
new file mode 100644
index 00000000..1ab14dde
--- /dev/null
+++ b/blocks/xcos2xml/blocks/SINBLK_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'SINBLK_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/SOM_f.xsl b/blocks/xcos2xml/blocks/SOM_f.xsl
new file mode 100644
index 00000000..40a9f834
--- /dev/null
+++ b/blocks/xcos2xml/blocks/SOM_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'SOM_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/SUM_f.xsl b/blocks/xcos2xml/blocks/SUM_f.xsl
new file mode 100644
index 00000000..09afed88
--- /dev/null
+++ b/blocks/xcos2xml/blocks/SUM_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'SUM_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/TANBLK_f.xsl b/blocks/xcos2xml/blocks/TANBLK_f.xsl
new file mode 100644
index 00000000..9f457d94
--- /dev/null
+++ b/blocks/xcos2xml/blocks/TANBLK_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'TANBLK_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/TEXT_f.xsl b/blocks/xcos2xml/blocks/TEXT_f.xsl
new file mode 100644
index 00000000..53fb9d06
--- /dev/null
+++ b/blocks/xcos2xml/blocks/TEXT_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'TEXT_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/TIME_f.xsl b/blocks/xcos2xml/blocks/TIME_f.xsl
new file mode 100644
index 00000000..2fdbe06b
--- /dev/null
+++ b/blocks/xcos2xml/blocks/TIME_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'TIME_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/TRASH_f.xsl b/blocks/xcos2xml/blocks/TRASH_f.xsl
new file mode 100644
index 00000000..26c768b2
--- /dev/null
+++ b/blocks/xcos2xml/blocks/TRASH_f.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'TRASH_f']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/VariableResistor.xsl b/blocks/xcos2xml/blocks/VariableResistor.xsl
new file mode 100644
index 00000000..a7b2a937
--- /dev/null
+++ b/blocks/xcos2xml/blocks/VariableResistor.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'VariableResistor']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/VirtualCLK0.xsl b/blocks/xcos2xml/blocks/VirtualCLK0.xsl
new file mode 100644
index 00000000..49d106d6
--- /dev/null
+++ b/blocks/xcos2xml/blocks/VirtualCLK0.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'VirtualCLK0']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/blocks/VoltageSensor.xsl b/blocks/xcos2xml/blocks/VoltageSensor.xsl
new file mode 100644
index 00000000..3124fc1c
--- /dev/null
+++ b/blocks/xcos2xml/blocks/VoltageSensor.xsl
@@ -0,0 +1,31 @@
+ <xsl:template match="BasicBlock[@interfaceFunctionName = 'VoltageSensor']">
+ <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="connectable">0</xsl:attribute>
+ <xsl:attribute name="CellType">Component</xsl:attribute>
+ <xsl:attribute name="blockprefix">XCOS</xsl:attribute>
+ <xsl:attribute name="explicitInputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitInputPorts">0</xsl:attribute>
+ <xsl:attribute name="explicitOutputPorts">1</xsl:attribute>
+ <xsl:attribute name="implicitOutputPorts">0</xsl:attribute>
+ <xsl:attribute name="controlPorts">0</xsl:attribute>
+ <xsl:attribute name="commandPorts">0</xsl:attribute>
+ <xsl:attribute name="simulationFunction">
+ <xsl:value-of select="@simulationFunctionName" />
+ </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/foot.xsl b/blocks/xcos2xml/foot.xsl
new file mode 100644
index 00000000..53c781e1
--- /dev/null
+++ b/blocks/xcos2xml/foot.xsl
@@ -0,0 +1,6 @@
+ <xsl:template match="Array" />
+ <xsl:template match="ScilabDouble" />
+ <xsl:template match="ScilabInteger" />
+ <xsl:template match="SuperBlockDiagram" />
+ <xsl:template match="ScilabString" />
+</xsl:stylesheet>
diff --git a/blocks/xcos2xml/head.xsl b/blocks/xcos2xml/head.xsl
new file mode 100644
index 00000000..bc58b573
--- /dev/null
+++ b/blocks/xcos2xml/head.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" indent="no" />
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="comment()"/>
+ <xsl:template match="XcosDiagram">
+ <xsl:apply-templates select="node()"/>
+ </xsl:template>
+ <xsl:template match="mxGraphModel">
+ <xsl:copy>
+ <xsl:apply-templates select="@*[name(.)!='as']"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="mxCell[position()=1]">
+ <xsl:copy>
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id" />
+ </xsl:attribute>
+ <xsl:attribute name="appname">Xcos</xsl:attribute>
+ <xsl:attribute name="description"></xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</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>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="mxCell[position()=2]">
+ <xsl:copy>
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id" />
+ </xsl:attribute>
+ <xsl:attribute name="CellType">Unknown</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>
+ <Object as="parameter_values"/>
+ <Object as="displayProperties"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>