Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused templates in converter generators #77

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions src/converter-gen/json-to-xml/produce-json-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

<xsl:output indent="yes"/>

<xsl:mode name="make-step" on-no-match="fail"><!-- Obsolete mode --></xsl:mode>

<xsl:namespace-alias stylesheet-prefix="XSLT" result-prefix="xsl"/>

<!-- $px is the prefix to be used on names in the XPath JSON -->
Expand Down Expand Up @@ -58,10 +60,7 @@
</XSLT:if>
</xsl:for-each>
</xsl:template>

<!-- Overriding the imported template for casting prose elements (wrt namespace) since we do not need it -->
<xsl:template name="cast-prose-template"/>


<!-- Overriding interface template -->
<xsl:template match="*" mode="make-match" as="xs:string">
<xsl:variable name="matching-xml">
Expand All @@ -76,15 +75,7 @@
<!--<xsl:sequence select="m:jsonize-path($matching-xml)"/>-->

</xsl:template>

<!-- Overriding interface template -->
<xsl:template match="*" mode="make-step" as="xs:string">
<xsl:variable name="step-xml">
<xsl:apply-templates select="." mode="make-xml-step"/>
</xsl:variable>
<xsl:sequence select="m:jsonize-path($step-xml)"/>
</xsl:template>


<!-- Overriding interface template in mode 'make-pull' -->
<xsl:template match="*" mode="make-pull">
<xsl:apply-templates select="." mode="make-json-pull"/>
Expand Down
7 changes: 2 additions & 5 deletions src/converter-gen/xml-to-json/produce-xml-converter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

<xsl:namespace-alias stylesheet-prefix="XSLT" result-prefix="xsl"/>

<xsl:mode name="make-step" on-no-match="fail"><!-- Obsolete mode --></xsl:mode>

<xsl:variable name="source-namespace" select="string(/*/@namespace)"/>
<xsl:variable name="source-prefix" select="string(/*/@prefix)"/>

Expand All @@ -26,11 +28,6 @@
</xsl:value-of>
</xsl:template>

<!-- Interface template for override -->
<xsl:template match="*" mode="make-step" as="xs:string">
<xsl:apply-templates select="." mode="make-xml-step"/>
</xsl:template>

<!-- Interface template for override -->
<xsl:template match="*" mode="make-pull">
<xsl:apply-templates select="." mode="make-xml-pull"/>
Expand Down
Loading