Skip to content

Commit

Permalink
Plateau xslt updated for metanorma/mn-samples-plateau#349
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Feb 19, 2025
1 parent ece0687 commit 36aa08f
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions xslt_src/plateau.international-standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -205,34 +205,41 @@
<xsl:apply-templates mode="update_xml_pres"/>
</xsl:variable>

<!-- <xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_pres.xml">
<xsl:copy-of select="$updated_xml_pres"/>
</redirect:write>
<xsl:message>end redirect</xsl:message> -->
<xsl:if test="$debug = 'true'">
<xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_pres.xml">
<xsl:copy-of select="$updated_xml_pres"/>
</redirect:write>
<xsl:message>end redirect</xsl:message>
</xsl:if>

<xsl:variable name="updated_xml_step1">
<!-- <xsl:apply-templates mode="update_xml_step1"/> -->
<xsl:apply-templates select="xalan:nodeset($updated_xml_pres)" mode="update_xml_step1"/>
</xsl:variable>
<!-- DEBUG: updated_xml_step1=<xsl:copy-of select="$updated_xml_step1"/> -->
<!-- <xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_step1.xml">
<xsl:copy-of select="$updated_xml_step1"/>
</redirect:write>
<xsl:message>end redirect</xsl:message> -->
<xsl:if test="$debug = 'true'">
<xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_step1.xml">
<xsl:copy-of select="$updated_xml_step1"/>
</redirect:write>
<xsl:message>end redirect</xsl:message>
</xsl:if>


<xsl:variable name="updated_xml_step2_">
<xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
</xsl:variable>
<xsl:variable name="updated_xml_step2" select="xalan:nodeset($updated_xml_step2_)"/>
<!-- DEBUG: updated_xml_step2=<xsl:copy-of select="$updated_xml_step2"/> -->
<!-- <xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_step2.xml">
<xsl:copy-of select="$updated_xml_step2"/>
</redirect:write>
<xsl:message>end redirect</xsl:message> -->

<xsl:if test="$debug = 'true'">
<xsl:message>start redirect</xsl:message>
<redirect:write file="update_xml_step2.xml">
<xsl:copy-of select="$updated_xml_step2"/>
</redirect:write>
<xsl:message>end redirect</xsl:message>
</xsl:if>


<xsl:for-each select="$updated_xml_step2//plateau:metanorma">
Expand Down Expand Up @@ -1757,9 +1764,17 @@
<xsl:template match="plateau:table/plateau:p[@class = 'ListTitle']" priority="2" mode="update_xml_step1"/>

<!-- added to fix conflict with previous update in update_xml_pres -->
<xsl:template match="*[local-name() = 'preferred'] | *[local-name() = 'admitted'] | *[local-name() = 'deprecates'] |
*[local-name() = 'definition'] | *[local-name() = 'termsource'] | *[local-name() = 'termsource'] |
*[local-name() = 'term'][@unnumbered = 'true']" mode="update_xml_step1" priority="2">
<xsl:template match="*[local-name() = 'preferred'] |
*[local-name() = 'admitted'] |
*[local-name() = 'deprecates'] |
*[local-name() = 'definition'] |
*[local-name() = 'termsource'] |
*[local-name() = 'term'][@unnumbered = 'true'] |
*[local-name() = 'identifier'] |
*[local-name() = 'eref'] |
*[local-name() = 'xref'] |
*[local-name() = 'link'] |
*[local-name() = 'origin']" mode="update_xml_step1" priority="2">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
</xsl:copy>
Expand Down

0 comments on commit 36aa08f

Please sign in to comment.