Complete preliminary XSY reading code.

This commit is contained in:
2026-01-29 10:45:11 -06:00
parent d809d43823
commit d141543691
3 changed files with 72 additions and 45 deletions

View File

@@ -4,28 +4,46 @@
Copyright 2026 Prime Controls. All rights reserved.
-->
<xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:output encoding="utf8" method="xml" omit-xml-declaration="no" indent="yes"/>
<!-- <xsl:strip-space elements="*"/> -->
<xsl:template match="/VariablesExchangeFile">
<xsl:copy>
<xsl:apply-templates select="dataBlock"/>
<xsl:apply-templates select="DDTSource"/>
</xsl:copy>
</xsl:template>
<xsl:template match="dataBlock">
<xsl:apply-templates select="variables"/>
</xsl:template>
<xsl:template match="DDTSource">
<xsl:apply-templates select="structure/variables"/>
</xsl:template>
<xsl:template match="variables">
<xsl:copy>
<xsl:apply-templates select="structure/variables"/>
<name><xsl:value-of select="@name"/></name>
<parent/>
<type><xsl:value-of select="@typeName"/></type>
<address><xsl:value-of select="@topologicalAddress"/></address>
<bitrank/>
<save><xsl:value-of select="attribute/@Save"/></save>
<comment><xsl:value-of select="../../comment"/>: <xsl:value-of select="comment"/></comment>
</xsl:copy>
</xsl:template>
<xsl:template match="structure/variables">
<!-- <xsl:copy> -->
<name><xsl:value-of select="../../@DDTName"/>.<xsl:value-of select="@name"/></name>
<xsl:copy>
<name><xsl:value-of select="@name"/></name>
<parent><xsl:value-of select="../../@DDTName"/></parent>
<type><xsl:value-of select="@typeName"/></type>
<address/>
<bitrank><xsl:value-of select="attribute/@ExtractBit"/></bitrank>
<save/>
<comment><xsl:value-of select="../../comment"/>: <xsl:value-of select="comment"/></comment>
<!-- </xsl:copy> -->
</xsl:copy>
</xsl:template>
</xsl:stylesheet>