metanorma-nist 1.2.8 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76b612ddae877500cbbc398c12a44867549fa1c987772eb781fc7aa33ac63e2b
4
- data.tar.gz: d6def5426449912f9890f09834da5ed430c1fc04958b8c2850d59c5730b7cae7
3
+ metadata.gz: 2c3f8f7501c3253edf4e36a10084620a0809aa8bb388932c40527a3deed50f76
4
+ data.tar.gz: 3f47ac4616595d8b62701f9d9a7d16ebf4f986f14b091494c94da488d51c5186
5
5
  SHA512:
6
- metadata.gz: 5ce949e7353a14d240b75037b5a68736490a3fd2efe227af16d34ec0b7b1ecb82c689117bc743cc99f33f68a22824d40ed8126516d929de75e14767de2e78bd4
7
- data.tar.gz: e077d67bfb18798c77dbd0573e0988771b0a6d273149950c7ba5f11a12f50c17a728c5d978eaee82f716696fcdbe9fd50b29015485f918913cda27059ec71fd9
6
+ metadata.gz: 0d546a77f835d5527cda36a14160605ff0e1e50022216e0222ccf816c445c1c671a9dab9d02940dd1e4d900a38aaba3a1d9f5c5004f483a590655f60e45c3532
7
+ data.tar.gz: 71ac09b0a49b3081c535eb54004e4358da63c85f32fdb3ca1b394ad2702cca433d8ef7ada8ac11545913727e6d9161674c3ea9f32eedadf092d945fab74b8e45
@@ -596,6 +596,7 @@
596
596
  <ref name="bookmark"/>
597
597
  <ref name="image"/>
598
598
  <ref name="index"/>
599
+ <ref name="index-xref"/>
599
600
  </choice>
600
601
  </define>
601
602
  <define name="PureTextElement">
@@ -737,6 +738,37 @@
737
738
  </optional>
738
739
  </element>
739
740
  </define>
741
+ <define name="index-xref">
742
+ <element name="index-xref">
743
+ <attribute name="also">
744
+ <data type="boolean"/>
745
+ </attribute>
746
+ <element name="primary">
747
+ <oneOrMore>
748
+ <ref name="PureTextElement"/>
749
+ </oneOrMore>
750
+ </element>
751
+ <optional>
752
+ <element name="secondary">
753
+ <oneOrMore>
754
+ <ref name="PureTextElement"/>
755
+ </oneOrMore>
756
+ </element>
757
+ </optional>
758
+ <optional>
759
+ <element name="tertiary">
760
+ <oneOrMore>
761
+ <ref name="PureTextElement"/>
762
+ </oneOrMore>
763
+ </element>
764
+ </optional>
765
+ <element name="target">
766
+ <oneOrMore>
767
+ <ref name="PureTextElement"/>
768
+ </oneOrMore>
769
+ </element>
770
+ </element>
771
+ </define>
740
772
  <!-- bare ID element, used for referencing arbitrary spans of text -->
741
773
  <define name="bookmark">
742
774
  <element name="bookmark">
@@ -246,6 +246,9 @@
246
246
  <data type="boolean"/>
247
247
  </attribute>
248
248
  </optional>
249
+ <optional>
250
+ <ref name="colgroup"/>
251
+ </optional>
249
252
  <optional>
250
253
  <ref name="tname"/>
251
254
  </optional>
@@ -764,6 +767,18 @@
764
767
  </define>
765
768
  </include>
766
769
  <!-- end overrides -->
770
+ <define name="colgroup">
771
+ <element name="colgroup">
772
+ <oneOrMore>
773
+ <ref name="col"/>
774
+ </oneOrMore>
775
+ </element>
776
+ </define>
777
+ <define name="col">
778
+ <element name="col">
779
+ <attribute name="width"/>
780
+ </element>
781
+ </define>
767
782
  <define name="TextElement" combine="choice">
768
783
  <ref name="concept"/>
769
784
  </define>
@@ -154,17 +154,18 @@
154
154
  <xsl:variable name="org-address" select="nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress"/>
155
155
  <xsl:if test="concat(following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:name, following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress) != concat($org-name, $org-address)">
156
156
 
157
- <xsl:for-each select="xalan:tokenize($org-name, ',')">
157
+ <!-- <xsl:for-each select="xalan:tokenize($org-name, ',')">
158
158
  <fo:block>
159
159
  <fo:inline font-style="italic">
160
160
  <xsl:value-of select="."/>
161
- <!-- <xsl:if test="normalize-space($org-address) != ''">
162
- <fo:inline>, <xsl:value-of select="$org-address"/></fo:inline>
163
- </xsl:if> -->
164
161
  </fo:inline>
