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.
@@ -116,12 +116,6 @@ module IsoDoc
116
116
  Date.parse(isodate).strftime("%m-%d-%Y")
117
117
  end
118
118
 
119
- def keywords(ixml, _out)
120
- keywords = []
121
- ixml.xpath(ns("//bibdata/keyword")).each { |kw| keywords << kw.text }
122
- set(:keywords, keywords)
123
- end
124
-
125
119
  def commentperiod(ixml, _out)
126
120
  from = ixml.at(ns("//bibdata/ext/commentperiod/from"))&.text
127
121
  to = ixml.at(ns("//bibdata/ext/commentperiod/to"))&.text
@@ -2733,11 +2733,14 @@
2733
2733
  <xsl:value-of select="$section"/>
2734
2734
  </xsl:template>
2735
2735
 
2736
- <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()">
2736
+ <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">
2737
+
2738
+
2739
+ </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()">
2737
2740
  <xsl:value-of select="."/>
2738
2741
  </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']">
2739
2742
  <xsl:value-of select="$linebreak"/>
2740
- </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">
2743
+ </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">
2741
2744
  <xsl:call-template name="add-zero-spaces"/>
2742
2745
  </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']">
2743
2746
 
@@ -2753,6 +2756,9 @@
2753
2756
 
2754
2757
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2755
2758
 
2759
+ <!-- <xsl:if test="$namespace = 'iso'">
2760
+ <fo:block space-before="6pt">&#xA0;</fo:block>
2761
+ </xsl:if> -->
2756
2762
 
2757
2763
  <xsl:choose>
2758
2764
  <xsl:when test="@unnumbered = 'true'"/>
@@ -2762,12 +2768,15 @@
2762
2768
 
2763
2769
  <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
2764
2770
 
2771
+
2772
+
2765
2773
  <xsl:attribute name="font-family">Arial</xsl:attribute>
2766
2774
  <xsl:attribute name="font-size">9pt</xsl:attribute>
2767
2775
 
2768
2776
 
2769
2777
 
2770
2778
 
2779
+
2771
2780
  <xsl:text>Table </xsl:text>
2772
2781
  <xsl:choose>
2773
2782
  <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
@@ -2777,6 +2786,8 @@
2777
2786
 
2778
2787
 
2779
2788
 
2789
+
2790
+
2780
2791
  <xsl:variable name="annex-id" select="ancestor::*[local-name()='annex']/@id"/>
2781
2792
  <xsl:number format="A-" count="*[local-name()='annex']"/>
2782
2793
  <xsl:number format="1" level="any" count="*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'][ancestor::*[local-name()='annex'][@id = $annex-id]]"/>
@@ -2786,10 +2797,11 @@
2786
2797
 
2787
2798
  </xsl:when>
2788
2799
  <xsl:otherwise>
2789
- <!-- <xsl:number format="1"/> -->
2790
- <xsl:number format="A." count="*[local-name()='annex']"/>
2791
- <!-- <xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/> -->
2792
- <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']"/>
2800
+
2801
+
2802
+ <xsl:number format="A." count="*[local-name()='annex']"/>
2803
+ <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']"/>
2804
+
2793
2805
  </xsl:otherwise>
2794
2806
  </xsl:choose>
2795
2807
  <xsl:if test="*[local-name()='name']">
@@ -2834,11 +2846,11 @@
2834
2846
  </xsl:call-template>
2835
2847
  </xsl:variable>
2836
2848
 
2837
- <xsl:variable name="colwidths2">
2849
+ <!-- <xsl:variable name="colwidths2">
2838
2850
  <xsl:call-template name="calculate-column-widths">
2839
2851
  <xsl:with-param name="cols-count" select="$cols-count"/>
2840
2852
  </xsl:call-template>
2841
- </xsl:variable>
2853
+ </xsl:variable> -->
2842
2854
 
2843
2855
  <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2844
2856
  colwidthsNew=<xsl:copy-of select="$colwidths"/>
@@ -2859,7 +2871,11 @@
2859
2871
 
2860
2872
 
2861
2873
 
2862
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm">
2874
+
2875
+
2876
+ <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">
2877
+
2878
+
2863
2879
 
2864
2880
 
2865
2881
 
@@ -2890,6 +2906,9 @@
2890
2906
  </xsl:for-each>
2891
2907
  <xsl:apply-templates/>
2892
2908
  </fo:table>
2909
+
2910
+
2911
+
2893
2912
  </fo:block-container>
