Skip to content

Commit

Permalink
Merge pull request #811 from metanorma/update_requirement
Browse files Browse the repository at this point in the history
common.xsl updated for requirement elements, metanorma/mn-requirement…
  • Loading branch information
opoudjis authored Feb 11, 2025
2 parents 256fd29 + a77962c commit 512b2ed
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions xslt_src/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19892,6 +19892,45 @@
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>

<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:template>

<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:template>

<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] |
*[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] |
*[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_step1"/>

<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] |
*[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] |
*[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_pres"/>

<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:template>
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:template>

<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
<xsl:element name="identifier" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:element>
</xsl:template>
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
<xsl:element name="identifier" namespace="{$namespace_full}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:element>
</xsl:template>


<!-- END: update new Presentation XML -->

<!-- =========================================================================== -->
Expand Down

0 comments on commit 512b2ed

Please sign in to comment.