metanorma-iso 1.5.8 → 1.5.13
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/.github/workflows/rake.yml +66 -0
- data/README.adoc +5 -6
- data/lib/asciidoctor/iso/base.rb +5 -0
- data/lib/asciidoctor/iso/basicdoc.rng +4 -11
- data/lib/asciidoctor/iso/boilerplate-fr.xml +40 -0
- data/lib/asciidoctor/iso/boilerplate.xml +1 -0
- data/lib/asciidoctor/iso/cleanup.rb +38 -0
- data/lib/asciidoctor/iso/front.rb +14 -15
- data/lib/asciidoctor/iso/isodoc.rng +27 -50
- data/lib/asciidoctor/iso/isostandard.rng +16 -1
- data/lib/asciidoctor/iso/validate.rb +1 -1
- data/lib/asciidoctor/iso/validate_section.rb +9 -0
- data/lib/isodoc/iso/base_convert.rb +2 -1
- data/lib/isodoc/iso/html/header.html +12 -24
- data/lib/isodoc/iso/html/htmlstyle.css +1 -1
- data/lib/isodoc/iso/html/htmlstyle.scss +1 -1
- data/lib/isodoc/iso/html/isodoc.css +42 -42
- data/lib/isodoc/iso/html/isodoc.scss +42 -42
- data/lib/isodoc/iso/html/style-human.css +14 -10
- data/lib/isodoc/iso/html/style-human.scss +7 -7
- data/lib/isodoc/iso/html/style-iso.css +12 -8
- data/lib/isodoc/iso/html/style-iso.scss +5 -5
- data/lib/isodoc/iso/html/wordstyle.css +67 -67
- data/lib/isodoc/iso/html/wordstyle.scss +67 -67
- data/lib/isodoc/iso/html_convert.rb +4 -0
- data/lib/isodoc/iso/i18n-en.yaml +4 -0
- data/lib/isodoc/iso/i18n-fr.yaml +5 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +5 -0
- data/lib/isodoc/iso/i18n.rb +10 -11
- data/lib/isodoc/iso/iso.amendment.xsl +739 -141
- data/lib/isodoc/iso/iso.international-standard.xsl +739 -141
- data/lib/isodoc/iso/metadata.rb +20 -19
- data/lib/isodoc/iso/word_convert.rb +4 -0
- data/lib/isodoc/iso/xref.rb +10 -0
- data/lib/metanorma/iso/fonts_manifest.yaml +6 -0
- data/lib/metanorma/iso/processor.rb +0 -9
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +7 -7
- data/spec/asciidoctor-iso/base_spec.rb +146 -18
- data/spec/asciidoctor-iso/blocks_spec.rb +1 -1
- data/spec/asciidoctor-iso/cleanup_spec.rb +4 -4
- data/spec/asciidoctor-iso/lists_spec.rb +6 -6
- data/spec/asciidoctor-iso/refs_spec.rb +174 -143
- data/spec/asciidoctor-iso/section_spec.rb +5 -0
- data/spec/asciidoctor-iso/validate_spec.rb +52 -15
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/isodoc/amd_spec.rb +191 -17
- data/spec/isodoc/blocks_spec.rb +2 -1
- data/spec/isodoc/i18n_spec.rb +13 -13
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/isodoc/metadata_spec.rb +172 -19
- data/spec/isodoc/postproc_spec.rb +3 -3
- data/spec/isodoc/ref_spec.rb +5 -5
- data/spec/isodoc/section_spec.rb +22 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +23 -11
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +22 -2
- metadata +10 -9
- data/.github/workflows/macos.yml +0 -41
- data/.github/workflows/ubuntu.yml +0 -45
- data/.github/workflows/windows.yml +0 -43
data/lib/isodoc/iso/i18n.rb
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Iso
|
3
3
|
class I18n < IsoDoc::I18n
|
4
|
-
def
|
5
|
-
y = if
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
4
|
+
def load_yaml1(lang, script)
|
5
|
+
y = if lang == "en"
|
6
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
|
7
|
+
elsif lang == "fr"
|
8
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-fr.yaml"))
|
9
|
+
elsif lang == "zh" && script == "Hans"
|
10
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-zh-Hans.yaml"))
|
11
|
+
else
|
12
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
|
13
|
+
end
|
15
14
|
super.merge(y)
|
16
15
|
end
|
17
16
|
end
|
@@ -17,7 +17,12 @@
|
|
17
17
|
|
18
18
|
<xsl:variable name="docidentifierISO" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
|
19
19
|
|
20
|
-
<xsl:variable name="
|
20
|
+
<xsl:variable name="all_rights_reserved">
|
21
|
+
<xsl:call-template name="getLocalizedString">
|
22
|
+
<xsl:with-param name="key">all_rights_reserved</xsl:with-param>
|
23
|
+
</xsl:call-template>
|
24
|
+
</xsl:variable>
|
25
|
+
<xsl:variable name="copyrightText" select="concat('© ISO ', /iso:iso-standard/iso:bibdata/iso:copyright/iso:from ,' – ', $all_rights_reserved)"/>
|
21
26
|
|
22
27
|
<xsl:variable name="lang-1st-letter_tmp" select="substring-before(substring-after(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-with-lang'], '('), ')')"/>
|
23
28
|
<xsl:variable name="lang-1st-letter" select="concat('(', $lang-1st-letter_tmp , ')')"/>
|
@@ -161,7 +166,10 @@
|
|
161
166
|
|
162
167
|
<xsl:template match="/">
|
163
168
|
<xsl:call-template name="namespaceCheck"/>
|
164
|
-
<fo:root font-family="Cambria, Times New Roman, Cambria Math,
|
169
|
+
<fo:root font-family="Cambria, Times New Roman, Cambria Math, Source Han Sans" font-size="11pt" xml:lang="{$lang}"> <!-- -->
|
170
|
+
<xsl:if test="$lang = 'zh'">
|
171
|
+
<xsl:attribute name="font-family">Source Han Sans, Times New Roman, Cambria Math</xsl:attribute>
|
172
|
+
</xsl:if>
|
165
173
|
<fo:layout-master-set>
|
166
174
|
|
167
175
|
<!-- cover page -->
|
@@ -295,6 +303,10 @@
|
|
295
303
|
|
296
304
|
<xsl:call-template name="addPDFUAmeta"/>
|
297
305
|
|
306
|
+
<xsl:call-template name="addBookmarks">
|
307
|
+
<xsl:with-param name="contents" select="$contents"/>
|
308
|
+
</xsl:call-template>
|
309
|
+
|
298
310
|
<!-- cover page -->
|
299
311
|
<xsl:choose>
|
300
312
|
<xsl:when test="$stage-abbreviation != ''">
|
@@ -372,8 +384,13 @@
|
|
372
384
|
</fo:block>
|
373
385
|
</fo:table-cell>
|
374
386
|
<fo:table-cell display-align="center">
|
375
|
-
<fo:block text-align="right">
|
376
|
-
|
387
|
+
<fo:block text-align="right">
|
388
|
+
<!-- Reference number -->
|
389
|
+
<fo:block>
|
390
|
+
<xsl:call-template name="getLocalizedString">
|
391
|
+
<xsl:with-param name="key">reference_number</xsl:with-param>
|
392
|
+
</xsl:call-template>
|
393
|
+
</fo:block>
|
377
394
|
<fo:block>
|
378
395
|
<xsl:value-of select="$ISOname"/>
|
379
396
|
</fo:block>
|
@@ -398,7 +415,15 @@
|
|
398
415
|
<fo:flow flow-name="xsl-region-body">
|
399
416
|
<fo:block-container>
|
400
417
|
<fo:block margin-top="-1mm" font-size="20pt" text-align="right">
|
401
|
-
<xsl:value-of select="$stage-fullname-uppercased"/>
|
418
|
+
<xsl:value-of select="$stage-fullname-uppercased"/>
|
419
|
+
<!-- <xsl:if test="$doctype = 'amendment'">
|
420
|
+
<xsl:variable name="title-amendment">
|
421
|
+
<xsl:call-template name="getTitle">
|
422
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
423
|
+
</xsl:call-template>
|
424
|
+
</xsl:variable>
|
425
|
+
<xsl:text> </xsl:text><xsl:value-of select="$title-amendment"/>
|
426
|
+
</xsl:if> -->
|
402
427
|
</fo:block>
|
403
428
|
<fo:block font-size="20pt" font-weight="bold" text-align="right">
|
404
429
|
<xsl:value-of select="$docidentifierISO"/>
|
@@ -473,16 +498,13 @@
|
|
473
498
|
|
474
499
|
<xsl:call-template name="printTitlePartEn"/>
|
475
500
|
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
<
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
</xsl:if>
|
484
|
-
<xsl:value-of select="$title-part"/>
|
485
|
-
</xsl:if> -->
|
501
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
502
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
503
|
+
<fo:block margin-top="12pt">
|
504
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
505
|
+
</fo:block>
|
506
|
+
</xsl:if>
|
507
|
+
|
486
508
|
</fo:block>
|
487
509
|
|
488
510
|
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -497,6 +519,15 @@
|
|
497
519
|
|
498
520
|
<xsl:call-template name="printTitlePartFr"/>
|
499
521
|
|
522
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
|
523
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
524
|
+
<fo:block margin-top="6pt">
|
525
|
+
<xsl:call-template name="printAmendmentTitle">
|
526
|
+
<xsl:with-param name="lang" select="'fr'"/>
|
527
|
+
</xsl:call-template>
|
528
|
+
</fo:block>
|
529
|
+
</xsl:if>
|
530
|
+
|
500
531
|
</fo:block>
|
501
532
|
</fo:block>
|
502
533
|
<fo:block margin-top="10mm">
|
@@ -541,7 +572,14 @@
|
|
541
572
|
</fo:table-cell>
|
542
573
|
<fo:table-cell>
|
543
574
|
<fo:block text-align="left">
|
544
|
-
<xsl:
|
575
|
+
<xsl:choose>
|
576
|
+
<xsl:when test="$doctype = 'amendment'">
|
577
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
|
578
|
+
</xsl:when>
|
579
|
+
<xsl:otherwise>
|
580
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
581
|
+
</xsl:otherwise>
|
582
|
+
</xsl:choose>
|
545
583
|
</fo:block>
|
546
584
|
</fo:table-cell>
|
547
585
|
<fo:table-cell>
|
@@ -553,24 +591,50 @@
|
|
553
591
|
<fo:table-row height="42mm">
|
554
592
|
<fo:table-cell number-columns-spanned="3" font-size="10pt" line-height="1.2">
|
555
593
|
<fo:block text-align="right">
|
556
|
-
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
594
|
+
<xsl:if test="$stage-abbreviation = 'PRF' or $stage-abbreviation = 'IS' or $stage-abbreviation = 'D' or $stage-abbreviation = 'published'">
|
557
595
|
<xsl:call-template name="printEdition"/>
|
558
596
|
</xsl:if>
|
559
597
|
<xsl:choose>
|
560
598
|
<xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
|
561
599
|
<xsl:value-of select="$linebreak"/>
|
562
600
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
|
563
|
-
</xsl:when>
|
601
|
+
</xsl:when>
|
602
|
+
<xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:iso-standard/iso:bibdata/iso:date[@type = 'created']">
|
603
|
+
<xsl:value-of select="$linebreak"/>
|
604
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'created']"/>
|
605
|
+
</xsl:when>
|
564
606
|
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
565
607
|
<xsl:value-of select="$linebreak"/>
|
566
608
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
567
609
|
</xsl:when>
|
568
610
|
</xsl:choose>
|
569
|
-
|
570
|
-
|
611
|
+
</fo:block>
|
612
|
+
<!-- <xsl:value-of select="$linebreak"/>
|
613
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
|
614
|
+
<xsl:if test="$doctype = 'amendment'">
|
615
|
+
<fo:block text-align="right" margin-right="0.5mm">
|
616
|
+
<fo:block font-weight="bold" margin-top="4pt">
|
617
|
+
<xsl:variable name="title-amendment">
|
618
|
+
<xsl:call-template name="getTitle">
|
619
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
620
|
+
</xsl:call-template>
|
621
|
+
</xsl:variable>
|
622
|
+
<xsl:value-of select="$title-amendment"/><xsl:text> </xsl:text>
|
623
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
624
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
625
|
+
<xsl:value-of select="$amendment-number"/><xsl:text> </xsl:text>
|
626
|
+
</xsl:if>
|
627
|
+
</fo:block>
|
628
|
+
<fo:block>
|
629
|
+
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']">
|
630
|
+
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'updated']"/>
|
631
|
+
</xsl:if>
|
632
|
+
</fo:block>
|
571
633
|
</fo:block>
|
634
|
+
</xsl:if>
|
572
635
|
</fo:table-cell>
|
573
636
|
</fo:table-row>
|
637
|
+
|
574
638
|
</fo:table-body>
|
575
639
|
</fo:table>
|
576
640
|
|
@@ -639,6 +703,12 @@
|
|
639
703
|
</xsl:if>
|
640
704
|
<xsl:value-of select="$title-part"/>
|
641
705
|
</xsl:if> -->
|
706
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
707
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
708
|
+
<fo:block margin-right="-5mm" margin-top="12pt">
|
709
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
710
|
+
</fo:block>
|
711
|
+
</xsl:if>
|
642
712
|
</fo:block>
|
643
713
|
|
644
714
|
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -653,6 +723,15 @@
|
|
653
723
|
|
654
724
|
<xsl:call-template name="printTitlePartFr"/>
|
655
725
|
|
726
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
|
727
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
728
|
+
<fo:block margin-right="-5mm" margin-top="6pt">
|
729
|
+
<xsl:call-template name="printAmendmentTitle">
|
730
|
+
<xsl:with-param name="lang" select="'fr'"/>
|
731
|
+
</xsl:call-template>
|
732
|
+
</fo:block>
|
733
|
+
</xsl:if>
|
734
|
+
|
656
735
|
</fo:block>
|
657
736
|
</fo:block>
|
658
737
|
</fo:block-container>
|
@@ -690,8 +769,12 @@
|
|
690
769
|
</fo:block>
|
691
770
|
</fo:table-cell>
|
692
771
|
<fo:table-cell display-align="center">
|
693
|
-
<fo:block text-align="right">
|
694
|
-
<fo:block>
|
772
|
+
<fo:block text-align="right">
|
773
|
+
<fo:block>
|
774
|
+
<xsl:call-template name="getLocalizedString">
|
775
|
+
<xsl:with-param name="key">reference_number</xsl:with-param>
|
776
|
+
</xsl:call-template>
|
777
|
+
</fo:block>
|
695
778
|
<fo:block><xsl:value-of select="$ISOname"/></fo:block>
|
696
779
|
<fo:block> </fo:block>
|
697
780
|
<fo:block> </fo:block>
|
@@ -918,10 +1001,10 @@
|
|
918
1001
|
<xsl:if test="/iso:iso-standard/iso:boilerplate/iso:copyright-statement">
|
919
1002
|
|
920
1003
|
<fo:block-container height="252mm" display-align="after">
|
921
|
-
<fo:block margin-bottom="3mm">
|
922
|
-
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="14mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
|
923
|
-
<fo:inline padding-left="6mm" font-size="12pt" font-weight="bold"
|
924
|
-
</fo:block>
|
1004
|
+
<!-- <fo:block margin-bottom="3mm">
|
1005
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="14mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
|
1006
|
+
<fo:inline padding-left="6mm" font-size="12pt" font-weight="bold"></fo:inline>
|
1007
|
+
</fo:block> -->
|
925
1008
|
<fo:block line-height="90%">
|
926
1009
|
<fo:block font-size="9pt" text-align="justify">
|
927
1010
|
<xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
|
@@ -966,7 +1049,7 @@
|
|
966
1049
|
</xsl:if>
|
967
1050
|
|
968
1051
|
<xsl:variable name="margin-left">12</xsl:variable>
|
969
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
1052
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
970
1053
|
|
971
1054
|
<fo:block>
|
972
1055
|
<xsl:if test="@level = 1">
|
@@ -996,9 +1079,9 @@
|
|
996
1079
|
</fo:list-item-label>
|
997
1080
|
<fo:list-item-body start-indent="body-start()">
|
998
1081
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
999
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
1082
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1000
1083
|
|
1001
|
-
<xsl:apply-templates/>
|
1084
|
+
<xsl:apply-templates select="title"/>
|
1002
1085
|
|
1003
1086
|
<fo:inline keep-together.within-line="always">
|
1004
1087
|
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
@@ -1040,20 +1123,26 @@
|
|
1040
1123
|
</fo:block>
|
1041
1124
|
-->
|
1042
1125
|
<fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1">
|
1043
|
-
|
1126
|
+
|
1127
|
+
<xsl:variable name="title-part-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']"/>
|
1128
|
+
|
1129
|
+
<xsl:variable name="title-intro-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1130
|
+
|
1044
1131
|
<fo:block>
|
1045
|
-
<xsl:if test="normalize-space($title-intro) != ''">
|
1046
|
-
<xsl:value-of select="$title-intro"/>
|
1132
|
+
<xsl:if test="normalize-space($title-intro-doc-lang) != ''">
|
1133
|
+
<xsl:value-of select="$title-intro-doc-lang"/>
|
1047
1134
|
<xsl:text> — </xsl:text>
|
1048
1135
|
</xsl:if>
|
1049
1136
|
|
1050
|
-
<xsl:
|
1137
|
+
<xsl:variable name="title-main-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
1138
|
+
|
1139
|
+
<xsl:value-of select="$title-main-doc-lang"/>
|
1051
1140
|
|
1052
|
-
<xsl:if test="normalize-space($part-
|
1141
|
+
<xsl:if test="normalize-space($title-part-doc-lang) != ''">
|
1053
1142
|
<xsl:if test="$part != ''">
|
1054
1143
|
<xsl:text> — </xsl:text>
|
1055
|
-
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1056
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang
|
1144
|
+
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1145
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang=$lang]),'#',$part)"/>
|
1057
1146
|
<!-- <xsl:value-of select="$title-part-en"/>
|
1058
1147
|
<xsl:value-of select="$part"/>
|
1059
1148
|
<xsl:text>:</xsl:text> -->
|
@@ -1062,24 +1151,13 @@
|
|
1062
1151
|
</xsl:if>
|
1063
1152
|
</fo:block>
|
1064
1153
|
<fo:block>
|
1065
|
-
<xsl:value-of select="$part-
|
1154
|
+
<xsl:value-of select="$title-part-doc-lang"/>
|
1066
1155
|
</fo:block>
|
1067
1156
|
|
1068
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language =
|
1157
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
|
1069
1158
|
<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"/>
|
1159
|
+
<fo:block margin-top="12pt">
|
1160
|
+
<xsl:call-template name="printAmendmentTitle"/>
|
1083
1161
|
</fo:block>
|
1084
1162
|
</xsl:if>
|
1085
1163
|
|
@@ -1160,7 +1238,28 @@
|
|
1160
1238
|
</xsl:call-template>
|
1161
1239
|
</fo:block>
|
1162
1240
|
</xsl:if>
|
1163
|
-
<
|
1241
|
+
<xsl:variable name="countPages"/>
|
1242
|
+
<xsl:variable name="price_based_on">
|
1243
|
+
<xsl:call-template name="getLocalizedString">
|
1244
|
+
<xsl:with-param name="key">price_based_on</xsl:with-param>
|
1245
|
+
</xsl:call-template>
|
1246
|
+
</xsl:variable>
|
1247
|
+
<xsl:variable name="price_based_on_items">
|
1248
|
+
<xsl:call-template name="split">
|
1249
|
+
<xsl:with-param name="pText" select="$price_based_on"/>
|
1250
|
+
<xsl:with-param name="sep" select="'%'"/>
|
1251
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
1252
|
+
</xsl:call-template>
|
1253
|
+
</xsl:variable>
|
1254
|
+
<!-- Price based on ... pages -->
|
1255
|
+
<fo:block font-size="9pt">
|
1256
|
+
<xsl:for-each select="xalan:nodeset($price_based_on_items)/item">
|
1257
|
+
<xsl:value-of select="."/>
|
1258
|
+
<xsl:if test="position() != last()">
|
1259
|
+
<fo:page-number-citation ref-id="lastBlock"/>
|
1260
|
+
</xsl:if>
|
1261
|
+
</xsl:for-each>
|
1262
|
+
</fo:block>
|
1164
1263
|
</fo:block-container>
|
1165
1264
|
</fo:block-container>
|
1166
1265
|
</fo:flow>
|
@@ -1174,6 +1273,27 @@
|
|
1174
1273
|
<xsl:apply-templates/>
|
1175
1274
|
</xsl:template>
|
1176
1275
|
|
1276
|
+
<xsl:template name="printAmendmentTitle">
|
1277
|
+
<xsl:param name="lang" select="'en'"/>
|
1278
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
|
1279
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1280
|
+
<fo:block font-weight="normal" line-height="1.1">
|
1281
|
+
<xsl:variable name="title-amendment">
|
1282
|
+
<xsl:call-template name="getTitle">
|
1283
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
1284
|
+
</xsl:call-template>
|
1285
|
+
</xsl:variable>
|
1286
|
+
<xsl:value-of select="$title-amendment"/>
|
1287
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1288
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1289
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1290
|
+
</xsl:if>
|
1291
|
+
<xsl:text>: </xsl:text>
|
1292
|
+
<xsl:value-of select="$title-amd"/>
|
1293
|
+
</fo:block>
|
1294
|
+
</xsl:if>
|
1295
|
+
</xsl:template>
|
1296
|
+
|
1177
1297
|
<!-- ============================= -->
|
1178
1298
|
<!-- CONTENTS -->
|
1179
1299
|
<!-- ============================= -->
|
@@ -1198,9 +1318,7 @@
|
|
1198
1318
|
</xsl:variable>
|
1199
1319
|
|
1200
1320
|
<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>
|
1321
|
+
<xsl:choose>
|
1204
1322
|
<xsl:when test="ancestor-or-self::iso:annex and $level >= 2">false</xsl:when>
|
1205
1323
|
<xsl:when test="$section = '' and $type = 'clause'">false</xsl:when>
|
1206
1324
|
<xsl:when test="$level <= 3">true</xsl:when>
|
@@ -1208,8 +1326,16 @@
|
|
1208
1326
|
</xsl:choose>
|
1209
1327
|
</xsl:variable>
|
1210
1328
|
|
1329
|
+
<xsl:variable name="skip">
|
1330
|
+
<xsl:choose>
|
1331
|
+
<xsl:when test="ancestor-or-self::iso:bibitem">true</xsl:when>
|
1332
|
+
<xsl:when test="ancestor-or-self::iso:term">true</xsl:when>
|
1333
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1334
|
+
</xsl:choose>
|
1335
|
+
</xsl:variable>
|
1211
1336
|
|
1212
|
-
|
1337
|
+
|
1338
|
+
<xsl:if test="$skip = 'false'">
|
1213
1339
|
|
1214
1340
|
<xsl:variable name="title">
|
1215
1341
|
<xsl:call-template name="getName"/>
|
@@ -1220,12 +1346,13 @@
|
|
1220
1346
|
<xsl:if test="ancestor-or-self::iso:annex">annex</xsl:if>
|
1221
1347
|
</xsl:variable>
|
1222
1348
|
|
1223
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}">
|
1224
|
-
<
|
1349
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
1350
|
+
<title>
|
1351
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
1352
|
+
</title>
|
1353
|
+
<xsl:apply-templates mode="contents"/>
|
1225
1354
|
</item>
|
1226
|
-
|
1227
|
-
</xsl:if>
|
1228
|
-
|
1355
|
+
</xsl:if>
|
1229
1356
|
</xsl:template>
|
1230
1357
|
|
1231
1358
|
|
@@ -1282,6 +1409,14 @@
|
|
1282
1409
|
<fo:block>www.iso.org</fo:block>
|
1283
1410
|
</fo:block> -->
|
1284
1411
|
|
1412
|
+
<xsl:template match="iso:copyright-statement/iso:clause[1]/iso:title">
|
1413
|
+
<fo:block margin-bottom="3mm">
|
1414
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="14mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
|
1415
|
+
<!-- <fo:inline padding-left="6mm" font-size="12pt" font-weight="bold">COPYRIGHT PROTECTED DOCUMENT</fo:inline> -->
|
1416
|
+
<fo:inline padding-left="6mm" font-size="12pt" font-weight="bold"><xsl:apply-templates/></fo:inline>
|
1417
|
+
</fo:block>
|
1418
|
+
</xsl:template>
|
1419
|
+
|
1285
1420
|
<xsl:template match="iso:copyright-statement//iso:p">
|
1286
1421
|
<fo:block>
|
1287
1422
|
<xsl:if test="preceding-sibling::iso:p">
|
@@ -1546,6 +1681,9 @@
|
|
1546
1681
|
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
1547
1682
|
<fo:inline font-style="italic">
|
1548
1683
|
<xsl:choose>
|
1684
|
+
<xsl:when test="iso:title[@type = 'main' and @language = $lang]">
|
1685
|
+
<xsl:value-of select="iso:title[@type = 'main' and @language = $lang]"/>
|
1686
|
+
</xsl:when>
|
1549
1687
|
<xsl:when test="iso:title[@type = 'main' and @language = 'en']">
|
1550
1688
|
<xsl:value-of select="iso:title[@type = 'main' and @language = 'en']"/>
|
1551
1689
|
</xsl:when>
|
@@ -1665,6 +1803,9 @@
|
|
1665
1803
|
<xsl:apply-templates select="iso:note"/>
|
1666
1804
|
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
1667
1805
|
<xsl:choose>
|
1806
|
+
<xsl:when test="iso:title[@type = 'main' and @language = $lang]">
|
1807
|
+
<xsl:apply-templates select="iso:title[@type = 'main' and @language = $lang]"/>
|
1808
|
+
</xsl:when>
|
1668
1809
|
<xsl:when test="iso:title[@type = 'main' and @language = 'en']">
|
1669
1810
|
<xsl:apply-templates select="iso:title[@type = 'main' and @language = 'en']"/>
|
1670
1811
|
</xsl:when>
|
@@ -1706,7 +1847,12 @@
|
|
1706
1847
|
|
1707
1848
|
<xsl:template match="iso:admonition">
|
1708
1849
|
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
1709
|
-
<xsl:
|
1850
|
+
<xsl:variable name="type">
|
1851
|
+
<xsl:call-template name="getLocalizedString">
|
1852
|
+
<xsl:with-param name="key">admonition.<xsl:value-of select="@type"/></xsl:with-param>
|
1853
|
+
</xsl:call-template>
|
1854
|
+
</xsl:variable>
|
1855
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($type))"/>
|
1710
1856
|
<xsl:text> — </xsl:text>
|
1711
1857
|
<xsl:apply-templates/>
|
1712
1858
|
</fo:block>
|
@@ -1987,6 +2133,12 @@
|
|
1987
2133
|
|
1988
2134
|
</title-edition>
|
1989
2135
|
|
2136
|
+
<title-edition lang="fr">
|
2137
|
+
|
2138
|
+
<xsl:text>Édition </xsl:text>
|
2139
|
+
|
2140
|
+
</title-edition>
|
2141
|
+
|
1990
2142
|
|
1991
2143
|
<title-toc lang="en">
|
1992
2144
|
|
@@ -1995,7 +2147,12 @@
|
|
1995
2147
|
|
1996
2148
|
|
1997
2149
|
</title-toc>
|
1998
|
-
<title-toc lang="fr">
|
2150
|
+
<title-toc lang="fr">
|
2151
|
+
|
2152
|
+
<xsl:text>Sommaire</xsl:text>
|
2153
|
+
|
2154
|
+
|
2155
|
+
</title-toc>
|
1999
2156
|
|
2000
2157
|
<title-toc lang="zh">Contents</title-toc>
|
2001
2158
|
|
@@ -2017,15 +2174,24 @@
|
|
2017
2174
|
<xsl:text>Part #:</xsl:text>
|
2018
2175
|
|
2019
2176
|
|
2177
|
+
|
2020
2178
|
</title-part>
|
2021
2179
|
<title-part lang="fr">
|
2022
2180
|
|
2023
2181
|
<xsl:text>Partie #:</xsl:text>
|
2024
2182
|
|
2025
2183
|
|
2184
|
+
|
2026
2185
|
</title-part>
|
2027
2186
|
<title-part lang="zh">第 # 部分:</title-part>
|
2028
2187
|
|
2188
|
+
<title-subpart lang="en">
|
2189
|
+
|
2190
|
+
</title-subpart>
|
2191
|
+
<title-subpart lang="fr">
|
2192
|
+
|
2193
|
+
</title-subpart>
|
2194
|
+
|
2029
2195
|
<title-modified lang="en">modified</title-modified>
|
2030
2196
|
<title-modified lang="fr">modifiée</title-modified>
|
2031
2197
|
|
@@ -2087,10 +2253,19 @@
|
|
2087
2253
|
|
2088
2254
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2089
2255
|
<xsl:param name="name"/>
|
2090
|
-
<xsl:
|
2091
|
-
|
2256
|
+
<xsl:param name="lang"/>
|
2257
|
+
<xsl:variable name="lang_">
|
2258
|
+
<xsl:choose>
|
2259
|
+
<xsl:when test="$lang != ''">
|
2260
|
+
<xsl:value-of select="$lang"/>
|
2261
|
+
</xsl:when>
|
2262
|
+
<xsl:otherwise>
|
2263
|
+
<xsl:call-template name="getLang"/>
|
2264
|
+
</xsl:otherwise>
|
2265
|
+
</xsl:choose>
|
2092
2266
|
</xsl:variable>
|
2093
|
-
<xsl:variable name="
|
2267
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2268
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2094
2269
|
<xsl:choose>
|
2095
2270
|
<xsl:when test="normalize-space($title_) != ''">
|
2096
2271
|
<xsl:value-of select="$title_"/>
|
@@ -2099,7 +2274,9 @@
|
|
2099
2274
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2100
2275
|
</xsl:otherwise>
|
2101
2276
|
</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="
|
2277
|
+
</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">
|
2278
|
+
|
2279
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2103
2280
|
|
2104
2281
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2105
2282
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -2241,6 +2418,7 @@
|
|
2241
2418
|
|
2242
2419
|
|
2243
2420
|
|
2421
|
+
|
2244
2422
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2245
2423
|
|
2246
2424
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -2289,6 +2467,7 @@
|
|
2289
2467
|
|
2290
2468
|
|
2291
2469
|
|
2470
|
+
|
2292
2471
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2293
2472
|
|
2294
2473
|
|
@@ -2368,6 +2547,7 @@
|
|
2368
2547
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
2369
2548
|
|
2370
2549
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2550
|
+
|
2371
2551
|
|
2372
2552
|
|
2373
2553
|
|
@@ -2490,6 +2670,10 @@
|
|
2490
2670
|
|
2491
2671
|
|
2492
2672
|
|
2673
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2674
|
+
<fo:block> </fo:block>
|
2675
|
+
</xsl:if> -->
|
2676
|
+
|
2493
2677
|
<!-- $namespace = 'iso' or -->
|
2494
2678
|
|
2495
2679
|
|
@@ -2523,6 +2707,7 @@
|
|
2523
2707
|
<xsl:with-param name="table" select="$simple-table"/>
|
2524
2708
|
</xsl:call-template>
|
2525
2709
|
</xsl:variable>
|
2710
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2526
2711
|
|
2527
2712
|
<!-- <xsl:variable name="colwidths2">
|
2528
2713
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2543,11 +2728,16 @@
|
|
2543
2728
|
|
2544
2729
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2545
2730
|
|
2731
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2546
2732
|
|
2547
2733
|
|
2734
|
+
|
2735
|
+
|
2736
|
+
|
2548
2737
|
|
2549
2738
|
|
2550
|
-
|
2739
|
+
|
2740
|
+
|
2551
2741
|
|
2552
2742
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2553
2743
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2556,30 +2746,47 @@
|
|
2556
2746
|
|
2557
2747
|
|
2558
2748
|
|
2559
|
-
|
2749
|
+
|
2750
|
+
|
2751
|
+
|
2752
|
+
<xsl:variable name="table_attributes">
|
2753
|
+
<attribute name="table-layout">fixed</attribute>
|
2754
|
+
<attribute name="width">100%</attribute>
|
2755
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2756
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2560
2757
|
|
2561
|
-
<
|
2758
|
+
<attribute name="border">1.5pt solid black</attribute>
|
2562
2759
|
<xsl:if test="*[local-name()='thead']">
|
2563
|
-
<
|
2760
|
+
<attribute name="border-top">1pt solid black</attribute>
|
2564
2761
|
</xsl:if>
|
2565
2762
|
|
2566
2763
|
|
2567
2764
|
|
2568
2765
|
|
2569
|
-
<
|
2570
|
-
<
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
|
2576
|
-
|
2577
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2766
|
+
<attribute name="margin-left">0mm</attribute>
|
2767
|
+
<attribute name="margin-right">0mm</attribute>
|
2578
2768
|
|
2769
|
+
|
2770
|
+
|
2771
|
+
|
2579
2772
|
|
2773
|
+
|
2580
2774
|
|
2775
|
+
</xsl:variable>
|
2776
|
+
|
2777
|
+
|
2778
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2581
2779
|
|
2780
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2781
|
+
<xsl:attribute name="{@name}">
|
2782
|
+
<xsl:value-of select="."/>
|
2783
|
+
</xsl:attribute>
|
2784
|
+
</xsl:for-each>
|
2582
2785
|
|
2786
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2787
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2788
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2789
|
+
</xsl:if>
|
2583
2790
|
|
2584
2791
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2585
2792
|
<xsl:choose>
|
@@ -2603,6 +2810,33 @@
|
|
2603
2810
|
|
2604
2811
|
</fo:table>
|
2605
2812
|
|
2813
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2814
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2815
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2816
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2817
|
+
</xsl:call-template>
|
2818
|
+
</xsl:for-each>
|
2819
|
+
|
2820
|
+
<!-- insert footer as table -->
|
2821
|
+
<!-- <fo:table>
|
2822
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2823
|
+
<xsl:attribute name="{@name}">
|
2824
|
+
<xsl:value-of select="."/>
|
2825
|
+
</xsl:attribute>
|
2826
|
+
</xsl:for-each>
|
2827
|
+
|
2828
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2829
|
+
<xsl:choose>
|
2830
|
+
<xsl:when test=". = 1 or . = 0">
|
2831
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2832
|
+
</xsl:when>
|
2833
|
+
<xsl:otherwise>
|
2834
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2835
|
+
</xsl:otherwise>
|
2836
|
+
</xsl:choose>
|
2837
|
+
</xsl:for-each>
|
2838
|
+
</fo:table>-->
|
2839
|
+
|
2606
2840
|
|
2607
2841
|
|
2608
2842
|
|
@@ -2614,6 +2848,7 @@
|
|
2614
2848
|
|
2615
2849
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2616
2850
|
|
2851
|
+
|
2617
2852
|
<xsl:apply-templates/>
|
2618
2853
|
</fo:block>
|
2619
2854
|
</xsl:if>
|
@@ -2669,6 +2904,13 @@
|
|
2669
2904
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2670
2905
|
<xsl:variable name="td_text">
|
2671
2906
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2907
|
+
|
2908
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2909
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2910
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2911
|
+
</xsl:for-each>
|
2912
|
+
</xsl:if> -->
|
2913
|
+
|
2672
2914
|
</xsl:variable>
|
2673
2915
|
<xsl:variable name="words">
|
2674
2916
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2728,6 +2970,9 @@
|
|
2728
2970
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2729
2971
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2730
2972
|
<xsl:value-of select="@target"/>
|
2973
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2974
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2975
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2731
2976
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2732
2977
|
<xsl:param name="cols-count"/>
|
2733
2978
|
<!-- font-weight="bold" -->
|
@@ -2736,7 +2981,7 @@
|
|
2736
2981
|
<xsl:call-template name="table-header-title">
|
2737
2982
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2738
2983
|
</xsl:call-template>
|
2739
|
-
|
2984
|
+
|
2740
2985
|
<xsl:apply-templates/>
|
2741
2986
|
</fo:table-header>
|
2742
2987
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -2761,6 +3006,13 @@
|
|
2761
3006
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2762
3007
|
<xsl:apply-templates/>
|
2763
3008
|
</xsl:template><xsl:template name="insertTableFooter">
|
3009
|
+
<xsl:param name="cols-count"/>
|
3010
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
3011
|
+
<fo:table-footer>
|
3012
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3013
|
+
</fo:table-footer>
|
3014
|
+
</xsl:if>
|
3015
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2764
3016
|
<xsl:param name="cols-count"/>
|
2765
3017
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2766
3018
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2784,11 +3036,29 @@
|
|
2784
3036
|
<!-- fn will be processed inside 'note' processing -->
|
2785
3037
|
|
2786
3038
|
|
3039
|
+
|
3040
|
+
|
3041
|
+
|
3042
|
+
|
2787
3043
|
<!-- except gb -->
|
2788
3044
|
|
2789
3045
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2790
3046
|
|
2791
3047
|
|
3048
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
3049
|
+
<!-- empty, because notes show at page side in main sections -->
|
3050
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3051
|
+
<xsl:choose>
|
3052
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3053
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3054
|
+
</xsl:when>
|
3055
|
+
<xsl:otherwise>
|
3056
|
+
<fo:block/>
|
3057
|
+
</xsl:otherwise>
|
3058
|
+
</xsl:choose>
|
3059
|
+
</xsl:if> -->
|
3060
|
+
|
3061
|
+
|
2792
3062
|
<!-- horizontal row separator -->
|
2793
3063
|
|
2794
3064
|
|
@@ -2802,6 +3072,90 @@
|
|
2802
3072
|
</fo:table-footer>
|
2803
3073
|
|
2804
3074
|
</xsl:if>
|
3075
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3076
|
+
<xsl:param name="table_attributes"/>
|
3077
|
+
<xsl:param name="colwidths"/>
|
3078
|
+
|
3079
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3080
|
+
|
3081
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3082
|
+
|
3083
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
3084
|
+
|
3085
|
+
<fo:table keep-with-previous="always">
|
3086
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3087
|
+
<xsl:choose>
|
3088
|
+
<xsl:when test="@name = 'border-top'">
|
3089
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
3090
|
+
</xsl:when>
|
3091
|
+
<xsl:when test="@name = 'border'">
|
3092
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3093
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3094
|
+
</xsl:when>
|
3095
|
+
<xsl:otherwise>
|
3096
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3097
|
+
</xsl:otherwise>
|
3098
|
+
</xsl:choose>
|
3099
|
+
</xsl:for-each>
|
3100
|
+
|
3101
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3102
|
+
<xsl:choose>
|
3103
|
+
<xsl:when test=". = 1 or . = 0">
|
3104
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3105
|
+
</xsl:when>
|
3106
|
+
<xsl:otherwise>
|
3107
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3108
|
+
</xsl:otherwise>
|
3109
|
+
</xsl:choose>
|
3110
|
+
</xsl:for-each>
|
3111
|
+
|
3112
|
+
<fo:table-body>
|
3113
|
+
<fo:table-row>
|
3114
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3115
|
+
|
3116
|
+
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
3117
|
+
|
3118
|
+
|
3119
|
+
|
3120
|
+
<!-- fn will be processed inside 'note' processing -->
|
3121
|
+
|
3122
|
+
|
3123
|
+
|
3124
|
+
|
3125
|
+
|
3126
|
+
|
3127
|
+
|
3128
|
+
<!-- except gb -->
|
3129
|
+
|
3130
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3131
|
+
|
3132
|
+
|
3133
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3134
|
+
<xsl:choose>
|
3135
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3136
|
+
show Note under table in preface (ex. abstract) sections
|
3137
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3138
|
+
</xsl:when>
|
3139
|
+
<xsl:otherwise>
|
3140
|
+
empty, because notes show at page side in main sections
|
3141
|
+
<fo:block/>
|
3142
|
+
</xsl:otherwise>
|
3143
|
+
</xsl:choose>
|
3144
|
+
</xsl:if> -->
|
3145
|
+
|
3146
|
+
|
3147
|
+
<!-- horizontal row separator -->
|
3148
|
+
|
3149
|
+
|
3150
|
+
<!-- fn processing -->
|
3151
|
+
<xsl:call-template name="fn_display"/>
|
3152
|
+
|
3153
|
+
</fo:table-cell>
|
3154
|
+
</fo:table-row>
|
3155
|
+
</fo:table-body>
|
3156
|
+
|
3157
|
+
</fo:table>
|
3158
|
+
</xsl:if>
|
2805
3159
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2806
3160
|
|
2807
3161
|
<xsl:variable name="cols-count">
|
@@ -2904,8 +3258,12 @@
|
|
2904
3258
|
|
2905
3259
|
</xsl:if>
|
2906
3260
|
|
2907
|
-
|
2908
|
-
|
3261
|
+
|
3262
|
+
|
3263
|
+
|
3264
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3265
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3266
|
+
</xsl:if> -->
|
2909
3267
|
|
2910
3268
|
<xsl:apply-templates/>
|
2911
3269
|
</fo:table-row>
|
@@ -2931,6 +3289,7 @@
|
|
2931
3289
|
|
2932
3290
|
|
2933
3291
|
|
3292
|
+
|
2934
3293
|
<xsl:if test="@colspan">
|
2935
3294
|
<xsl:attribute name="number-columns-spanned">
|
2936
3295
|
<xsl:value-of select="@colspan"/>
|
@@ -2976,7 +3335,8 @@
|
|
2976
3335
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
2977
3336
|
</xsl:if>
|
2978
3337
|
|
2979
|
-
|
3338
|
+
|
3339
|
+
|
2980
3340
|
|
2981
3341
|
|
2982
3342
|
|
@@ -2994,7 +3354,8 @@
|
|
2994
3354
|
</xsl:attribute>
|
2995
3355
|
</xsl:if>
|
2996
3356
|
<xsl:call-template name="display-align"/>
|
2997
|
-
<fo:block>
|
3357
|
+
<fo:block>
|
3358
|
+
|
2998
3359
|
<xsl:apply-templates/>
|
2999
3360
|
</fo:block>
|
3000
3361
|
</fo:table-cell>
|
@@ -3009,14 +3370,17 @@
|
|
3009
3370
|
|
3010
3371
|
|
3011
3372
|
|
3373
|
+
|
3374
|
+
|
3012
3375
|
<fo:inline padding-right="2mm">
|
3013
3376
|
|
3014
3377
|
|
3015
3378
|
|
3016
|
-
|
3379
|
+
|
3017
3380
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3018
3381
|
|
3019
3382
|
</fo:inline>
|
3383
|
+
|
3020
3384
|
<xsl:apply-templates mode="process"/>
|
3021
3385
|
</fo:block>
|
3022
3386
|
|
@@ -3043,6 +3407,7 @@
|
|
3043
3407
|
|
3044
3408
|
|
3045
3409
|
|
3410
|
+
|
3046
3411
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3047
3412
|
|
3048
3413
|
|
@@ -3052,12 +3417,15 @@
|
|
3052
3417
|
|
3053
3418
|
|
3054
3419
|
|
3420
|
+
|
3055
3421
|
<xsl:value-of select="@reference"/>
|
3056
3422
|
|
3423
|
+
|
3057
3424
|
</fo:inline>
|
3058
3425
|
<fo:inline>
|
3059
3426
|
|
3060
|
-
<xsl:apply-templates/>
|
3427
|
+
<!-- <xsl:apply-templates /> -->
|
3428
|
+
<xsl:copy-of select="./node()"/>
|
3061
3429
|
</fo:inline>
|
3062
3430
|
</fo:block>
|
3063
3431
|
</xsl:if>
|
@@ -3094,7 +3462,20 @@
|
|
3094
3462
|
<xsl:variable name="following_dl_colwidths">
|
3095
3463
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3096
3464
|
<xsl:variable name="html-table">
|
3097
|
-
<xsl:variable name="
|
3465
|
+
<xsl:variable name="doc_ns">
|
3466
|
+
|
3467
|
+
</xsl:variable>
|
3468
|
+
<xsl:variable name="ns">
|
3469
|
+
<xsl:choose>
|
3470
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3471
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3472
|
+
</xsl:when>
|
3473
|
+
<xsl:otherwise>
|
3474
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3475
|
+
</xsl:otherwise>
|
3476
|
+
</xsl:choose>
|
3477
|
+
</xsl:variable>
|
3478
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3098
3479
|
<xsl:element name="{$ns}:table">
|
3099
3480
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3100
3481
|
<tbody>
|
@@ -3159,7 +3540,8 @@
|
|
3159
3540
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3160
3541
|
</xsl:if>
|
3161
3542
|
|
3162
|
-
<xsl:apply-templates/>
|
3543
|
+
<!-- <xsl:apply-templates /> -->
|
3544
|
+
<xsl:copy-of select="./node()"/>
|
3163
3545
|
</fo:block>
|
3164
3546
|
</fo:table-cell>
|
3165
3547
|
</fo:table-row>
|
@@ -3184,9 +3566,12 @@
|
|
3184
3566
|
|
3185
3567
|
|
3186
3568
|
|
3569
|
+
|
3187
3570
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3188
3571
|
|
3572
|
+
|
3189
3573
|
<xsl:value-of select="@reference"/>
|
3574
|
+
|
3190
3575
|
</fo:basic-link>
|
3191
3576
|
</fo:inline>
|
3192
3577
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3194,7 +3579,11 @@
|
|
3194
3579
|
<xsl:apply-templates/>
|
3195
3580
|
</fo:inline>
|
3196
3581
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3197
|
-
<fo:block-container
|
3582
|
+
<fo:block-container>
|
3583
|
+
|
3584
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3585
|
+
|
3586
|
+
|
3198
3587
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3199
3588
|
<xsl:attribute name="margin-left">
|
3200
3589
|
<xsl:choose>
|
@@ -3204,8 +3593,11 @@
|
|
3204
3593
|
</xsl:attribute>
|
3205
3594
|
|
3206
3595
|
</xsl:if>
|
3207
|
-
<fo:block-container
|
3208
|
-
|
3596
|
+
<fo:block-container>
|
3597
|
+
|
3598
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3599
|
+
|
3600
|
+
|
3209
3601
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3210
3602
|
|
3211
3603
|
<xsl:variable name="key_iso">
|
@@ -3223,9 +3615,12 @@
|
|
3223
3615
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3224
3616
|
|
3225
3617
|
<xsl:variable name="title-where">
|
3226
|
-
|
3227
|
-
<xsl:
|
3228
|
-
|
3618
|
+
|
3619
|
+
<xsl:call-template name="getLocalizedString">
|
3620
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
3621
|
+
</xsl:call-template>
|
3622
|
+
|
3623
|
+
|
3229
3624
|
</xsl:variable>
|
3230
3625
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3231
3626
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -3243,9 +3638,12 @@
|
|
3243
3638
|
|
3244
3639
|
|
3245
3640
|
<xsl:variable name="title-where">
|
3246
|
-
|
3247
|
-
<xsl:
|
3248
|
-
|
3641
|
+
|
3642
|
+
<xsl:call-template name="getLocalizedString">
|
3643
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
3644
|
+
</xsl:call-template>
|
3645
|
+
|
3646
|
+
|
3249
3647
|
</xsl:variable>
|
3250
3648
|
<xsl:value-of select="$title-where"/>
|
3251
3649
|
</fo:block>
|
@@ -3259,9 +3657,12 @@
|
|
3259
3657
|
|
3260
3658
|
|
3261
3659
|
<xsl:variable name="title-key">
|
3262
|
-
|
3263
|
-
<xsl:
|
3264
|
-
|
3660
|
+
|
3661
|
+
<xsl:call-template name="getLocalizedString">
|
3662
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
3663
|
+
</xsl:call-template>
|
3664
|
+
|
3665
|
+
|
3265
3666
|
</xsl:variable>
|
3266
3667
|
<xsl:value-of select="$title-key"/>
|
3267
3668
|
</fo:block>
|
@@ -3298,7 +3699,20 @@
|
|
3298
3699
|
</xsl:choose>
|
3299
3700
|
<!-- create virtual html table for dl/[dt and dd] -->
|
3300
3701
|
<xsl:variable name="html-table">
|
3301
|
-
<xsl:variable name="
|
3702
|
+
<xsl:variable name="doc_ns">
|
3703
|
+
|
3704
|
+
</xsl:variable>
|
3705
|
+
<xsl:variable name="ns">
|
3706
|
+
<xsl:choose>
|
3707
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3708
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3709
|
+
</xsl:when>
|
3710
|
+
<xsl:otherwise>
|
3711
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3712
|
+
</xsl:otherwise>
|
3713
|
+
</xsl:choose>
|
3714
|
+
</xsl:variable>
|
3715
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3302
3716
|
<xsl:element name="{$ns}:table">
|
3303
3717
|
<tbody>
|
3304
3718
|
<xsl:apply-templates mode="dl"/>
|
@@ -3444,6 +3858,7 @@
|
|
3444
3858
|
|
3445
3859
|
|
3446
3860
|
|
3861
|
+
|
3447
3862
|
<xsl:apply-templates/>
|
3448
3863
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3449
3864
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3497,6 +3912,7 @@
|
|
3497
3912
|
</fo:inline>
|
3498
3913
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3499
3914
|
<fo:inline font-weight="bold">
|
3915
|
+
|
3500
3916
|
<xsl:apply-templates/>
|
3501
3917
|
</fo:inline>
|
3502
3918
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3510,18 +3926,18 @@
|
|
3510
3926
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3511
3927
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3512
3928
|
<xsl:variable name="_font-size">
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3929
|
+
|
3930
|
+
|
3931
|
+
|
3516
3932
|
|
3517
3933
|
|
3518
3934
|
10
|
3519
3935
|
|
3520
3936
|
|
3521
3937
|
|
3522
|
-
|
3523
3938
|
|
3524
|
-
|
3939
|
+
|
3940
|
+
|
3525
3941
|
|
3526
3942
|
|
3527
3943
|
</xsl:variable>
|
@@ -3825,7 +4241,18 @@
|
|
3825
4241
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3826
4242
|
</xsl:apply-templates>
|
3827
4243
|
</xsl:template><xsl:template name="getLang">
|
3828
|
-
<xsl:variable name="
|
4244
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4245
|
+
<xsl:variable name="language">
|
4246
|
+
<xsl:choose>
|
4247
|
+
<xsl:when test="$language_current != ''">
|
4248
|
+
<xsl:value-of select="$language_current"/>
|
4249
|
+
</xsl:when>
|
4250
|
+
<xsl:otherwise>
|
4251
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4252
|
+
</xsl:otherwise>
|
4253
|
+
</xsl:choose>
|
4254
|
+
</xsl:variable>
|
4255
|
+
|
3829
4256
|
<xsl:choose>
|
3830
4257
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3831
4258
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3859,7 +4286,8 @@
|
|
3859
4286
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3860
4287
|
<xsl:value-of select="substring($str, 2)"/>
|
3861
4288
|
</xsl:template><xsl:template match="mathml:math">
|
3862
|
-
<fo:inline font-family="
|
4289
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4290
|
+
|
3863
4291
|
<xsl:variable name="mathml">
|
3864
4292
|
<xsl:apply-templates select="." mode="mathml"/>
|
3865
4293
|
</xsl:variable>
|
@@ -3889,6 +4317,7 @@
|
|
3889
4317
|
</xsl:choose>
|
3890
4318
|
</xsl:variable>
|
3891
4319
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4320
|
+
|
3892
4321
|
<xsl:choose>
|
3893
4322
|
<xsl:when test="$target = ''">
|
3894
4323
|
<xsl:apply-templates/>
|
@@ -3942,10 +4371,14 @@
|
|
3942
4371
|
</fo:inline>
|
3943
4372
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3944
4373
|
<xsl:variable name="title-modified">
|
3945
|
-
|
3946
|
-
<xsl:
|
3947
|
-
|
4374
|
+
|
4375
|
+
<xsl:call-template name="getLocalizedString">
|
4376
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
4377
|
+
</xsl:call-template>
|
4378
|
+
|
4379
|
+
|
3948
4380
|
</xsl:variable>
|
4381
|
+
|
3949
4382
|
<xsl:choose>
|
3950
4383
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3951
4384
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3953,7 +4386,7 @@
|
|
3953
4386
|
<xsl:apply-templates/>
|
3954
4387
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3955
4388
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3956
|
-
|
4389
|
+
|
3957
4390
|
<xsl:apply-templates/>
|
3958
4391
|
</fo:basic-link>
|
3959
4392
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -4006,6 +4439,8 @@
|
|
4006
4439
|
|
4007
4440
|
|
4008
4441
|
|
4442
|
+
|
4443
|
+
|
4009
4444
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4010
4445
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4011
4446
|
</fo:inline>
|
@@ -4096,7 +4531,8 @@
|
|
4096
4531
|
</fo:inline>
|
4097
4532
|
</xsl:if>
|
4098
4533
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
4099
|
-
<fo:block-container id="{@id}">
|
4534
|
+
<fo:block-container id="{@id}">
|
4535
|
+
|
4100
4536
|
<fo:block>
|
4101
4537
|
<xsl:apply-templates/>
|
4102
4538
|
</fo:block>
|
@@ -4131,15 +4567,109 @@
|
|
4131
4567
|
|
4132
4568
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4133
4569
|
</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">
|
4570
|
+
</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
4571
|
<xsl:apply-templates mode="contents"/>
|
4136
4572
|
<xsl:text> </xsl:text>
|
4137
|
-
</xsl:template><xsl:template match="
|
4573
|
+
</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">
|
4574
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4575
|
+
<xsl:text> </xsl:text>
|
4576
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4577
|
+
<xsl:value-of select="."/>
|
4578
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4138
4579
|
<xsl:value-of select="."/>
|
4139
|
-
</xsl:template><xsl:template match="
|
4580
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4581
|
+
<xsl:apply-templates mode="contents"/>
|
4582
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4583
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4584
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4585
|
+
<xsl:apply-templates select="."/>
|
4586
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4587
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4588
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4589
|
+
<xsl:param name="contents"/>
|
4590
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4591
|
+
<fo:bookmark-tree>
|
4592
|
+
<xsl:choose>
|
4593
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4594
|
+
<xsl:choose>
|
4595
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4596
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4597
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4598
|
+
<fo:bookmark-title>
|
4599
|
+
<xsl:variable name="bookmark-title_">
|
4600
|
+
<xsl:call-template name="getLangVersion">
|
4601
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4602
|
+
</xsl:call-template>
|
4603
|
+
</xsl:variable>
|
4604
|
+
<xsl:choose>
|
4605
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4606
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4607
|
+
</xsl:when>
|
4608
|
+
<xsl:otherwise>
|
4609
|
+
<xsl:choose>
|
4610
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4611
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4612
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4613
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4614
|
+
</xsl:choose>
|
4615
|
+
</xsl:otherwise>
|
4616
|
+
</xsl:choose>
|
4617
|
+
</fo:bookmark-title>
|
4618
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4619
|
+
</fo:bookmark>
|
4620
|
+
|
4621
|
+
</xsl:for-each>
|
4622
|
+
</xsl:when>
|
4623
|
+
<xsl:otherwise>
|
4624
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4625
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4626
|
+
</xsl:for-each>
|
4627
|
+
</xsl:otherwise>
|
4628
|
+
</xsl:choose>
|
4629
|
+
</xsl:when>
|
4630
|
+
<xsl:otherwise>
|
4631
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4632
|
+
</xsl:otherwise>
|
4633
|
+
</xsl:choose>
|
4634
|
+
|
4635
|
+
|
4636
|
+
|
4637
|
+
|
4638
|
+
|
4639
|
+
|
4640
|
+
|
4641
|
+
|
4642
|
+
</fo:bookmark-tree>
|
4643
|
+
</xsl:if>
|
4644
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4645
|
+
<xsl:param name="lang"/>
|
4646
|
+
<xsl:choose>
|
4647
|
+
<xsl:when test="$lang = 'en'">
|
4648
|
+
|
4649
|
+
|
4650
|
+
</xsl:when>
|
4651
|
+
<xsl:when test="$lang = 'fr'">
|
4652
|
+
|
4653
|
+
|
4654
|
+
</xsl:when>
|
4655
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4656
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4657
|
+
</xsl:choose>
|
4658
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4659
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4660
|
+
<fo:bookmark-title>
|
4661
|
+
<xsl:if test="@section != ''">
|
4662
|
+
<xsl:value-of select="@section"/>
|
4663
|
+
<xsl:text> </xsl:text>
|
4664
|
+
</xsl:if>
|
4665
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4666
|
+
</fo:bookmark-title>
|
4667
|
+
<xsl:apply-templates mode="bookmark"/>
|
4668
|
+
</fo:bookmark>
|
4669
|
+
</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
4670
|
<xsl:if test="normalize-space() != ''">
|
4141
4671
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4142
|
-
|
4672
|
+
|
4143
4673
|
<xsl:apply-templates/>
|
4144
4674
|
</fo:block>
|
4145
4675
|
</xsl:if>
|
@@ -4194,7 +4724,7 @@
|
|
4194
4724
|
<xsl:apply-templates/>
|
4195
4725
|
</xsl:otherwise>
|
4196
4726
|
</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">
|
4727
|
+
</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
4728
|
<xsl:text> </xsl:text>
|
4199
4729
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4200
4730
|
<xsl:copy>
|
@@ -4576,9 +5106,14 @@
|
|
4576
5106
|
|
4577
5107
|
<fo:inline>
|
4578
5108
|
|
4579
|
-
|
4580
|
-
|
4581
|
-
|
5109
|
+
|
5110
|
+
|
5111
|
+
<xsl:call-template name="getLocalizedString">
|
5112
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5113
|
+
</xsl:call-template>
|
5114
|
+
|
5115
|
+
|
5116
|
+
|
4582
5117
|
<xsl:text>: </xsl:text>
|
4583
5118
|
</fo:inline>
|
4584
5119
|
|
@@ -4727,9 +5262,12 @@
|
|
4727
5262
|
</fo:block>
|
4728
5263
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4729
5264
|
<xsl:variable name="title-deprecated">
|
4730
|
-
|
4731
|
-
<xsl:
|
4732
|
-
|
5265
|
+
|
5266
|
+
<xsl:call-template name="getLocalizedString">
|
5267
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5268
|
+
</xsl:call-template>
|
5269
|
+
|
5270
|
+
|
4733
5271
|
</xsl:variable>
|
4734
5272
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4735
5273
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -4776,13 +5314,14 @@
|
|
4776
5314
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4777
5315
|
<fo:block>
|
4778
5316
|
<xsl:call-template name="setId"/>
|
5317
|
+
|
4779
5318
|
<xsl:apply-templates/>
|
4780
5319
|
</fo:block>
|
4781
5320
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
4782
5321
|
<fo:block id="{@id}">
|
4783
5322
|
<xsl:apply-templates/>
|
4784
5323
|
</fo:block>
|
4785
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5324
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4786
5325
|
|
4787
5326
|
<fo:block id="{@id}">
|
4788
5327
|
<xsl:apply-templates/>
|
@@ -4801,20 +5340,30 @@
|
|
4801
5340
|
<!-- 0xA0 to space replacement -->
|
4802
5341
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4803
5342
|
</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
|
-
|
5343
|
+
<xsl:choose>
|
5344
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5345
|
+
<fo:block-container>
|
5346
|
+
<xsl:attribute name="margin-left">
|
5347
|
+
<xsl:choose>
|
5348
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5349
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5350
|
+
</xsl:choose>
|
5351
|
+
</xsl:attribute>
|
5352
|
+
|
5353
|
+
|
5354
|
+
<fo:block-container margin-left="0mm">
|
5355
|
+
<fo:block>
|
5356
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5357
|
+
</fo:block>
|
5358
|
+
</fo:block-container>
|
5359
|
+
</fo:block-container>
|
5360
|
+
</xsl:when>
|
5361
|
+
<xsl:otherwise>
|
5362
|
+
<fo:block>
|
5363
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5364
|
+
</fo:block>
|
5365
|
+
</xsl:otherwise>
|
5366
|
+
</xsl:choose>
|
4818
5367
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4819
5368
|
<!-- <row>
|
4820
5369
|
<date>05-07-2013</date>
|
@@ -4987,6 +5536,7 @@
|
|
4987
5536
|
|
4988
5537
|
|
4989
5538
|
|
5539
|
+
|
4990
5540
|
|
4991
5541
|
</xsl:variable>
|
4992
5542
|
<xsl:choose>
|
@@ -5003,6 +5553,7 @@
|
|
5003
5553
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5004
5554
|
|
5005
5555
|
|
5556
|
+
|
5006
5557
|
</dc:creator>
|
5007
5558
|
<dc:description>
|
5008
5559
|
<xsl:variable name="abstract">
|
@@ -5012,6 +5563,7 @@
|
|
5012
5563
|
|
5013
5564
|
|
5014
5565
|
|
5566
|
+
|
5015
5567
|
</xsl:variable>
|
5016
5568
|
<xsl:value-of select="normalize-space($abstract)"/>
|
5017
5569
|
</dc:description>
|
@@ -5083,13 +5635,22 @@
|
|
5083
5635
|
</xsl:template><xsl:template name="split">
|
5084
5636
|
<xsl:param name="pText" select="."/>
|
5085
5637
|
<xsl:param name="sep" select="','"/>
|
5638
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5086
5639
|
<xsl:if test="string-length($pText) >0">
|
5087
5640
|
<item>
|
5088
|
-
<xsl:
|
5641
|
+
<xsl:choose>
|
5642
|
+
<xsl:when test="$normalize-space = 'true'">
|
5643
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5644
|
+
</xsl:when>
|
5645
|
+
<xsl:otherwise>
|
5646
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5647
|
+
</xsl:otherwise>
|
5648
|
+
</xsl:choose>
|
5089
5649
|
</item>
|
5090
5650
|
<xsl:call-template name="split">
|
5091
5651
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5092
5652
|
<xsl:with-param name="sep" select="$sep"/>
|
5653
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5093
5654
|
</xsl:call-template>
|
5094
5655
|
</xsl:if>
|
5095
5656
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5112,6 +5673,7 @@
|
|
5112
5673
|
|
5113
5674
|
|
5114
5675
|
|
5676
|
+
|
5115
5677
|
</xsl:variable>
|
5116
5678
|
<xsl:if test="$documentNS != $XSLNS">
|
5117
5679
|
<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 +5699,40 @@
|
|
5137
5699
|
</xsl:otherwise>
|
5138
5700
|
</xsl:choose>
|
5139
5701
|
</xsl:attribute>
|
5702
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5703
|
+
<xsl:param name="text"/>
|
5704
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5705
|
+
<xsl:if test="string-length($text) > 0">
|
5706
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5707
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5708
|
+
<xsl:if test="$char = '®'">
|
5709
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5710
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5711
|
+
</xsl:if>
|
5712
|
+
<xsl:value-of select="$char"/>
|
5713
|
+
</fo:inline>
|
5714
|
+
<xsl:call-template name="add-letter-spacing">
|
5715
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5716
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5717
|
+
</xsl:call-template>
|
5718
|
+
</xsl:if>
|
5719
|
+
</xsl:template><xsl:template name="repeat">
|
5720
|
+
<xsl:param name="char" select="'*'"/>
|
5721
|
+
<xsl:param name="count"/>
|
5722
|
+
<xsl:if test="$count > 0">
|
5723
|
+
<xsl:value-of select="$char"/>
|
5724
|
+
<xsl:call-template name="repeat">
|
5725
|
+
<xsl:with-param name="char" select="$char"/>
|
5726
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5727
|
+
</xsl:call-template>
|
5728
|
+
</xsl:if>
|
5729
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5730
|
+
<xsl:param name="key"/>
|
5731
|
+
|
5732
|
+
<xsl:variable name="curr_lang">
|
5733
|
+
<xsl:call-template name="getLang"/>
|
5734
|
+
</xsl:variable>
|
5735
|
+
|
5736
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5737
|
+
|
5140
5738
|
</xsl:template></xsl:stylesheet>
|