2894
2913
  </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">
2895
2914
  <xsl:apply-templates/>
@@ -2943,9 +2962,13 @@
2943
2962
  </xsl:when>
2944
2963
  <xsl:otherwise>
2945
2964
  <xsl:for-each select="xalan:nodeset($table)//tr">
2965
+ <xsl:variable name="td_text">
2966
+ <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2967
+ </xsl:variable>
2946
2968
  <xsl:variable name="words">
2947
2969
  <xsl:call-template name="tokenize">
2948
- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/>
2970
+ <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2971
+ <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
2949
2972
  </xsl:call-template>
2950
2973
  </xsl:variable>
2951
2974
  <xsl:variable name="max_length">
@@ -2986,51 +3009,82 @@
2986
3009
  <xsl:with-param name="table" select="$table"/>
2987
3010
  </xsl:call-template>
2988
3011
  </xsl:if>
3012
+ </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">
3013
+ <xsl:variable name="zero-space">​</xsl:variable>
3014
+ <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
2989
3015
  </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">
2990
- <!-- <fo:table-header font-weight="bold">
2991
- <xsl:apply-templates />
2992
- </fo:table-header> -->
2993
- <xsl:apply-templates/>
3016
+ <!-- font-weight="bold" -->
3017
+ <fo:table-header>
3018
+ <xsl:apply-templates/>
3019
+ </fo:table-header>
2994
3020
  </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">
2995
3021
  <xsl:apply-templates/>
3022
+ </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">
3023
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3024
+ <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
3025
+
3026
+ <fo:table-footer>
3027
+
3028
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3029
+
3030
+ <!-- if there are note(s) or fn(s) then create footer row -->
3031
+ <xsl:if test="$isNoteOrFnExist = 'true'">
3032
+
3033
+ <xsl:variable name="cols-count">
3034
+ <xsl:choose>
3035
+ <xsl:when test="../*[local-name()='thead']">
3036
+ <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
3037
+ <xsl:call-template name="calculate-columns-numbers">
3038
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
3039
+ </xsl:call-template>
3040
+ </xsl:when>
3041
+ <xsl:otherwise>
3042
+ <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
3043
+ <xsl:call-template name="calculate-columns-numbers">
3044
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
3045
+ </xsl:call-template>
3046
+ </xsl:otherwise>
3047
+ </xsl:choose>
3048
+ </xsl:variable>
3049
+
3050
+ <fo:table-row>
3051
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3052
+
3053
+
3054
+
3055
+ <!-- fn will be processed inside 'note' processing -->
3056
+
3057
+
3058
+ <!-- except gb -->
3059
+
3060
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3061
+
3062
+
3063
+ <!-- horizontal row separator -->
3064
+
3065
+
3066
+ <!-- fn processing -->
3067
+ <xsl:call-template name="fn_display"/>
3068
+
3069
+ </fo:table-cell>
3070
+ </fo:table-row>
3071
+
3072
+ </xsl:if>
3073
+ </fo:table-footer>
3074
+
3075
+ </xsl:if>
2996
3076
  </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']">
2997
- <xsl:variable name="cols-count">
2998
- <xsl:choose>
2999
- <xsl:when test="../*[local-name()='thead']">
3000
- <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
3001
- <xsl:call-template name="calculate-columns-numbers">
3002
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
3003
- </xsl:call-template>
3004
- </xsl:when>
3005
- <xsl:otherwise>
3006
- <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
3007
- <xsl:call-template name="calculate-columns-numbers">
3008
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
3009
- </xsl:call-template>
3010
- </xsl:otherwise>
3011
- </xsl:choose>
3012
- </xsl:variable>
3013
-
3077
+
3078
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
3079
+
3080
+ <xsl:call-template name="insertTableFooter"/>
3081
+
3014
3082
  <fo:table-body>
3015
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
3016
3083
  <xsl:apply-templates/>
3017
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3018
- <!-- if there are note(s) or fn(s) then create footer row -->
3019
- <xsl:if test="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']">
3020
- <fo:table-row>
3021
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3022
-
3023
-
3024
- <!-- fn will be processed inside 'note' processing -->
3025
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3026
- <!-- fn processing -->
3027
- <xsl:call-template name="fn_display"/>
3028
-
3029
- </fo:table-cell>
3030
- </fo:table-row>
3031
-
3032
- </xsl:if>
3084
+ <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
3085
+
3033
3086
  </fo:table-body>
