metanorma-nist 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/nist/basicdoc.rng +4 -11
- data/lib/asciidoctor/nist/isodoc.rng +13 -6
- data/lib/asciidoctor/nist/nist.rng +8 -1
- data/lib/isodoc/nist/metadata_id.rb +2 -0
- data/lib/isodoc/nist/nist.cswp.xsl +143 -19
- data/lib/isodoc/nist/nist.sp.xsl +170 -19
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fccac1954f210d0d2d8c3bc75a3061c258e6845506b8bac3459eedbf5d96081
|
4
|
+
data.tar.gz: 6e83a19e2381028a6542f3df7d18a44665c3139639125d64f9a08a796a8aee31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd062e38d19de3e2b1661726c3817cddbc83f24bcd4778e407fff66b19d0e6201f430f243ac8b53e831ee8718b62eccb35807620cdfea45991266f312d544d62
|
7
|
+
data.tar.gz: 35e16075338432c4b5c33568a2f0e474b0a3f7a37f8b18105d4950608f69e90f26d75ab088ce5c0c5a38e40372e836409e41024dd8b37df1489ac0d4337e16c9
|
@@ -158,17 +158,7 @@
|
|
158
158
|
<data type="ID"/>
|
159
159
|
</attribute>
|
160
160
|
<oneOrMore>
|
161
|
-
<
|
162
|
-
<ref name="formula"/>
|
163
|
-
<ref name="ul"/>
|
164
|
-
<ref name="ol"/>
|
165
|
-
<ref name="dl"/>
|
166
|
-
<ref name="quote"/>
|
167
|
-
<ref name="sourcecode"/>
|
168
|
-
<ref name="paragraph"/>
|
169
|
-
<ref name="table"/>
|
170
|
-
<ref name="figure"/>
|
171
|
-
</choice>
|
161
|
+
<ref name="paragraph"/>
|
172
162
|
</oneOrMore>
|
173
163
|
</element>
|
174
164
|
</define>
|
@@ -1028,6 +1018,9 @@
|
|
1028
1018
|
<value>alphabet_upper</value>
|
1029
1019
|
</choice>
|
1030
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1031
1024
|
<oneOrMore>
|
1032
1025
|
<ref name="li"/>
|
1033
1026
|
</oneOrMore>
|
@@ -64,6 +64,11 @@
|
|
64
64
|
</choice>
|
65
65
|
</attribute>
|
66
66
|
</optional>
|
67
|
+
<optional>
|
68
|
+
<attribute name="droploc">
|
69
|
+
<data type="boolean"/>
|
70
|
+
</attribute>
|
71
|
+
</optional>
|
67
72
|
<text/>
|
68
73
|
</element>
|
69
74
|
</define>
|
@@ -859,6 +864,13 @@
|
|
859
864
|
</define>
|
860
865
|
<define name="standard-document">
|
861
866
|
<element name="standard-document">
|
867
|
+
<attribute name="version"/>
|
868
|
+
<attribute name="type">
|
869
|
+
<choice>
|
870
|
+
<value>semantic</value>
|
871
|
+
<value>presentation</value>
|
872
|
+
</choice>
|
873
|
+
</attribute>
|
862
874
|
<ref name="bibdata"/>
|
863
875
|
<optional>
|
864
876
|
<ref name="boilerplate"/>
|
@@ -880,7 +892,7 @@
|
|
880
892
|
<oneOrMore>
|
881
893
|
<choice>
|
882
894
|
<ref name="content"/>
|
883
|
-
<ref name="
|
895
|
+
<ref name="abstract"/>
|
884
896
|
<ref name="foreword"/>
|
885
897
|
<ref name="introduction"/>
|
886
898
|
<ref name="acknowledgements"/>
|
@@ -1481,11 +1493,6 @@
|
|
1481
1493
|
</optional>
|
1482
1494
|
</element>
|
1483
1495
|
</define>
|
1484
|
-
<define name="preface_abstract">
|
1485
|
-
<element name="abstract">
|
1486
|
-
<ref name="Basic-Section"/>
|
1487
|
-
</element>
|
1488
|
-
</define>
|
1489
1496
|
<define name="term-clause">
|
1490
1497
|
<element name="clause">
|
1491
1498
|
<optional>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<define name="preface">
|
35
35
|
<element name="preface">
|
36
36
|
<optional>
|
37
|
-
<ref name="
|
37
|
+
<ref name="abstract"/>
|
38
38
|
</optional>
|
39
39
|
<optional>
|
40
40
|
<ref name="foreword"/>
|
@@ -182,6 +182,13 @@
|
|
182
182
|
</define>
|
183
183
|
<define name="nist-standard">
|
184
184
|
<element name="nist-standard">
|
185
|
+
<attribute name="version"/>
|
186
|
+
<attribute name="type">
|
187
|
+
<choice>
|
188
|
+
<value>semantic</value>
|
189
|
+
<value>presentation</value>
|
190
|
+
</choice>
|
191
|
+
</attribute>
|
185
192
|
<ref name="bibdata"/>
|
186
193
|
<zeroOrMore>
|
187
194
|
<ref name="termdocsource"/>
|
@@ -1090,6 +1090,12 @@
|
|
1090
1090
|
|
1091
1091
|
</title-edition>
|
1092
1092
|
|
1093
|
+
<title-edition lang="fr">
|
1094
|
+
|
1095
|
+
<xsl:text>Édition </xsl:text>
|
1096
|
+
|
1097
|
+
</title-edition>
|
1098
|
+
|
1093
1099
|
|
1094
1100
|
<title-toc lang="en">
|
1095
1101
|
|
@@ -1198,7 +1204,9 @@
|
|
1198
1204
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1199
1205
|
</xsl:otherwise>
|
1200
1206
|
</xsl:choose>
|
1201
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1207
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1208
|
+
|
1209
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1202
1210
|
|
1203
1211
|
|
1204
1212
|
|
@@ -3145,12 +3153,101 @@
|
|
3145
3153
|
|
3146
3154
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3147
3155
|
</fo:block>
|
3148
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3156
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3149
3157
|
<xsl:apply-templates mode="contents"/>
|
3150
3158
|
<xsl:text> </xsl:text>
|
3151
|
-
</xsl:template><xsl:template match="
|
3159
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3160
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3161
|
+
<xsl:text> </xsl:text>
|
3162
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3152
3163
|
<xsl:value-of select="."/>
|
3153
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3164
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3165
|
+
<xsl:value-of select="."/>
|
3166
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3167
|
+
<xsl:apply-templates mode="contents"/>
|
3168
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3169
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3170
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3171
|
+
<xsl:apply-templates select="."/>
|
3172
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3173
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3174
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3175
|
+
<xsl:param name="contents"/>
|
3176
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3177
|
+
<fo:bookmark-tree>
|
3178
|
+
<xsl:choose>
|
3179
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3180
|
+
<xsl:choose>
|
3181
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3182
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3183
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3184
|
+
<fo:bookmark-title>
|
3185
|
+
<xsl:variable name="bookmark-title_">
|
3186
|
+
<xsl:choose>
|
3187
|
+
<xsl:when test="@lang = 'en'">
|
3188
|
+
|
3189
|
+
|
3190
|
+
</xsl:when>
|
3191
|
+
<xsl:when test="@lang = 'fr'">
|
3192
|
+
|
3193
|
+
|
3194
|
+
</xsl:when>
|
3195
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3196
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3197
|
+
</xsl:choose>
|
3198
|
+
</xsl:variable>
|
3199
|
+
<xsl:choose>
|
3200
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3201
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3202
|
+
</xsl:when>
|
3203
|
+
<xsl:otherwise>
|
3204
|
+
<xsl:choose>
|
3205
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3206
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3207
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3208
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3209
|
+
</xsl:choose>
|
3210
|
+
</xsl:otherwise>
|
3211
|
+
</xsl:choose>
|
3212
|
+
</fo:bookmark-title>
|
3213
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3214
|
+
</fo:bookmark>
|
3215
|
+
|
3216
|
+
</xsl:for-each>
|
3217
|
+
</xsl:when>
|
3218
|
+
<xsl:otherwise>
|
3219
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3220
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3221
|
+
</xsl:for-each>
|
3222
|
+
</xsl:otherwise>
|
3223
|
+
</xsl:choose>
|
3224
|
+
</xsl:when>
|
3225
|
+
<xsl:otherwise>
|
3226
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3227
|
+
</xsl:otherwise>
|
3228
|
+
</xsl:choose>
|
3229
|
+
|
3230
|
+
|
3231
|
+
|
3232
|
+
|
3233
|
+
|
3234
|
+
|
3235
|
+
|
3236
|
+
|
3237
|
+
</fo:bookmark-tree>
|
3238
|
+
</xsl:if>
|
3239
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3240
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3241
|
+
<fo:bookmark-title>
|
3242
|
+
<xsl:if test="@section != ''">
|
3243
|
+
<xsl:value-of select="@section"/>
|
3244
|
+
<xsl:text> </xsl:text>
|
3245
|
+
</xsl:if>
|
3246
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3247
|
+
</fo:bookmark-title>
|
3248
|
+
<xsl:apply-templates mode="bookmark"/>
|
3249
|
+
</fo:bookmark>
|
3250
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3154
3251
|
<xsl:if test="normalize-space() != ''">
|
3155
3252
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3156
3253
|
|
@@ -3212,7 +3309,7 @@
|
|
3212
3309
|
<xsl:apply-templates/>
|
3213
3310
|
</xsl:otherwise>
|
3214
3311
|
</xsl:choose>
|
3215
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3312
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3216
3313
|
<xsl:text> </xsl:text>
|
3217
3314
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3218
3315
|
<xsl:copy>
|
@@ -3819,20 +3916,29 @@
|
|
3819
3916
|
<!-- 0xA0 to space replacement -->
|
3820
3917
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3821
3918
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3822
|
-
<
|
3823
|
-
<xsl:
|
3824
|
-
<
|
3825
|
-
<xsl:
|
3826
|
-
<xsl:
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
|
3919
|
+
<xsl:choose>
|
3920
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3921
|
+
<fo:block-container>
|
3922
|
+
<xsl:attribute name="margin-left">
|
3923
|
+
<xsl:choose>
|
3924
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3925
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3926
|
+
</xsl:choose>
|
3927
|
+
</xsl:attribute>
|
3928
|
+
|
3929
|
+
<fo:block-container margin-left="0mm">
|
3930
|
+
<fo:block>
|
3931
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3932
|
+
</fo:block>
|
3933
|
+
</fo:block-container>
|
3934
|
+
</fo:block-container>
|
3935
|
+
</xsl:when>
|
3936
|
+
<xsl:otherwise>
|
3937
|
+
<fo:block>
|
3938
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3939
|
+
</fo:block>
|
3940
|
+
</xsl:otherwise>
|
3941
|
+
</xsl:choose>
|
3836
3942
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3837
3943
|
<!-- <row>
|
3838
3944
|
<date>05-07-2013</date>
|
@@ -4133,6 +4239,7 @@
|
|
4133
4239
|
|
4134
4240
|
|
4135
4241
|
|
4242
|
+
|
4136
4243
|
</xsl:variable>
|
4137
4244
|
<xsl:if test="$documentNS != $XSLNS">
|
4138
4245
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4158,4 +4265,21 @@
|
|
4158
4265
|
</xsl:otherwise>
|
4159
4266
|
</xsl:choose>
|
4160
4267
|
</xsl:attribute>
|
4268
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4269
|
+
<xsl:param name="text"/>
|
4270
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4271
|
+
<xsl:if test="string-length($text) > 0">
|
4272
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4273
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4274
|
+
<xsl:if test="$char = '®'">
|
4275
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4276
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4277
|
+
</xsl:if>
|
4278
|
+
<xsl:value-of select="$char"/>
|
4279
|
+
</fo:inline>
|
4280
|
+
<xsl:call-template name="add-letter-spacing">
|
4281
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4282
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4283
|
+
</xsl:call-template>
|
4284
|
+
</xsl:if>
|
4161
4285
|
</xsl:template></xsl:stylesheet>
|
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -2173,6 +2173,12 @@
|
|
2173
2173
|
|
2174
2174
|
</title-edition>
|
2175
2175
|
|
2176
|
+
<title-edition lang="fr">
|
2177
|
+
|
2178
|
+
<xsl:text>Édition </xsl:text>
|
2179
|
+
|
2180
|
+
</title-edition>
|
2181
|
+
|
2176
2182
|
|
2177
2183
|
<title-toc lang="en">
|
2178
2184
|
|
@@ -2281,7 +2287,9 @@
|
|
2281
2287
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2282
2288
|
</xsl:otherwise>
|
2283
2289
|
</xsl:choose>
|
2284
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
2290
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
2291
|
+
|
2292
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2285
2293
|
|
2286
2294
|
|
2287
2295
|
|
@@ -4232,12 +4240,128 @@
|
|
4232
4240
|
|
4233
4241
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4234
4242
|
</fo:block>
|
4235
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4243
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4236
4244
|
<xsl:apply-templates mode="contents"/>
|
4237
4245
|
<xsl:text> </xsl:text>
|
4238
|
-
</xsl:template><xsl:template match="
|
4246
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4247
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4248
|
+
<xsl:text> </xsl:text>
|
4249
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4250
|
+
<xsl:value-of select="."/>
|
4251
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4239
4252
|
<xsl:value-of select="."/>
|
4240
|
-
</xsl:template><xsl:template match="
|
4253
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4254
|
+
<xsl:apply-templates mode="contents"/>
|
4255
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4256
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4257
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4258
|
+
<xsl:apply-templates select="."/>
|
4259
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4260
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4261
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4262
|
+
<xsl:param name="contents"/>
|
4263
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4264
|
+
<fo:bookmark-tree>
|
4265
|
+
<xsl:choose>
|
4266
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4267
|
+
<xsl:choose>
|
4268
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4269
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4270
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4271
|
+
<fo:bookmark-title>
|
4272
|
+
<xsl:variable name="bookmark-title_">
|
4273
|
+
<xsl:choose>
|
4274
|
+
<xsl:when test="@lang = 'en'">
|
4275
|
+
|
4276
|
+
|
4277
|
+
</xsl:when>
|
4278
|
+
<xsl:when test="@lang = 'fr'">
|
4279
|
+
|
4280
|
+
|
4281
|
+
</xsl:when>
|
4282
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4283
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4284
|
+
</xsl:choose>
|
4285
|
+
</xsl:variable>
|
4286
|
+
<xsl:choose>
|
4287
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4288
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4289
|
+
</xsl:when>
|
4290
|
+
<xsl:otherwise>
|
4291
|
+
<xsl:choose>
|
4292
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4293
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4294
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4295
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4296
|
+
</xsl:choose>
|
4297
|
+
</xsl:otherwise>
|
4298
|
+
</xsl:choose>
|
4299
|
+
</fo:bookmark-title>
|
4300
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4301
|
+
</fo:bookmark>
|
4302
|
+
|
4303
|
+
</xsl:for-each>
|
4304
|
+
</xsl:when>
|
4305
|
+
<xsl:otherwise>
|
4306
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4307
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4308
|
+
</xsl:for-each>
|
4309
|
+
</xsl:otherwise>
|
4310
|
+
</xsl:choose>
|
4311
|
+
</xsl:when>
|
4312
|
+
<xsl:otherwise>
|
4313
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4314
|
+
</xsl:otherwise>
|
4315
|
+
</xsl:choose>
|
4316
|
+
|
4317
|
+
|
4318
|
+
|
4319
|
+
<xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4320
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4321
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4322
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4323
|
+
<fo:bookmark internal-destination="{@id}">
|
4324
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
|
4325
|
+
</fo:bookmark>
|
4326
|
+
</xsl:for-each>
|
4327
|
+
</fo:bookmark>
|
4328
|
+
</xsl:if>
|
4329
|
+
|
4330
|
+
|
4331
|
+
|
4332
|
+
<xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4333
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4334
|
+
<fo:bookmark-title>
|
4335
|
+
<xsl:choose>
|
4336
|
+
<xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
|
4337
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4338
|
+
</xsl:choose>
|
4339
|
+
</fo:bookmark-title>
|
4340
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4341
|
+
<fo:bookmark internal-destination="{@id}">
|
4342
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
|
4343
|
+
</fo:bookmark>
|
4344
|
+
</xsl:for-each>
|
4345
|
+
</fo:bookmark>
|
4346
|
+
</xsl:if>
|
4347
|
+
|
4348
|
+
|
4349
|
+
|
4350
|
+
|
4351
|
+
</fo:bookmark-tree>
|
4352
|
+
</xsl:if>
|
4353
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4354
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4355
|
+
<fo:bookmark-title>
|
4356
|
+
<xsl:if test="@section != ''">
|
4357
|
+
<xsl:value-of select="@section"/>
|
4358
|
+
<xsl:text> </xsl:text>
|
4359
|
+
</xsl:if>
|
4360
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4361
|
+
</fo:bookmark-title>
|
4362
|
+
<xsl:apply-templates mode="bookmark"/>
|
4363
|
+
</fo:bookmark>
|
4364
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
4241
4365
|
<xsl:if test="normalize-space() != ''">
|
4242
4366
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4243
4367
|
|
@@ -4299,7 +4423,7 @@
|
|
4299
4423
|
<xsl:apply-templates/>
|
4300
4424
|
</xsl:otherwise>
|
4301
4425
|
</xsl:choose>
|
4302
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4426
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4303
4427
|
<xsl:text> </xsl:text>
|
4304
4428
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4305
4429
|
<xsl:copy>
|
@@ -4904,20 +5028,29 @@
|
|
4904
5028
|
<!-- 0xA0 to space replacement -->
|
4905
5029
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4906
5030
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4907
|
-
<
|
4908
|
-
<xsl:
|
4909
|
-
<
|
4910
|
-
<xsl:
|
4911
|
-
<xsl:
|
4912
|
-
|
4913
|
-
|
4914
|
-
|
4915
|
-
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
5031
|
+
<xsl:choose>
|
5032
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5033
|
+
<fo:block-container>
|
5034
|
+
<xsl:attribute name="margin-left">
|
5035
|
+
<xsl:choose>
|
5036
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5037
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5038
|
+
</xsl:choose>
|
5039
|
+
</xsl:attribute>
|
5040
|
+
|
5041
|
+
<fo:block-container margin-left="0mm">
|
5042
|
+
<fo:block>
|
5043
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5044
|
+
</fo:block>
|
5045
|
+
</fo:block-container>
|
5046
|
+
</fo:block-container>
|
5047
|
+
</xsl:when>
|
5048
|
+
<xsl:otherwise>
|
5049
|
+
<fo:block>
|
5050
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5051
|
+
</fo:block>
|
5052
|
+
</xsl:otherwise>
|
5053
|
+
</xsl:choose>
|
4921
5054
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4922
5055
|
<!-- <row>
|
4923
5056
|
<date>05-07-2013</date>
|
@@ -5218,6 +5351,7 @@
|
|
5218
5351
|
|
5219
5352
|
|
5220
5353
|
|
5354
|
+
|
5221
5355
|
</xsl:variable>
|
5222
5356
|
<xsl:if test="$documentNS != $XSLNS">
|
5223
5357
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5243,4 +5377,21 @@
|
|
5243
5377
|
</xsl:otherwise>
|
5244
5378
|
</xsl:choose>
|
5245
5379
|
</xsl:attribute>
|
5380
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5381
|
+
<xsl:param name="text"/>
|
5382
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5383
|
+
<xsl:if test="string-length($text) > 0">
|
5384
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5385
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5386
|
+
<xsl:if test="$char = '®'">
|
5387
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5388
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5389
|
+
</xsl:if>
|
5390
|
+
<xsl:value-of select="$char"/>
|
5391
|
+
</fo:inline>
|
5392
|
+
<xsl:call-template name="add-letter-spacing">
|
5393
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5394
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5395
|
+
</xsl:call-template>
|
5396
|
+
</xsl:if>
|
5246
5397
|
</xsl:template></xsl:stylesheet>
|
data/metanorma-nist.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "iso-639"
|
31
31
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
33
|
+
spec.add_dependency "metanorma-standoc", "~> 1.6.0"
|
34
34
|
spec.add_dependency "isodoc", "~> 1.2.0"
|
35
35
|
#spec.add_dependency "relaton-nist", "~> 0.3.0"
|
36
36
|
|
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.
|
4
|
+
version: 1.2.4
|
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-09-
|
11
|
+
date: 2020-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.6.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.6.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: isodoc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|