metanorma-iso 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/basicdoc.rng +4 -11
- data/lib/asciidoctor/iso/front.rb +3 -12
- data/lib/asciidoctor/iso/isodoc.rng +13 -6
- data/lib/asciidoctor/iso/isostandard.rng +8 -1
- data/lib/isodoc/iso/iso.amendment.xsl +242 -49
- data/lib/isodoc/iso/iso.international-standard.xsl +242 -49
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/asciidoctor-iso/amd_spec.rb +7 -7
- data/spec/asciidoctor-iso/base_spec.rb +6 -6
- data/spec/isodoc/amd_spec.rb +18 -3
- data/spec/isodoc/blocks_spec.rb +1 -1
- data/spec/isodoc/i18n_spec.rb +17 -4
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/isodoc/postproc_spec.rb +4 -1
- data/spec/isodoc/ref_spec.rb +4 -1
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +11 -11
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +4 -4
@@ -295,6 +295,10 @@
|
|
295
295
|
|
296
296
|
<xsl:call-template name="addPDFUAmeta"/>
|
297
297
|
|
298
|
+
<xsl:call-template name="addBookmarks">
|
299
|
+
<xsl:with-param name="contents" select="$contents"/>
|
300
|
+
</xsl:call-template>
|
301
|
+
|
298
302
|
<!-- cover page -->
|
299
303
|
<xsl:choose>
|
300
304
|
<xsl:when test="$stage-abbreviation != ''">
|
@@ -541,7 +545,14 @@
|
|
541
545
|
</fo:table-cell>
|
542
546
|
<fo:table-cell>
|
543
547
|
<fo:block text-align="left">
|
544
|
-
<xsl:
|
548
|
+
<xsl:choose>
|
549
|
+
<xsl:when test="$doctype = 'amendment'">
|
550
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
|
551
|
+
</xsl:when>
|
552
|
+
<xsl:otherwise>
|
553
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
554
|
+
</xsl:otherwise>
|
555
|
+
</xsl:choose>
|
545
556
|
</fo:block>
|
546
557
|
</fo:table-cell>
|
547
558
|
<fo:table-cell>
|
@@ -553,24 +564,50 @@
|
|
553
564
|
<fo:table-row height="42mm">
|
554
565
|
<fo:table-cell number-columns-spanned="3" font-size="10pt" line-height="1.2">
|
555
566
|
<fo:block text-align="right">
|
556
|
-
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
567
|
+
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'D' or $stage-abbreviation = 'published'">
|
557
568
|
<xsl:call-template name="printEdition"/>
|
558
569
|
</xsl:if>
|
559
570
|
<xsl:choose>
|
560
571
|
<xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
|
561
572
|
<xsl:value-of select="$linebreak"/>
|
562
573
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
|
563
|
-
</xsl:when>
|
574
|
+
</xsl:when>
|
575
|
+
<xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:iso-standard/iso:bibdata/iso:date[@type = 'created']">
|
576
|
+
<xsl:value-of select="$linebreak"/>
|
577
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'created']"/>
|
578
|
+
</xsl:when>
|
564
579
|
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
565
580
|
<xsl:value-of select="$linebreak"/>
|
566
581
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
567
582
|
</xsl:when>
|
568
583
|
</xsl:choose>
|
569
|
-
|
570
|
-
|
584
|
+
</fo:block>
|
585
|
+
<!-- <xsl:value-of select="$linebreak"/>
|
586
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
|
587
|
+
<xsl:if test="$doctype = 'amendment'">
|
588
|
+
<fo:block text-align="right" margin-right="0.5mm">
|
589
|
+
<fo:block font-weight="bold" margin-top="4pt">
|
590
|
+
<xsl:variable name="title-amendment">
|
591
|
+
<xsl:call-template name="getTitle">
|
592
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
593
|
+
</xsl:call-template>
|
594
|
+
</xsl:variable>
|
595
|
+
<xsl:value-of select="$title-amendment"/><xsl:text> </xsl:text>
|
596
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
597
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
598
|
+
<xsl:value-of select="$amendment-number"/><xsl:text> </xsl:text>
|
599
|
+
</xsl:if>
|
600
|
+
</fo:block>
|
601
|
+
<fo:block>
|
602
|
+
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
|
603
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
|
604
|
+
</xsl:if>
|
605
|
+
</fo:block>
|
571
606
|
</fo:block>
|
607
|
+
</xsl:if>
|
572
608
|
</fo:table-cell>
|
573
609
|
</fo:table-row>
|
610
|
+
|
574
611
|
</fo:table-body>
|
575
612
|
</fo:table>
|
576
613
|
|
@@ -639,6 +676,12 @@
|
|
639
676
|
</xsl:if>
|
640
677
|
<xsl:value-of select="$title-part"/>
|
641
678
|
</xsl:if> -->
|
679
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
680
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
681
|
+
<fo:block margin-right="-5mm" margin-top="12pt">
|
682
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
683
|
+
</fo:block>
|
684
|
+
</xsl:if>
|
642
685
|
</fo:block>
|
643
686
|
|
644
687
|
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -653,6 +696,15 @@
|
|
653
696
|
|
654
697
|
<xsl:call-template name="printTitlePartFr"/>
|
655
698
|
|
699
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
|
700
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
701
|
+
<fo:block margin-right="-5mm" margin-top="6pt">
|
702
|
+
<xsl:call-template name="printAmendmentTitle">
|
703
|
+
<xsl:with-param name="lang" select="'fr'"/>
|
704
|
+
</xsl:call-template>
|
705
|
+
</fo:block>
|
706
|
+
</xsl:if>
|
707
|
+
|
656
708
|
</fo:block>
|
657
709
|
</fo:block>
|
658
710
|
</fo:block-container>
|
@@ -966,7 +1018,7 @@
|
|
966
1018
|
</xsl:if>
|
967
1019
|
|
968
1020
|
<xsl:variable name="margin-left">12</xsl:variable>
|
969
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
1021
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
970
1022
|
|
971
1023
|
<fo:block>
|
972
1024
|
<xsl:if test="@level = 1">
|
@@ -996,9 +1048,9 @@
|
|
996
1048
|
</fo:list-item-label>
|
997
1049
|
<fo:list-item-body start-indent="body-start()">
|
998
1050
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
999
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
1051
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1000
1052
|
|
1001
|
-
<xsl:apply-templates/>
|
1053
|
+
<xsl:apply-templates select="title"/>
|
1002
1054
|
|
1003
1055
|
<fo:inline keep-together.within-line="always">
|
1004
1056
|
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
@@ -1067,19 +1119,8 @@
|
|
1067
1119
|
|
1068
1120
|
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
1069
1121
|
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1070
|
-
<fo:block
|
1071
|
-
<xsl:
|
1072
|
-
<xsl:call-template name="getTitle">
|
1073
|
-
<xsl:with-param name="name" select="'title-amendment'"/>
|
1074
|
-
</xsl:call-template>
|
1075
|
-
</xsl:variable>
|
1076
|
-
<xsl:value-of select="$title-amendment"/>
|
1077
|
-
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1078
|
-
<xsl:if test="normalize-space($amendment-number) != ''">
|
1079
|
-
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1080
|
-
</xsl:if>
|
1081
|
-
<xsl:text>: </xsl:text>
|
1082
|
-
<xsl:value-of select="$title-amd"/>
|
1122
|
+
<fo:block margin-top="12pt">
|
1123
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
1083
1124
|
</fo:block>
|
1084
1125
|
</xsl:if>
|
1085
1126
|
|
@@ -1174,6 +1215,27 @@
|
|
1174
1215
|
<xsl:apply-templates/>
|
1175
1216
|
</xsl:template>
|
1176
1217
|
|
1218
|
+
<xsl:template name="printAmendmentTitle">
|
1219
|
+
<xsl:param name="lang" select="'en'"/>
|
1220
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
|
1221
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1222
|
+
<fo:block font-weight="normal" line-height="1.1">
|
1223
|
+
<xsl:variable name="title-amendment">
|
1224
|
+
<xsl:call-template name="getTitle">
|
1225
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
1226
|
+
</xsl:call-template>
|
1227
|
+
</xsl:variable>
|
1228
|
+
<xsl:value-of select="$title-amendment"/>
|
1229
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1230
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1231
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1232
|
+
</xsl:if>
|
1233
|
+
<xsl:text>: </xsl:text>
|
1234
|
+
<xsl:value-of select="$title-amd"/>
|
1235
|
+
</fo:block>
|
1236
|
+
</xsl:if>
|
1237
|
+
</xsl:template>
|
1238
|
+
|
1177
1239
|
<!-- ============================= -->
|
1178
1240
|
<!-- CONTENTS -->
|
1179
1241
|
<!-- ============================= -->
|
@@ -1198,9 +1260,7 @@
|
|
1198
1260
|
</xsl:variable>
|
1199
1261
|
|
1200
1262
|
<xsl:variable name="display">
|
1201
|
-
<xsl:choose>
|
1202
|
-
<xsl:when test="ancestor-or-self::iso:bibitem">false</xsl:when>
|
1203
|
-
<xsl:when test="ancestor-or-self::iso:term">false</xsl:when>
|
1263
|
+
<xsl:choose>
|
1204
1264
|
<xsl:when test="ancestor-or-self::iso:annex and $level >= 2">false</xsl:when>
|
1205
1265
|
<xsl:when test="$section = '' and $type = 'clause'">false</xsl:when>
|
1206
1266
|
<xsl:when test="$level <= 3">true</xsl:when>
|
@@ -1208,8 +1268,16 @@
|
|
1208
1268
|
</xsl:choose>
|
1209
1269
|
</xsl:variable>
|
1210
1270
|
|
1271
|
+
<xsl:variable name="skip">
|
1272
|
+
<xsl:choose>
|
1273
|
+
<xsl:when test="ancestor-or-self::iso:bibitem">true</xsl:when>
|
1274
|
+
<xsl:when test="ancestor-or-self::iso:term">true</xsl:when>
|
1275
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1276
|
+
</xsl:choose>
|
1277
|
+
</xsl:variable>
|
1278
|
+
|
1211
1279
|
|
1212
|
-
<xsl:if test="$
|
1280
|
+
<xsl:if test="$skip = 'false'">
|
1213
1281
|
|
1214
1282
|
<xsl:variable name="title">
|
1215
1283
|
<xsl:call-template name="getName"/>
|
@@ -1220,12 +1288,13 @@
|
|
1220
1288
|
<xsl:if test="ancestor-or-self::iso:annex">annex</xsl:if>
|
1221
1289
|
</xsl:variable>
|
1222
1290
|
|
1223
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}">
|
1224
|
-
<
|
1291
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
1292
|
+
<title>
|
1293
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
1294
|
+
</title>
|
1295
|
+
<xsl:apply-templates mode="contents"/>
|
1225
1296
|
</item>
|
1226
|
-
|
1227
|
-
</xsl:if>
|
1228
|
-
|
1297
|
+
</xsl:if>
|
1229
1298
|
</xsl:template>
|
1230
1299
|
|
1231
1300
|
|
@@ -1987,6 +2056,12 @@
|
|
1987
2056
|
|
1988
2057
|
</title-edition>
|
1989
2058
|
|
2059
|
+
<title-edition lang="fr">
|
2060
|
+
|
2061
|
+
<xsl:text>Édition </xsl:text>
|
2062
|
+
|
2063
|
+
</title-edition>
|
2064
|
+
|
1990
2065
|
|
1991
2066
|
<title-toc lang="en">
|
1992
2067
|
|
@@ -2099,7 +2174,9 @@
|
|
2099
2174
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2100
2175
|
</xsl:otherwise>
|
2101
2176
|
</xsl:choose>
|
2102
|
-
</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="
|
2177
|
+
</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">
|
2178
|
+
|
2179
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2103
2180
|
|
2104
2181
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2105
2182
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -4131,12 +4208,101 @@
|
|
4131
4208
|
|
4132
4209
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4133
4210
|
</fo:block>
|
4134
|
-
</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">
|
4211
|
+
</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">
|
4135
4212
|
<xsl:apply-templates mode="contents"/>
|
4136
4213
|
<xsl:text> </xsl:text>
|
4137
|
-
</xsl:template><xsl:template match="
|
4214
|
+
</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">
|
4215
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4216
|
+
<xsl:text> </xsl:text>
|
4217
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4218
|
+
<xsl:value-of select="."/>
|
4219
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4138
4220
|
<xsl:value-of select="."/>
|
4139
|
-
</xsl:template><xsl:template match="
|
4221
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4222
|
+
<xsl:apply-templates mode="contents"/>
|
4223
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4224
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4225
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4226
|
+
<xsl:apply-templates select="."/>
|
4227
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4228
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4229
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4230
|
+
<xsl:param name="contents"/>
|
4231
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4232
|
+
<fo:bookmark-tree>
|
4233
|
+
<xsl:choose>
|
4234
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4235
|
+
<xsl:choose>
|
4236
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4237
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4238
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4239
|
+
<fo:bookmark-title>
|
4240
|
+
<xsl:variable name="bookmark-title_">
|
4241
|
+
<xsl:choose>
|
4242
|
+
<xsl:when test="@lang = 'en'">
|
4243
|
+
|
4244
|
+
|
4245
|
+
</xsl:when>
|
4246
|
+
<xsl:when test="@lang = 'fr'">
|
4247
|
+
|
4248
|
+
|
4249
|
+
</xsl:when>
|
4250
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4251
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4252
|
+
</xsl:choose>
|
4253
|
+
</xsl:variable>
|
4254
|
+
<xsl:choose>
|
4255
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4256
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4257
|
+
</xsl:when>
|
4258
|
+
<xsl:otherwise>
|
4259
|
+
<xsl:choose>
|
4260
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4261
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4262
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4263
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4264
|
+
</xsl:choose>
|
4265
|
+
</xsl:otherwise>
|
4266
|
+
</xsl:choose>
|
4267
|
+
</fo:bookmark-title>
|
4268
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4269
|
+
</fo:bookmark>
|
4270
|
+
|
4271
|
+
</xsl:for-each>
|
4272
|
+
</xsl:when>
|
4273
|
+
<xsl:otherwise>
|
4274
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4275
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4276
|
+
</xsl:for-each>
|
4277
|
+
</xsl:otherwise>
|
4278
|
+
</xsl:choose>
|
4279
|
+
</xsl:when>
|
4280
|
+
<xsl:otherwise>
|
4281
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4282
|
+
</xsl:otherwise>
|
4283
|
+
</xsl:choose>
|
4284
|
+
|
4285
|
+
|
4286
|
+
|
4287
|
+
|
4288
|
+
|
4289
|
+
|
4290
|
+
|
4291
|
+
|
4292
|
+
</fo:bookmark-tree>
|
4293
|
+
</xsl:if>
|
4294
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4295
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4296
|
+
<fo:bookmark-title>
|
4297
|
+
<xsl:if test="@section != ''">
|
4298
|
+
<xsl:value-of select="@section"/>
|
4299
|
+
<xsl:text> </xsl:text>
|
4300
|
+
</xsl:if>
|
4301
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4302
|
+
</fo:bookmark-title>
|
4303
|
+
<xsl:apply-templates mode="bookmark"/>
|
4304
|
+
</fo:bookmark>
|
4305
|
+
</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">
|
4140
4306
|
<xsl:if test="normalize-space() != ''">
|
4141
4307
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4142
4308
|
|
@@ -4194,7 +4360,7 @@
|
|
4194
4360
|
<xsl:apply-templates/>
|
4195
4361
|
</xsl:otherwise>
|
4196
4362
|
</xsl:choose>
|
4197
|
-
</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">
|
4363
|
+
</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">
|
4198
4364
|
<xsl:text> </xsl:text>
|
4199
4365
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4200
4366
|
<xsl:copy>
|
@@ -4801,20 +4967,29 @@
|
|
4801
4967
|
<!-- 0xA0 to space replacement -->
|
4802
4968
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4803
4969
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4804
|
-
<
|
4805
|
-
<xsl:
|
4806
|
-
<
|
4807
|
-
<xsl:
|
4808
|
-
<xsl:
|
4809
|
-
|
4810
|
-
|
4811
|
-
|
4812
|
-
|
4813
|
-
|
4814
|
-
|
4815
|
-
|
4816
|
-
|
4817
|
-
|
4970
|
+
<xsl:choose>
|
4971
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4972
|
+
<fo:block-container>
|
4973
|
+
<xsl:attribute name="margin-left">
|
4974
|
+
<xsl:choose>
|
4975
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4976
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4977
|
+
</xsl:choose>
|
4978
|
+
</xsl:attribute>
|
4979
|
+
|
4980
|
+
<fo:block-container margin-left="0mm">
|
4981
|
+
<fo:block>
|
4982
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4983
|
+
</fo:block>
|
4984
|
+
</fo:block-container>
|
4985
|
+
</fo:block-container>
|
4986
|
+
</xsl:when>
|
4987
|
+
<xsl:otherwise>
|
4988
|
+
<fo:block>
|
4989
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4990
|
+
</fo:block>
|
4991
|
+
</xsl:otherwise>
|
4992
|
+
</xsl:choose>
|
4818
4993
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4819
4994
|
<!-- <row>
|
4820
4995
|
<date>05-07-2013</date>
|
@@ -5112,6 +5287,7 @@
|
|
5112
5287
|
|
5113
5288
|
|
5114
5289
|
|
5290
|
+
|
5115
5291
|
</xsl:variable>
|
5116
5292
|
<xsl:if test="$documentNS != $XSLNS">
|
5117
5293
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5137,4 +5313,21 @@
|
|
5137
5313
|
</xsl:otherwise>
|
5138
5314
|
</xsl:choose>
|
5139
5315
|
</xsl:attribute>
|
5316
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5317
|
+
<xsl:param name="text"/>
|
5318
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5319
|
+
<xsl:if test="string-length($text) > 0">
|
5320
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5321
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5322
|
+
<xsl:if test="$char = '®'">
|
5323
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5324
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5325
|
+
</xsl:if>
|
5326
|
+
<xsl:value-of select="$char"/>
|
5327
|
+
</fo:inline>
|
5328
|
+
<xsl:call-template name="add-letter-spacing">
|
5329
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5330
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5331
|
+
</xsl:call-template>
|
5332
|
+
</xsl:if>
|
5140
5333
|
</xsl:template></xsl:stylesheet>
|
data/metanorma-iso.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.add_dependency "ruby-jing"
|
33
33
|
spec.add_dependency "isodoc", "~> 1.2.0"
|
34
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
34
|
+
spec.add_dependency "metanorma-standoc", "~> 1.6.0"
|
35
35
|
spec.add_dependency "tokenizer", "~> 0.3.0"
|
36
36
|
spec.add_dependency "twitter_cldr"
|
37
37
|
spec.add_dependency "mn2sts", "~> 1.5.0"
|
@@ -183,7 +183,7 @@ OUTPUT
|
|
183
183
|
:doctype: amendment
|
184
184
|
:updates-document-type: international-standard
|
185
185
|
INPUT
|
186
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
186
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
187
187
|
<bibdata type='standard'>
|
188
188
|
<title language='en' format='text/plain' type='main'>Introduction — Main Title — Title — Title Part — Mass fraction of
|
189
189
|
extraneous matter, milled rice (nonglutinous), sample dividers and
|
@@ -298,7 +298,7 @@ Author
|
|
298
298
|
:updates: ISO 17301-1:2030
|
299
299
|
:amendment-number: 1
|
300
300
|
INPUT
|
301
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
301
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
302
302
|
<bibdata type='standard'>
|
303
303
|
<docidentifier type='ISO'>ISO 17301-1:2030/CD Amd 1</docidentifier>
|
304
304
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
|
@@ -366,7 +366,7 @@ Author
|
|
366
366
|
:updates: ISO 17301-1:2030
|
367
367
|
:amendment-number: 1
|
368
368
|
INPUT
|
369
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
369
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
370
370
|
<bibdata type='standard'>
|
371
371
|
<docidentifier type='ISO'>ISO 17301-1:2030/DAmd 1</docidentifier>
|
372
372
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
|
@@ -433,7 +433,7 @@ Author
|
|
433
433
|
:updates: ISO 17301-1:2030
|
434
434
|
:amendment-number: 1
|
435
435
|
INPUT
|
436
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
436
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
437
437
|
<bibdata type='standard'>
|
438
438
|
<docidentifier type='ISO'>ISO 17301-1:2030/Amd 1</docidentifier>
|
439
439
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
|
@@ -501,7 +501,7 @@ Author
|
|
501
501
|
:updates: ISO 17301-1:2030
|
502
502
|
:corrigendum-number: 3
|
503
503
|
INPUT
|
504
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
504
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
505
505
|
<bibdata type='standard'>
|
506
506
|
<docidentifier type='ISO'>ISO 17301-1:2030/CD Cor.3</docidentifier>
|
507
507
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
|
@@ -569,7 +569,7 @@ Author
|
|
569
569
|
:updates: ISO 17301-1:2030
|
570
570
|
:corrigendum-number: 3
|
571
571
|
INPUT
|
572
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
572
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
573
573
|
<bibdata type='standard'>
|
574
574
|
<docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
|
575
575
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
|
@@ -636,7 +636,7 @@ Author
|
|
636
636
|
:updates: ISO 17301-1:2030
|
637
637
|
:corrigendum-number: 3
|
638
638
|
INPUT
|
639
|
-
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
639
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
|
640
640
|
<bibdata type='standard'>
|
641
641
|
<docidentifier type='ISO'>ISO 17301-1:2030/Cor.3</docidentifier>
|
642
642
|
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
|