Reorganize schema file and assets folders.
This commit is contained in:
1070
extensions/controlexpert/assets/builtins.xsy
Normal file
1070
extensions/controlexpert/assets/builtins.xsy
Normal file
File diff suppressed because it is too large
Load Diff
41
extensions/controlexpert/assets/flatten_datablock.xslt
Normal file
41
extensions/controlexpert/assets/flatten_datablock.xslt
Normal file
@@ -0,0 +1,41 @@
|
||||
<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 encoding="utf8" method="xml" omit-xml-declaration="no" indent="yes" />
|
||||
|
||||
<xsl:template match="/VariablesExchangeFile">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="dataBlock" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dataBlock">
|
||||
<xsl:apply-templates select="variables" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="variables">
|
||||
<xsl:copy>
|
||||
<tagname>
|
||||
<xsl:value-of select="@name" />
|
||||
</tagname>
|
||||
<type>
|
||||
<xsl:value-of select="@typeName" />
|
||||
</type>
|
||||
<address>
|
||||
<xsl:value-of select="@topologicalAddress" />
|
||||
</address>
|
||||
<comment>
|
||||
<xsl:value-of select="comment" />
|
||||
</comment>
|
||||
<parent />
|
||||
<bitrank />
|
||||
<save>
|
||||
<xsl:value-of select="attribute/@Save" />
|
||||
</save>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
58
extensions/controlexpert/assets/flatten_ddtsource.xslt
Normal file
58
extensions/controlexpert/assets/flatten_ddtsource.xslt
Normal 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>
|
||||
@@ -1,7 +1,5 @@
|
||||
$schema: "\
|
||||
https://primegit.primecontrols-dev.com/j.lucas/AuDaGe/raw/branch/\
|
||||
main/src/AuDaGe/assets/schema.yaml
|
||||
"
|
||||
$schema: >-
|
||||
https://primegit.primecontrols-dev.com/j.lucas/AuDaGe/raw/branch/main/extensions/schema.yaml
|
||||
format:
|
||||
name: xsy
|
||||
import:
|
||||
|
||||
Reference in New Issue
Block a user