165
162
  </fo:block>
166
- </xsl:for-each>
167
-
163
+ </xsl:for-each> -->
164
+ <fo:block>
165
+ <fo:inline font-style="italic">
166
+ <xsl:value-of select="$org-name"/>
167
+ </fo:inline>
168
+ </fo:block>
168
169
  <xsl:if test="normalize-space($org-address) != ''">
169
170
  <fo:block>
170
171
  <fo:inline font-style="italic">
@@ -849,7 +850,7 @@
849
850
  <xsl:number format="1."/>
850
851
  </xsl:when>
851
852
  <xsl:when test="../@type = 'arabic'">
852
- <xsl:number format="a)"/>
853
+ <xsl:number format="a)" lang="en"/>
853
854
  </xsl:when>
854
855
  <xsl:when test="../@type = 'alphabet'">
855
856
  <xsl:number format="1)"/>
@@ -857,7 +858,7 @@
857
858
  <xsl:when test="ancestor::*[nist:annex]">
858
859
  <xsl:choose>
859
860
  <xsl:when test="$level = 1">
860
- <xsl:number format="a)"/>
861
+ <xsl:number format="a)" lang="en"/>
861
862
  </xsl:when>
862
863
  <xsl:when test="$level = 2">
863
864
  <xsl:number format="i)"/>
@@ -1634,10 +1635,12 @@
1634
1635
 
1635
1636
 
1636
1637
  <xsl:variable name="colwidths">
1637
- <xsl:call-template name="calculate-column-widths">
1638
- <xsl:with-param name="cols-count" select="$cols-count"/>
1639
- <xsl:with-param name="table" select="$simple-table"/>
1640
- </xsl:call-template>
1638
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1639
+ <xsl:call-template name="calculate-column-widths">
1640
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1641
+ <xsl:with-param name="table" select="$simple-table"/>
1642
+ </xsl:call-template>
1643
+ </xsl:if>
1641
1644
  </xsl:variable>
1642
1645
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1643
1646
 
@@ -1717,16 +1720,25 @@
1717
1720
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1718
1721
  </xsl:if>
1719
1722
 
1720
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1721
- <xsl:choose>
1722
- <xsl:when test=". = 1 or . = 0">
1723
- <fo:table-column column-width="proportional-column-width(2)"/>
1724
- </xsl:when>
1725
- <xsl:otherwise>
1726
- <fo:table-column column-width="proportional-column-width({.})"/>
1727
- </xsl:otherwise>
1728
- </xsl:choose>
1729
- </xsl:for-each>
1723
+ <xsl:choose>
1724
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1725
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1726
+ <fo:table-column column-width="{@width}"/>
1727
+ </xsl:for-each>
1728
+ </xsl:when>
1729
+ <xsl:otherwise>
1730
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1731
+ <xsl:choose>
1732
+ <xsl:when test=". = 1 or . = 0">
1733
+ <fo:table-column column-width="proportional-column-width(2)"/>
1734
+ </xsl:when>
1735
+ <xsl:otherwise>
1736
+ <fo:table-column column-width="proportional-column-width({.})"/>
1737
+ </xsl:otherwise>
1738
+ </xsl:choose>
1739
+ </xsl:for-each>
1740
+ </xsl:otherwise>
1741
+ </xsl:choose>
1730
1742
 
1731
1743
  <xsl:choose>
1732
1744
  <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
@@ -1739,10 +1751,12 @@
1739
1751
 
1740
1752
  </fo:table>
1741
1753
 
1754
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1742
1755
  <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1743
1756
  <xsl:call-template name="insertTableFooterInSeparateTable">
1744
1757
  <xsl:with-param name="table_attributes" select="$table_attributes"/>
1745
1758
  <xsl:with-param name="colwidths" select="$colwidths"/>
1759
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1746
1760
  </xsl:call-template>
1747
1761
  </xsl:for-each>
1748
1762
 
@@ -1996,12 +2010,22 @@
1996
2010
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1997
2011
  <xsl:param name="table_attributes"/>
1998
2012
  <xsl:param name="colwidths"/>
2013
+ <xsl:param name="colgroup"/>
1999
2014
 
2000
2015
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2001
2016
 
2002
2017
  <xsl:if test="$isNoteOrFnExist = 'true'">
2003
2018
 
2004
- <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
2019
+ <xsl:variable name="cols-count">
2020
+ <xsl:choose>
2021
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
2022
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
2023
+ </xsl:when>
2024
+ <xsl:otherwise>
2025
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
2026
+ </xsl:otherwise>
2027
+ </xsl:choose>
2028
+ </xsl:variable>
2005
2029
 