3087
+
3034
3088
  </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']">
3035
3089
  <xsl:variable name="parent-name" select="local-name(..)"/>
3036
3090
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -3044,11 +3098,14 @@
3044
3098
 
3045
3099
 
3046
3100
 
3101
+
3047
3102
  </xsl:if>
3048
3103
  <xsl:if test="$parent-name = 'tfoot'">
3049
3104
 
3105
+
3050
3106
  </xsl:if>
3051
3107
 
3108
+
3052
3109
  <xsl:apply-templates/>
3053
3110
  </fo:table-row>
3054
3111
  </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']">
@@ -3056,6 +3113,7 @@
3056
3113
 
3057
3114
 
3058
3115
 
3116
+
3059
3117
  <xsl:attribute name="text-align">center</xsl:attribute>
3060
3118
  <xsl:attribute name="background-color">black</xsl:attribute>
3061
3119
  <xsl:attribute name="color">white</xsl:attribute>
@@ -3085,6 +3143,9 @@
3085
3143
 
3086
3144
 
3087
3145
 
3146
+
3147
+
3148
+
3088
3149
  <xsl:if test="ancestor::*[local-name()='thead']">
3089
3150
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3090
3151
  </xsl:if>
@@ -3120,10 +3181,14 @@
3120
3181
 
3121
3182
  <fo:block font-size="10pt" margin-bottom="12pt">
3122
3183
 
3184
+
3185
+
3123
3186
  <fo:inline padding-right="2mm">
3187
+
3124
3188
  <xsl:text>NOTE </xsl:text>
3125
3189
 
3126
3190
 
3191
+
3127
3192
  <xsl:number format="1 "/>
3128
3193
 
3129
3194
  </fo:inline>
@@ -3147,6 +3212,8 @@
3147
3212
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3148
3213
  <fo:block margin-bottom="12pt">
3149
3214
 
3215
+
3216
+
3150
3217
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3151
3218
 
3152
3219
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -3154,6 +3221,8 @@
3154
3221
 
3155
3222
 
3156
3223
 
3224
+
3225
+
3157
3226
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3158
3227
 
3159
3228
  <xsl:value-of select="@reference"/>
@@ -3200,6 +3269,7 @@
3200
3269
  <fo:table width="95%" table-layout="fixed">
3201
3270
  <xsl:if test="normalize-space($key_iso) = 'true'">
3202
3271
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3272
+
3203
3273
  </xsl:if>
3204
3274
  <fo:table-column column-width="15%"/>
3205
3275
  <fo:table-column column-width="85%"/>
@@ -3239,6 +3309,7 @@
3239
3309
  <fo:inline font-size="80%" keep-with-previous.within-line="always">
3240
3310
 
3241
3311
 
3312
+
3242
3313
  <xsl:attribute name="vertical-align">super</xsl:attribute>
3243
3314
  <xsl:attribute name="color">blue</xsl:attribute>
3244
3315
 
@@ -3266,7 +3337,7 @@
3266
3337
 
3267
3338
 
3268
3339
  <fo:block margin-bottom="12pt" text-align="left">
3269
-
3340
+
3270
3341
  <xsl:text>where </xsl:text>
3271
3342
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
3272
3343
  <xsl:text/>
@@ -3279,12 +3350,15 @@
3279
3350
 
3280
3351
 
3281
3352
 
3353
+
3282
3354
  <xsl:text>where</xsl:text>
3283
3355
  </fo:block>
3284
3356
  </xsl:when>
3285
3357
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3286
3358
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
3287
3359
 
3360
+
3361
+
3288
3362
  <xsl:text>Key</xsl:text>
3289
3363
  </fo:block>
3290
3364
  </xsl:when>
@@ -3300,13 +3374,13 @@
3300
3374
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
3301
3375
  </xsl:if>
3302
3376
 
3303
-
3304
3377
  <fo:block>
3305
3378
 
3306
3379
  <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
3307
3380
  <xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
3308
3381
  </xsl:if>
3309
3382
 
3383
+
3310
3384
  <!-- create virtual html table for dl/[dt and dd] -->
3311
3385
  <xsl:variable name="html-table">
3312
3386
  <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
@@ -3326,12 +3400,14 @@
3326
3400
  <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3327
3401
 
3328
3402
  <fo:table width="95%" table-layout="fixed">
3403
+
3329
3404
  <xsl:choose>
3330
3405
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3331
3406
  <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3332
