metanorma-nist 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -3601,11 +3601,14 @@
3601
3601
  </xsl:if>
3602
3602
  </xsl:template>
3603
3603
 
3604
- <xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'&#8232;'"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
3604
+ <xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'&#8232;'"/><xsl:attribute-set xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="link-style">
3605
+
3606
+
3607
+ </xsl:attribute-set><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
3605
3608
  <xsl:value-of select="."/>
3606
3609
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='br']">
3607
3610
  <xsl:value-of select="$linebreak"/>
3608
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="1">
3611
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
3609
3612
  <xsl:call-template name="add-zero-spaces"/>
3610
3613
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']">
3611
3614
 
@@ -3621,6 +3624,9 @@
3621
3624
 
3622
3625
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3623
3626
 
3627
+ <!-- <xsl:if test="$namespace = 'iso'">
3628
+ <fo:block space-before="6pt">&#xA0;</fo:block>
3629
+ </xsl:if> -->
3624
3630
 
3625
3631
  <xsl:choose>
3626
3632
  <xsl:when test="@unnumbered = 'true'"/>
@@ -3630,12 +3636,15 @@
3630
3636
 
3631
3637
  <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
3632
3638
 
3639
+
3640
+
3633
3641
  <xsl:attribute name="font-family">Arial</xsl:attribute>
3634
3642
  <xsl:attribute name="font-size">9pt</xsl:attribute>
3635
3643
 
3636
3644
 
3637
3645
 
3638
3646
 
3647
+
3639
3648
  <xsl:text>Table </xsl:text>
3640
3649
  <xsl:choose>
3641
3650
  <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
@@ -3645,6 +3654,8 @@
3645
3654
 
3646
3655
 
3647
3656
 
3657
+
3658
+
3648
3659
  <xsl:variable name="annex-id" select="ancestor::*[local-name()='annex']/@id"/>
3649
3660
  <xsl:number format="A-" count="*[local-name()='annex']"/>
3650
3661
  <xsl:number format="1" level="any" count="*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'][ancestor::*[local-name()='annex'][@id = $annex-id]]"/>
@@ -3654,10 +3665,11 @@
3654
3665
 
3655
3666
  </xsl:when>
3656
3667
  <xsl:otherwise>
3657
- <!-- <xsl:number format="1"/> -->
3658
- <xsl:number format="A." count="*[local-name()='annex']"/>
3659
- <!-- <xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/> -->
3660
- <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
3668
+
3669
+
3670
+ <xsl:number format="A." count="*[local-name()='annex']"/>
3671
+ <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
3672
+
3661
3673
  </xsl:otherwise>
3662
3674
  </xsl:choose>
3663
3675
  <xsl:if test="*[local-name()='name']">
@@ -3702,11 +3714,11 @@
3702
3714
  </xsl:call-template>
3703
3715
  </xsl:variable>
3704
3716
 
3705
- <xsl:variable name="colwidths2">
3717
+ <!-- <xsl:variable name="colwidths2">
3706
3718
  <xsl:call-template name="calculate-column-widths">
3707
3719
  <xsl:with-param name="cols-count" select="$cols-count"/>
3708
3720
  </xsl:call-template>
3709
- </xsl:variable>
3721
+ </xsl:variable> -->
3710
3722
 
3711
3723
  <!-- cols-count=<xsl:copy-of select="$cols-count"/>
3712
3724
  colwidthsNew=<xsl:copy-of select="$colwidths"/>
@@ -3727,7 +3739,11 @@
3727
3739
 
3728
3740
 
3729
3741
 
3730
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm">
3742
+
3743
+
3744
+ <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
3745
+
3746
+
3731
3747
 
3732
3748
 
3733
3749
 
@@ -3758,6 +3774,9 @@
3758
3774
  </xsl:for-each>
3759
3775
  <xsl:apply-templates/>
3760
3776
  </fo:table>
3777
+
3778
+
3779
+
3761
3780
  </fo:block-container>
3762
3781
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']" mode="process">
3763
3782
  <xsl:apply-templates/>
@@ -3811,9 +3830,13 @@
3811
3830
  </xsl:when>
3812
3831
  <xsl:otherwise>
3813
3832
  <xsl:for-each select="xalan:nodeset($table)//tr">
3833
+ <xsl:variable name="td_text">
3834
+ <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
3835
+ </xsl:variable>
3814
3836
  <xsl:variable name="words">
