Start on XSY import module.

This commit is contained in:
2026-01-26 20:16:31 -06:00
parent b68390a9a0
commit 386262da3d
7 changed files with 118976 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Flatten a ControlExpert XSY file so that it can be read by pandas.
Copyright 2026 Prime Controls. All rights reserved.
-->
<xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/VariablesExchangeFile">
<xsl:copy>
<xsl:apply-templates select="DDTSource"/>
</xsl:copy>
</xsl:template>
<xsl:template match="DDTSource">
<xsl:copy>
<xsl:apply-templates select="structure/variables"/>
</xsl:copy>
</xsl:template>
<xsl:template match="structure/variables">
<!-- <xsl:copy> -->
<name><xsl:value-of select="../../@DDTName"/>.<xsl:value-of select="@name"/></name>
<type><xsl:value-of select="@typeName"/></type>
<bitrank><xsl:value-of select="attribute/@ExtractBit"/></bitrank>
<comment><xsl:value-of select="../../comment"/>: <xsl:value-of select="comment"/></comment>
<!-- </xsl:copy> -->
</xsl:template>
</xsl:stylesheet>