Skip to content

Commit

Permalink
Merge pull request #453 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 1, 2025
2 parents 7f81651 + cb149ae commit 12cee5f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 16 deletions.
30 changes: 22 additions & 8 deletions lib/isodoc/ieee/ieee.amendment.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15212,16 +15212,30 @@

<xsl:template match="*[local-name() = 'fmt-name']"/>
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:element>
<xsl:choose>
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:when>
<xsl:otherwise>
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:element>
<xsl:choose>
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:when>
<xsl:otherwise>
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="*[local-name() = 'fmt-preferred']"/>
Expand Down
30 changes: 22 additions & 8 deletions lib/isodoc/ieee/ieee.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15212,16 +15212,30 @@

<xsl:template match="*[local-name() = 'fmt-name']"/>
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:element>
<xsl:choose>
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:when>
<xsl:otherwise>
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:element>
<xsl:choose>
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:when>
<xsl:otherwise>
<xsl:element name="name" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="*[local-name() = 'fmt-preferred']"/>
Expand Down

0 comments on commit 12cee5f

Please sign in to comment.