2006
2030
  <fo:table keep-with-previous="always">
2007
2031
  <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
@@ -2019,16 +2043,25 @@
2019
2043
  </xsl:choose>
2020
2044
  </xsl:for-each>
2021
2045
 
2022
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2023
- <xsl:choose>
2024
- <xsl:when test=". = 1 or . = 0">
2025
- <fo:table-column column-width="proportional-column-width(2)"/>
2026
- </xsl:when>
2027
- <xsl:otherwise>
2028
- <fo:table-column column-width="proportional-column-width({.})"/>
2029
- </xsl:otherwise>
2030
- </xsl:choose>
2031
- </xsl:for-each>
2046
+ <xsl:choose>
2047
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
2048
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
2049
+ <fo:table-column column-width="{@width}"/>
2050
+ </xsl:for-each>
2051
+ </xsl:when>
2052
+ <xsl:otherwise>
2053
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2054
+ <xsl:choose>
2055
+ <xsl:when test=". = 1 or . = 0">
2056
+ <fo:table-column column-width="proportional-column-width(2)"/>
2057
+ </xsl:when>
2058
+ <xsl:otherwise>
2059
+ <fo:table-column column-width="proportional-column-width({.})"/>
2060
+ </xsl:otherwise>
2061
+ </xsl:choose>
2062
+ </xsl:for-each>
2063
+ </xsl:otherwise>
2064
+ </xsl:choose>
2032
2065
 
2033
2066
  <fo:table-body>
2034
2067
  <fo:table-row>
@@ -4256,7 +4289,10 @@
4256
4289
  <fo:table-column column-width="107mm"/>
4257
4290
  <fo:table-column column-width="15mm"/>
4258
4291
  <fo:table-body>
4259
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
4292
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
4293
+
4294
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
4295
+
4260
4296
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
4261
4297
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
4262
4298
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -4274,6 +4310,10 @@
4274
4310
  <fo:block><xsl:apply-templates/></fo:block>
4275
4311
  </fo:table-cell>
4276
4312
  </xsl:template><xsl:template name="processBibitem">
4313
+
4314
+
4315
+ <!-- end BIPM bibitem processing-->
4316
+
4277
4317
 
4278
4318
 
4279
4319
 
@@ -1693,7 +1693,7 @@
1693
1693
  <xsl:number format="1."/>
1694
1694
  </xsl:when>
1695
1695
  <xsl:when test="../@type = 'arabic'">
1696
- <xsl:number format="a)"/>
1696
+ <xsl:number format="a)" lang="en"/>
1697
1697
  </xsl:when>
1698
1698
  <xsl:when test="../@type = 'alphabet'">
1699
1699
  <xsl:number format="1)"/>
@@ -1702,7 +1702,7 @@
1702
1702
  <xsl:number format="i)"/>
1703
1703
  </xsl:when>
1704
1704
  <xsl:when test="../@type = 'alphabet_upper'">
1705
- <xsl:number format="A)"/>
1705
+ <xsl:number format="A)" lang="en"/>
1706
1706
  </xsl:when>
1707
1707
  <xsl:when test="ancestor::*[nist:annex]">
1708
1708
  <!-- <xsl:variable name="level">
@@ -1710,7 +1710,7 @@
1710
1710
  </xsl:variable> -->
1711
1711
  <xsl:choose>
1712
1712
  <xsl:when test="$level = 1">
1713
- <xsl:number format="a)"/>
1713
+ <xsl:number format="a)" lang="en"/>
1714
1714
  </xsl:when>
1715
1715
  <xsl:when test="$level = 2">
1716
1716
  <xsl:number format="i)"/>
@@ -2721,10 +2721,12 @@
2721
2721
 
2722
2722
 
2723
2723
  <xsl:variable name="colwidths">
2724
- <xsl:call-template name="calculate-column-widths">
2725
- <xsl:with-param name="cols-count" select="$cols-count"/>
2726
- <xsl:with-param name="table" select="$simple-table"/>
2727
- </xsl:call-template>
2724
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2725
+ <xsl:call-template name="calculate-column-widths">
2726
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2727
+ <xsl:with-param name="table" select="$simple-table"/>
2728
+ </xsl:call-template>
2729
+ </xsl:if>
2728
2730
  </xsl:variable>
2729
2731
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2730
2732
 
@@ -2804,16 +2806,25 @@
2804
2806
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2805
2807
  </xsl:if>
2806
2808
 
