Reorganize schema file and assets folders.

This commit is contained in:
2026-11-06 13:16:43 -06:00
parent 4418633724
commit e5c7101627
30 changed files with 33 additions and 62 deletions

View File

@@ -0,0 +1,58 @@
<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:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:output encoding="utf8" method="xml" omit-xml-declaration="no" indent="yes" />
<xsl:template match="/VariablesExchangeFile">
<xsl:copy>
<xsl:apply-templates select="DDTSource" />
<xsl:apply-templates select="FBSource" />
</xsl:copy>
</xsl:template>
<xsl:template match="DDTSource">
<xsl:apply-templates select="structure/variables" />
</xsl:template>
<xsl:template match="structure/variables">
<xsl:copy>
<tagname>
<xsl:value-of select="@name" />
</tagname>
<type>
<xsl:value-of select="translate(@typeName, $lowercase, $uppercase)" />
</type>
<address />
<comment><xsl:value-of select="../../comment" />: <xsl:value-of select="comment" /></comment>
<parent>
<xsl:value-of select="translate(../../@DDTName, $lowercase, $uppercase)" />
</parent>
<bitrank>
<xsl:for-each select="attribute">
<xsl:if test="@name='ExtractBit'">
<xsl:value-of select="@value" />
</xsl:if>
</xsl:for-each>
</bitrank>
<save />
</xsl:copy>
</xsl:template>
<xsl:template match="FBSource">
<xsl:copy>
<name>NULL</name>
<parent>
<xsl:value-of select="translate(@nameOfFBType, $lowercase, $uppercase)" />
</parent>
<type>DFB</type>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>