3815
3837
  <xsl:call-template name="tokenize">
3816
- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/>
3838
+ <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
3839
+ <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
3817
3840
  </xsl:call-template>
3818
3841
  </xsl:variable>
3819
3842
  <xsl:variable name="max_length">
@@ -3854,51 +3877,82 @@
3854
3877
  <xsl:with-param name="table" select="$table"/>
3855
3878
  </xsl:call-template>
3856
3879
  </xsl:if>
3880
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()" mode="td_text">
3881
+ <xsl:variable name="zero-space">​</xsl:variable>
3882
+ <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
3857
3883
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table2']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']" mode="process">
3858
- <!-- <fo:table-header font-weight="bold">
3859
- <xsl:apply-templates />
3860
- </fo:table-header> -->
3861
- <xsl:apply-templates/>
3884
+ <!-- font-weight="bold" -->
3885
+ <fo:table-header>
3886
+ <xsl:apply-templates/>
3887
+ </fo:table-header>
3862
3888
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']" mode="process">
3863
3889
  <xsl:apply-templates/>
3890
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="insertTableFooter">
3891
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3892
+ <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
3893
+
3894
+ <fo:table-footer>
3895
+
3896
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3897
+
3898
+ <!-- if there are note(s) or fn(s) then create footer row -->
3899
+ <xsl:if test="$isNoteOrFnExist = 'true'">
3900
+
3901
+ <xsl:variable name="cols-count">
3902
+ <xsl:choose>
3903
+ <xsl:when test="../*[local-name()='thead']">
3904
+ <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
3905
+ <xsl:call-template name="calculate-columns-numbers">
3906
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
3907
+ </xsl:call-template>
3908
+ </xsl:when>
3909
+ <xsl:otherwise>
3910
+ <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
3911
+ <xsl:call-template name="calculate-columns-numbers">
3912
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
3913
+ </xsl:call-template>
3914
+ </xsl:otherwise>
3915
+ </xsl:choose>
3916
+ </xsl:variable>
3917
+
3918
+ <fo:table-row>
3919
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3920
+
3921
+
3922
+
3923
+ <!-- fn will be processed inside 'note' processing -->
3924
+
3925
+
3926
+ <!-- except gb -->
3927
+
3928
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3929
+
3930
+
3931
+ <!-- horizontal row separator -->
3932
+
3933
+
3934
+ <!-- fn processing -->
3935
+ <xsl:call-template name="fn_display"/>
3936
+
3937
+ </fo:table-cell>
3938
+ </fo:table-row>
3939
+
3940
+ </xsl:if>
3941
+ </fo:table-footer>
3942
+
3943
+ </xsl:if>
3864
3944
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tbody']">
3865
- <xsl:variable name="cols-count">
3866
- <xsl:choose>
3867
- <xsl:when test="../*[local-name()='thead']">
3868
- <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
3869
- <xsl:call-template name="calculate-columns-numbers">
3870
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
3871
- </xsl:call-template>
3872
- </xsl:when>
3873
- <xsl:otherwise>
3874
- <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
3875
- <xsl:call-template name="calculate-columns-numbers">
3876
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
3877
- </xsl:call-template>
3878
- </xsl:otherwise>
3879
- </xsl:choose>
3880
- </xsl:variable>
3881
-
3945
+
3946
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
3947
+
3948
+ <xsl:call-template name="insertTableFooter"/>
3949
+
3882
3950
  <fo:table-body>
3883
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
3884
3951
  <xsl:apply-templates/>
3885
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3886
- <!-- if there are note(s) or fn(s) then create footer row -->
3887
- <xsl:if test="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']">
3888
- <fo:table-row>
3889
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3890
-
3891
-
3892
- <!-- fn will be processed inside 'note' processing -->
3893
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3894
- <!-- fn processing -->
3895
- <xsl:call-template name="fn_display"/>
3896
-
3897
- </fo:table-cell>
3898
- </fo:table-row>
3899
-
3900
- </xsl:if>
3952
+ <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
3953
+
3901
3954
  </fo:table-body>
3955
+
3902
3956
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']">
3903
3957
  <xsl:variable name="parent-name" select="local-name(..)"/>
3904
3958
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -3912,11 +3966,14 @@
3912
3966
 
3913
3967
 
3914
3968
 
3969
+
3915
3970
  </xsl:if>
3916
3971
  <xsl:if test="$parent-name = 'tfoot'">
3917
3972
 
3973
+
3918
3974
  </xsl:if>
3919
3975
 
3976
+
3920
3977
  <xsl:apply-templates/>
3921
3978
  </fo:table-row>
3922
3979
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th']">
@@ -3924,6 +3981,7 @@
3924
3981
 
3925
3982
 
3926
3983
 
3984
+
3927
3985
  <xsl:attribute name="text-align">center</xsl:attribute>
3928
3986
  <xsl:attribute name="background-color">black</xsl:attribute>
3929
3987
  <xsl:attribute name="color">white</xsl:attribute>
@@ -3953,6 +4011,9 @@
3953
4011
 
3954
4012
 
3955
4013
 
4014
+
4015
+
4016
+
3956
4017
  <xsl:if test="ancestor::*[local-name()='thead']">
3957
4018
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3958
4019
  </xsl:if>
@@ -3988,10 +4049,14 @@
3988
4049
 
3989
4050
  <fo:block font-size="10pt" margin-bottom="12pt">
3990
4051
 
4052
+
4053
+
3991
4054
  <fo:inline padding-right="2mm">
4055
+
3992
4056
  <xsl:text>NOTE </xsl:text>
3993
4057
 
3994
4058
 
4059
+
3995
4060
  <xsl:number format="1 "/>
3996
4061
 
3997
4062
  </fo:inline>
@@ -4015,6 +4080,8 @@
4015
4080
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4016
4081
  <fo:block margin-bottom="12pt">
4017
4082
 
4083
+
4084
+
4018
4085
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
4019
4086
 
4020
4087
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -4022,6 +4089,8 @@
4022
4089
 
4023
4090
 
4024
4091
 
4092
+
4093
+
4025
4094
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4026
4095
 
4027
4096
  <xsl:value-of select="@reference"/>
@@ -4068,6 +4137,7 @@
4068
4137
  <fo:table width="95%" table-layout="fixed">
4069
4138
  <xsl:if test="normalize-space($key_iso) = 'true'">
4070
4139
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4140
+
4071
4141
  </xsl:if>
4072
4142
  <fo:table-column column-width="15%"/>
4073
4143
  <fo:table-column column-width="85%"/>
@@ -4107,6 +4177,7 @@
4107
4177
  <fo:inline font-size="80%" keep-with-previous.within-line="always">
4108
4178
 
4109
4179
 
4180
+
4110
4181
  <xsl:attribute name="vertical-align">super</xsl:attribute>
4111
4182
  <xsl:attribute name="color">blue</xsl:attribute>
4112
4183
 
@@ -4134,7 +4205,7 @@
4134
4205
 
4135
4206
 
4136
4207
  <fo:block margin-bottom="12pt" text-align="left">
4137
-
4208
+
4138
4209
  <xsl:text>where </xsl:text>
4139
4210
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
4140
4211
  <xsl:text/>
@@ -4147,12 +4218,15 @@
4147
4218
 
4148
4219
 
4149
4220
 
4221
+
4150
4222
  <xsl:text>where</xsl:text>
4151
4223
  </fo:block>
4152
4224
  </xsl:when>
4153
4225
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
4154
4226
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
4155
4227
 
4228
+
4229
+
4156
4230
  <xsl:text>Key</xsl:text>
4157
4231
  </fo:block>
4158
4232
  </xsl:when>
@@ -4168,13 +4242,13 @@
4168
4242
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
4169
4243
  </xsl:if>
4170
4244
 
4171
-
4172
4245
  <fo:block>
4173
4246
 
4174
4247
  <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
4175
4248
  <xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
4176
4249
  </xsl:if>
4177
4250
 
4251
+
4178
4252
  <!-- create virtual html table for dl/[dt and dd] -->
4179
4253
  <xsl:variable name="html-table">
4180
4254
  <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
@@ -4194,12 +4268,14 @@
4194
4268
  <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
4195
4269
 
4196
4270
  <fo:table width="95%" table-layout="fixed">
4271
+
4197
4272
  <xsl:choose>
4198
4273
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
4199
4274
  <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
4200
4275
  </xsl:when>
4201
4276
  <xsl:when test="normalize-space($key_iso) = 'true'">
4202
4277
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4278
+
4203
4279
  </xsl:when>
4204
4280
  </xsl:choose>
4205
4281
  <xsl:choose>
@@ -4304,6 +4380,8 @@
4304
4380
  <fo:table-row>
4305
4381
  <fo:table-cell>
4306
4382
  <fo:block margin-top="6pt">
4383
+
4384
+
4307
4385
  <xsl:if test="normalize-space($key_iso) = 'true'">
4308
4386
  <xsl:attribute name="margin-top">0</xsl:attribute>
4309
4387
 
@@ -4314,6 +4392,7 @@
4314
4392
 
4315
4393
 
4316
4394
  <xsl:apply-templates/>
4395
+
4317
4396
  </fo:block>
4318
4397
  </fo:table-cell>
4319
4398
  <fo:table-cell>
@@ -4352,7 +4431,7 @@
4352
4431
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="process">
4353
4432
  <xsl:apply-templates/>
4354
4433
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
4355
- <fo:inline><xsl:apply-templates/></fo:inline>
4434
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
4356
4435
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='em']">
4357
4436
  <fo:inline font-style="italic">
4358
4437
  <xsl:apply-templates/>
@@ -4467,6 +4546,7 @@
4467
4546
  <xsl:variable name="zero-space-after-dot">.</xsl:variable>
4468
4547
  <xsl:variable name="zero-space-after-colon">:</xsl:variable>
4469
4548
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
4549
+ <xsl:variable name="zero-space-after-underscore">_</xsl:variable>
4470
4550
  <xsl:variable name="zero-space">​</xsl:variable>
4471
4551
  <xsl:choose>
4472
4552
  <xsl:when test="contains($text, $zero-space-after-chars)">
@@ -4501,6 +4581,14 @@
4501
4581
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
4502
4582
  </xsl:call-template>
4503
4583
  </xsl:when>
4584
+ <xsl:when test="contains($text, $zero-space-after-underscore)">
4585
+ <xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
4586
+ <xsl:value-of select="$zero-space-after-underscore"/>
4587
+ <xsl:value-of select="$zero-space"/>
4588
+ <xsl:call-template name="add-zero-spaces">
4589
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
4590
+ </xsl:call-template>
4591
+ </xsl:when>
4504
4592
  <xsl:otherwise>
4505
4593
  <xsl:value-of select="$text"/>
4506
4594
  </xsl:otherwise>
@@ -4671,4 +4759,46 @@
4671
4759
  <xsl:value-of select="substring($str2, 2)"/>
4672
4760
  </xsl:otherwise>
4673
4761
  </xsl:choose>
4762
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="mathml:math">
4763
+ <fo:inline font-family="STIX2Math">
4764
+ <fo:instream-foreign-object fox:alt-text="Math">
4765
+ <xsl:copy-of select="."/>
4766
+ </fo:instream-foreign-object>
4767
+ </fo:inline>
4768
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='localityStack']">
4769
+ <xsl:for-each select="*[local-name()='locality']">
4770
+ <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
4771
+ <xsl:apply-templates select="."/>
4772
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
4773
+ </xsl:for-each>
4774
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='link']" name="link">
4775
+ <xsl:variable name="target">
4776
+ <xsl:choose>
4777
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
4778
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
4779
+ </xsl:when>
4780
+ <xsl:otherwise>
4781
+ <xsl:value-of select="normalize-space(@target)"/>
4782
+ </xsl:otherwise>
4783
+ </xsl:choose>
4784
+ </xsl:variable>
4785
+ <fo:inline xsl:use-attribute-sets="link-style">
4786
+ <xsl:choose>
4787
+ <xsl:when test="$target = ''">
4788
+ <xsl:apply-templates/>
4789
+ </xsl:when>
4790
+ <xsl:otherwise>
4791
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4792
+ <xsl:choose>
4793
+ <xsl:when test="normalize-space(.) = ''">
4794
+ <xsl:value-of select="$target"/>
4795
+ </xsl:when>
4796
+ <xsl:otherwise>
4797
+ <xsl:apply-templates/>
4798
+ </xsl:otherwise>
4799
+ </xsl:choose>
4800
+ </fo:basic-link>
4801
+ </xsl:otherwise>
4802
+ </xsl:choose>
4803
+ </fo:inline>
4674
4804
  </xsl:template></xsl:stylesheet>