2807
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2808
- <xsl:choose>
2809
- <xsl:when test=". = 1 or . = 0">
2810
- <fo:table-column column-width="proportional-column-width(2)"/>
2811
- </xsl:when>
2812
- <xsl:otherwise>
2813
- <fo:table-column column-width="proportional-column-width({.})"/>
2814
- </xsl:otherwise>
2815
- </xsl:choose>
2816
- </xsl:for-each>
2809
+ <xsl:choose>
2810
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2811
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2812
+ <fo:table-column column-width="{@width}"/>
2813
+ </xsl:for-each>
2814
+ </xsl:when>
2815
+ <xsl:otherwise>
2816
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2817
+ <xsl:choose>
2818
+ <xsl:when test=". = 1 or . = 0">
2819
+ <fo:table-column column-width="proportional-column-width(2)"/>
2820
+ </xsl:when>
2821
+ <xsl:otherwise>
2822
+ <fo:table-column column-width="proportional-column-width({.})"/>
2823
+ </xsl:otherwise>
2824
+ </xsl:choose>
2825
+ </xsl:for-each>
2826
+ </xsl:otherwise>
2827
+ </xsl:choose>
2817
2828
 
2818
2829
  <xsl:choose>
2819
2830
  <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
@@ -2826,10 +2837,12 @@
2826
2837
 
2827
2838
  </fo:table>
2828
2839
 
2840
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2829
2841
  <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2830
2842
  <xsl:call-template name="insertTableFooterInSeparateTable">
2831
2843
  <xsl:with-param name="table_attributes" select="$table_attributes"/>
2832
2844
  <xsl:with-param name="colwidths" select="$colwidths"/>
2845
+ <xsl:with-param name="colgroup" select="$colgroup"/>
2833
2846
  </xsl:call-template>
2834
2847
  </xsl:for-each>
2835
2848
 
@@ -3083,12 +3096,22 @@
3083
3096
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3084
3097
  <xsl:param name="table_attributes"/>
3085
3098
  <xsl:param name="colwidths"/>
3099
+ <xsl:param name="colgroup"/>
3086
3100
 
3087
3101
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3088
3102
 
3089
3103
  <xsl:if test="$isNoteOrFnExist = 'true'">
3090
3104
 
3091
- <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
3105
+ <xsl:variable name="cols-count">
3106
+ <xsl:choose>
3107
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3108
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
3109
+ </xsl:when>
3110
+ <xsl:otherwise>
3111
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
3112
+ </xsl:otherwise>
3113
+ </xsl:choose>
3114
+ </xsl:variable>
3092
3115
 
3093
3116
  <fo:table keep-with-previous="always">
3094
3117
  <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
@@ -3106,16 +3129,25 @@
3106
3129
  </xsl:choose>
3107
3130
  </xsl:for-each>
3108
3131
 
3109
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3110
- <xsl:choose>
3111
- <xsl:when test=". = 1 or . = 0">
3112
- <fo:table-column column-width="proportional-column-width(2)"/>
3113
- </xsl:when>
3114
- <xsl:otherwise>
3115
- <fo:table-column column-width="proportional-column-width({.})"/>
3116
- </xsl:otherwise>
3117
- </xsl:choose>
3118
- </xsl:for-each>
3132
+ <xsl:choose>
3133
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3134
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3135
+ <fo:table-column column-width="{@width}"/>
3136
+ </xsl:for-each>
3137
+ </xsl:when>
3138
+ <xsl:otherwise>
3139
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3140
+ <xsl:choose>
3141
+ <xsl:when test=". = 1 or . = 0">
3142
+ <fo:table-column column-width="proportional-column-width(2)"/>
3143
+ </xsl:when>
3144
+ <xsl:otherwise>
3145
+ <fo:table-column column-width="proportional-column-width({.})"/>
3146
+ </xsl:otherwise>
3147
+ </xsl:choose>
3148
+ </xsl:for-each>
3149
+ </xsl:otherwise>
3150
+ </xsl:choose>
3119
3151
 
3120
3152
  <fo:table-body>
3121
3153
  <fo:table-row>
@@ -5368,7 +5400,10 @@
5368
5400
  <fo:table-column column-width="107mm"/>
5369
5401
  <fo:table-column column-width="15mm"/>
5370
5402
  <fo:table-body>
5371
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
5403
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
5404
+
5405
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
5406
+
5372
5407
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
5373
5408
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
5374
5409
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -5386,6 +5421,10 @@
5386
5421
  <fo:block><xsl:apply-templates/></fo:block>
5387
5422
  </fo:table-cell>
5388
5423
  </xsl:template><xsl:template name="processBibitem">
5424
+
5425
+
5426
+ <!-- end BIPM bibitem processing-->
5427
+
5389
5428
 
5390
5429
 
5391
5430
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module NIST
3
- VERSION = "1.2.8"
3
+ VERSION = "1.2.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2020-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities