metanorma-iso 1.5.8 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f062c8a45b1571a860957f18b17486aeeb235b0b9bc63fe2dced19bfb87cfee7
|
4
|
+
data.tar.gz: 330063e5d378fedb3b4e40da8b3ab577ba5d64e0ee0171699657eab00bca35b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffa2c512604cfb1cc4933d854df04a7690aecbdddf0df8b09aa74b2d0d4dd7534f2ec33d0eeb54525f3edddc67e4851f7fffb0282c0ddc889b9d81d6b507a370
|
7
|
+
data.tar.gz: 41fb639fb4076cd238872f8411734e51b7647123a26b4ed05ab948d58b32c1df57f7d8d874b178cb3b5f35cdb9a6efaa3f7c5fb3f59068820797101b34a24bd9
|
@@ -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>
|
@@ -18,18 +18,9 @@ module Asciidoctor
|
|
18
18
|
xml.updates_document_type a
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
24
|
-
org.name "International Organization for Standardization"
|
25
|
-
org.abbreviation "ISO"
|
26
|
-
elsif ["IEC",
|
27
|
-
"International Electrotechnical Commission"].include? orgname
|
28
|
-
org.name "International Electrotechnical Commission"
|
29
|
-
org.abbreviation "IEC"
|
30
|
-
else
|
31
|
-
org.name orgname
|
32
|
-
end
|
21
|
+
def org_abbrev
|
22
|
+
{ "International Organization for Standardization" => "ISO",
|
23
|
+
"International Electrotechnical Commission" => "IEC" }
|
33
24
|
end
|
34
25
|
|
35
26
|
def metadata_author(node, xml)
|
@@ -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>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
<define name="preface">
|
254
254
|
<element name="preface">
|
255
255
|
<optional>
|
256
|
-
<ref name="
|
256
|
+
<ref name="abstract"/>
|
257
257
|
</optional>
|
258
258
|
<ref name="foreword"/>
|
259
259
|
<optional>
|
@@ -405,6 +405,13 @@
|
|
405
405
|
-->
|
406
406
|
<define name="iso-standard">
|
407
407
|
<element name="iso-standard">
|
408
|
+
<attribute name="version"/>
|
409
|
+
<attribute name="type">
|
410
|
+
<choice>
|
411
|
+
<value>semantic</value>
|
412
|
+
<value>presentation</value>
|
413
|
+
</choice>
|
414
|
+
</attribute>
|
408
415
|
<ref name="bibdata"/>
|
409
416
|
<zeroOrMore>
|
410
417
|
<ref name="termdocsource"/>
|
@@ -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>
|