diff options
author | Suchita Lad | 2025-07-01 17:29:37 +0530 |
---|---|---|
committer | Suchita Lad | 2025-07-01 17:29:37 +0530 |
commit | 7d5989c790c432698a58457a3a3d554dad15dae5 (patch) | |
tree | 49c888173905a5b58967f6ef9788b94378bc2d11 | |
parent | 0a7bf48f799e736cd08c4e5957320b279963ef8e (diff) | |
download | Common-Interface-Project-7d5989c790c432698a58457a3a3d554dad15dae5.tar.gz Common-Interface-Project-7d5989c790c432698a58457a3a3d554dad15dae5.tar.bz2 Common-Interface-Project-7d5989c790c432698a58457a3a3d554dad15dae5.zip |
Added generate_block template
-rw-r--r-- | blocks/xcos2xml/head.xsl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/blocks/xcos2xml/head.xsl b/blocks/xcos2xml/head.xsl index 5c28f899..22fb992c 100644 --- a/blocks/xcos2xml/head.xsl +++ b/blocks/xcos2xml/head.xsl @@ -288,6 +288,8 @@ <xsl:param name="blockId"/> <xsl:param name="style"/> <xsl:param name="simulationFunction"/> + <xsl:param name="display_parameter"/> + <xsl:param name="data"/> <xsl:element name="mxCell"> <xsl:attribute name="style"><xsl:value-of select="$style"/></xsl:attribute> @@ -311,13 +313,15 @@ <xsl:apply-templates select="mxGeometry"/> <Object as="displayProperties"> <xsl:attribute name="display_parameter"> - <xsl:value-of select="*[@as='exprs']/data/@value"/> + <xsl:value-of select="$display_parameter"/> </xsl:attribute> </Object> <Object as="parameter_values"> - <xsl:attribute name="p000_value"> - <xsl:value-of select="*[@as='exprs']/data/@value"/> - </xsl:attribute> + <xsl:for-each select="$data"> + <xsl:attribute name="{concat('p', format-number(position() - 1, '000'), '_value')}"> + <xsl:value-of select="@value" /> + </xsl:attribute> + </xsl:for-each> </Object> </xsl:element> |