3407
  </xsl:when>
3333
3408
  <xsl:when test="normalize-space($key_iso) = 'true'">
3334
3409
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3410
+
3335
3411
  </xsl:when>
3336
3412
  </xsl:choose>
3337
3413
  <xsl:choose>
@@ -3436,6 +3512,8 @@
3436
3512
  <fo:table-row>
3437
3513
  <fo:table-cell>
3438
3514
  <fo:block margin-top="6pt">
3515
+
3516
+
3439
3517
  <xsl:if test="normalize-space($key_iso) = 'true'">
3440
3518
  <xsl:attribute name="margin-top">0</xsl:attribute>
3441
3519
 
@@ -3446,6 +3524,7 @@
3446
3524
 
3447
3525
 
3448
3526
  <xsl:apply-templates/>
3527
+
3449
3528
  </fo:block>
3450
3529
  </fo:table-cell>
3451
3530
  <fo:table-cell>
@@ -3484,7 +3563,7 @@
3484
3563
  </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">
3485
3564
  <xsl:apply-templates/>
3486
3565
  </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">
3487
- <fo:inline><xsl:apply-templates/></fo:inline>
3566
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3488
3567
  </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']">
3489
3568
  <fo:inline font-style="italic">
3490
3569
  <xsl:apply-templates/>
@@ -3599,6 +3678,7 @@
3599
3678
  <xsl:variable name="zero-space-after-dot">.</xsl:variable>
3600
3679
  <xsl:variable name="zero-space-after-colon">:</xsl:variable>
3601
3680
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
3681
+ <xsl:variable name="zero-space-after-underscore">_</xsl:variable>
3602
3682
  <xsl:variable name="zero-space">​</xsl:variable>
3603
3683
  <xsl:choose>
3604
3684
  <xsl:when test="contains($text, $zero-space-after-chars)">
@@ -3633,6 +3713,14 @@
3633
3713
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3634
3714
  </xsl:call-template>
3635
3715
  </xsl:when>
3716
+ <xsl:when test="contains($text, $zero-space-after-underscore)">
3717
+ <xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
3718
+ <xsl:value-of select="$zero-space-after-underscore"/>
3719
+ <xsl:value-of select="$zero-space"/>
3720
+ <xsl:call-template name="add-zero-spaces">
3721
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
3722
+ </xsl:call-template>
3723
+ </xsl:when>
3636
3724
  <xsl:otherwise>
3637
3725
  <xsl:value-of select="$text"/>
3638
3726
  </xsl:otherwise>
@@ -3803,4 +3891,46 @@
3803
3891
  <xsl:value-of select="substring($str2, 2)"/>
3804
3892
  </xsl:otherwise>
3805
3893
  </xsl:choose>
3894
+ </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">
3895
+ <fo:inline font-family="STIX2Math">
3896
+ <fo:instream-foreign-object fox:alt-text="Math">
3897
+ <xsl:copy-of select="."/>
3898
+ </fo:instream-foreign-object>
3899
+ </fo:inline>
3900
+ </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']">
3901
+ <xsl:for-each select="*[local-name()='locality']">
3902
+ <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3903
+ <xsl:apply-templates select="."/>
3904
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3905
+ </xsl:for-each>
3906
+ </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">
3907
+ <xsl:variable name="target">
3908
+ <xsl:choose>
3909
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3910
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3911
+ </xsl:when>
3912
+ <xsl:otherwise>
3913
+ <xsl:value-of select="normalize-space(@target)"/>
3914
+ </xsl:otherwise>
3915
+ </xsl:choose>
3916
+ </xsl:variable>
3917
+ <fo:inline xsl:use-attribute-sets="link-style">
3918
+ <xsl:choose>
3919
+ <xsl:when test="$target = ''">
3920
+ <xsl:apply-templates/>
3921
+ </xsl:when>
3922
+ <xsl:otherwise>
3923
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3924
+ <xsl:choose>
3925
+ <xsl:when test="normalize-space(.) = ''">
3926
+ <xsl:value-of select="$target"/>
3927
+ </xsl:when>
3928
+ <xsl:otherwise>
3929
+ <xsl:apply-templates/>
3930
+ </xsl:otherwise>
3931
+ </xsl:choose>
3932
+ </fo:basic-link>
3933
+ </xsl:otherwise>
3934
+ </xsl:choose>
3935
+ </fo:inline>
3806
3936
  </xsl:template></xsl:stylesheet>