metanorma-iso 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/i18n-en.yaml +22 -0
- data/lib/isodoc/iso/i18n-fr.yaml +22 -1
- data/lib/isodoc/iso/i18n-ru.yaml +42 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +21 -1
- data/lib/isodoc/iso/i18n.rb +1 -0
- data/lib/isodoc/iso/iso.amendment.xsl +510 -297
- data/lib/isodoc/iso/iso.international-standard.xsl +510 -297
- data/lib/isodoc/iso/metadata.rb +12 -2
- data/lib/metanorma/iso/boilerplate-fr.xml +3 -3
- data/lib/metanorma/iso/boilerplate-ru.xml +39 -0
- data/lib/metanorma/iso/boilerplate.xml +3 -3
- data/lib/metanorma/iso/cleanup.rb +5 -1
- data/lib/metanorma/iso/front.rb +1 -1
- data/lib/metanorma/iso/front_id.rb +1 -0
- data/lib/metanorma/iso/isodoc.rng +73 -3
- data/lib/metanorma/iso/validate.rb +1 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/amd_spec.rb +10 -5
- data/spec/isodoc/i18n_spec.rb +350 -9
- data/spec/isodoc/metadata_spec.rb +153 -3
- data/spec/isodoc/postproc_spec.rb +1 -0
- data/spec/isodoc/section_spec.rb +1 -0
- data/spec/metanorma/base_spec.rb +434 -326
- metadata +4 -2
@@ -27,19 +27,26 @@
|
|
27
27
|
<!-- <xsl:variable name="ISOname" select="concat(/iso:iso-standard/iso:bibdata/iso:docidentifier, ':', /iso:iso-standard/iso:bibdata/iso:copyright/iso:from , $lang-1st-letter)"/> -->
|
28
28
|
<xsl:variable name="ISOname" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-reference']"/>
|
29
29
|
|
30
|
-
<!-- Information and documentation — Codes for transcription systems -->
|
31
|
-
<xsl:variable name="title-intro" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-intro']"/>
|
32
|
-
<xsl:variable name="title-intro-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-intro']"/>
|
33
|
-
<xsl:variable name="title-main" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-main']"/>
|
34
|
-
<xsl:variable name="title-main-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-main']"/>
|
35
30
|
<xsl:variable name="part" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@part"/>
|
36
31
|
|
37
32
|
<xsl:variable name="doctype" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype"/>
|
38
|
-
|
33
|
+
<xsl:variable name="doctype_localized" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype[@language = $lang]"/>
|
34
|
+
|
35
|
+
<xsl:variable name="doctype_uppercased">
|
36
|
+
<xsl:choose>
|
37
|
+
<xsl:when test="$doctype_localized != ''">
|
38
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(normalize-space($doctype_localized),'-',' ')))"/>
|
39
|
+
</xsl:when>
|
40
|
+
<xsl:otherwise>
|
41
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(normalize-space($doctype),'-',' ')))"/>
|
42
|
+
</xsl:otherwise>
|
43
|
+
</xsl:choose>
|
44
|
+
</xsl:variable>
|
39
45
|
|
40
46
|
<xsl:variable name="stage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:stage)"/>
|
41
47
|
<xsl:variable name="substage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:substage)"/>
|
42
48
|
<xsl:variable name="stagename" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:stagename)"/>
|
49
|
+
<xsl:variable name="stagename_localized" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage[@language = $lang])"/>
|
43
50
|
<xsl:variable name="abbreviation" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage/@abbreviation)"/>
|
44
51
|
|
45
52
|
<xsl:variable name="stage-abbreviation">
|
@@ -63,7 +70,10 @@
|
|
63
70
|
|
64
71
|
<xsl:variable name="stage-fullname-uppercased">
|
65
72
|
<xsl:choose>
|
66
|
-
<xsl:when test="$
|
73
|
+
<xsl:when test="$stagename_localized != ''">
|
74
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($stagename_localized))"/>
|
75
|
+
</xsl:when>
|
76
|
+
<xsl:when test="$stagename != ''">
|
67
77
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($stagename))"/>
|
68
78
|
</xsl:when>
|
69
79
|
<xsl:when test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP'">NEW WORK ITEM PROPOSAL</xsl:when>
|
@@ -158,6 +168,16 @@
|
|
158
168
|
</contents>
|
159
169
|
</xsl:variable>
|
160
170
|
|
171
|
+
<xsl:variable name="lang_other">
|
172
|
+
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:title[@language != $lang]">
|
173
|
+
<xsl:if test="not(preceding-sibling::iso:title[@language = current()/@language])">
|
174
|
+
<lang><xsl:value-of select="@language"/></lang>
|
175
|
+
</xsl:if>
|
176
|
+
</xsl:for-each>
|
177
|
+
</xsl:variable>
|
178
|
+
|
179
|
+
<xsl:variable name="XML" select="/"/>
|
180
|
+
|
161
181
|
<xsl:template match="/">
|
162
182
|
<xsl:call-template name="namespaceCheck"/>
|
163
183
|
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}"> <!-- -->
|
@@ -414,7 +434,7 @@
|
|
414
434
|
<!-- Reference number -->
|
415
435
|
<fo:block>
|
416
436
|
<xsl:call-template name="getLocalizedString">
|
417
|
-
<xsl:with-param name="key">reference_number</xsl:with-param>
|
437
|
+
<xsl:with-param name="key">reference_number</xsl:with-param>
|
418
438
|
</xsl:call-template>
|
419
439
|
</fo:block>
|
420
440
|
<fo:block>
|
@@ -462,7 +482,12 @@
|
|
462
482
|
</fo:block>
|
463
483
|
</fo:table-cell>
|
464
484
|
<fo:table-cell>
|
465
|
-
<fo:block>
|
485
|
+
<fo:block>
|
486
|
+
<xsl:call-template name="getLocalizedString">
|
487
|
+
<xsl:with-param name="key">secretariat</xsl:with-param>
|
488
|
+
</xsl:call-template>
|
489
|
+
<xsl:text>: </xsl:text>
|
490
|
+
Secretariat: <fo:inline font-weight="bold"><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:ext/iso:editorialgroup/iso:secretariat"/></fo:inline></fo:block>
|
466
491
|
</fo:table-cell>
|
467
492
|
</fo:table-row>
|
468
493
|
<fo:table-row>
|
@@ -507,47 +532,45 @@
|
|
507
532
|
<fo:block-container border-top="1mm double black" line-height="1.1" margin-top="3mm">
|
508
533
|
<fo:block margin-right="5mm">
|
509
534
|
<fo:block font-size="18pt" font-weight="bold" margin-top="6pt" role="H1">
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
<xsl:value-of select="$title-main"/>
|
516
|
-
|
517
|
-
<xsl:call-template name="printTitlePartEn"/>
|
518
|
-
|
519
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
520
|
-
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
521
|
-
<fo:block margin-top="12pt" role="H1">
|
522
|
-
<xsl:call-template name="printAmendmentTitle"/>
|
523
|
-
</fo:block>
|
524
|
-
</xsl:if>
|
525
|
-
|
526
|
-
</fo:block>
|
527
|
-
|
528
|
-
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
529
|
-
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
530
|
-
|
531
|
-
<xsl:if test="normalize-space($title-intro-fr) != ''">
|
532
|
-
<xsl:value-of select="$title-intro-fr"/>
|
533
|
-
<xsl:text> — </xsl:text>
|
534
|
-
</xsl:if>
|
535
|
-
|
536
|
-
<xsl:value-of select="$title-main-fr"/>
|
537
|
-
|
538
|
-
<xsl:call-template name="printTitlePartFr"/>
|
535
|
+
|
536
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
537
|
+
|
538
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
539
539
|
|
540
|
-
<xsl:
|
541
|
-
<xsl:
|
542
|
-
|
543
|
-
<xsl:call-template name="printAmendmentTitle">
|
544
|
-
<xsl:with-param name="lang" select="'fr'"/>
|
545
|
-
</xsl:call-template>
|
546
|
-
</fo:block>
|
547
|
-
</xsl:if>
|
540
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
541
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
542
|
+
</xsl:apply-templates>
|
548
543
|
|
544
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
545
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
546
|
+
</xsl:apply-templates>
|
547
|
+
|
549
548
|
</fo:block>
|
549
|
+
|
550
|
+
|
551
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
552
|
+
<xsl:variable name="lang_other" select="."/>
|
553
|
+
|
554
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
555
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
556
|
+
|
557
|
+
<!-- Example: title-intro fr -->
|
558
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
559
|
+
|
560
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
561
|
+
|
562
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
563
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
564
|
+
</xsl:apply-templates>
|
565
|
+
|
566
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
|
567
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
568
|
+
</xsl:apply-templates>
|
569
|
+
|
570
|
+
</fo:block>
|
571
|
+
</xsl:for-each>
|
550
572
|
</fo:block>
|
573
|
+
|
551
574
|
<fo:block margin-top="10mm">
|
552
575
|
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
|
553
576
|
<xsl:if test="position() = 1"><fo:inline>ICS: </fo:inline></xsl:if>
|
@@ -555,6 +578,7 @@
|
|
555
578
|
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
556
579
|
</xsl:for-each>
|
557
580
|
</fo:block>
|
581
|
+
|
558
582
|
</fo:block-container>
|
559
583
|
|
560
584
|
|
@@ -588,6 +612,15 @@
|
|
588
612
|
<xsl:if test="$stage-name = 'final-draft'">FINAL<xsl:value-of select="$linebreak"/>DRAFT</xsl:if> -->
|
589
613
|
</fo:block>
|
590
614
|
</fo:table-cell>
|
615
|
+
|
616
|
+
<xsl:variable name="lastWord">
|
617
|
+
<xsl:call-template name="substring-after-last">
|
618
|
+
<xsl:with-param name="value" select="$doctype_uppercased"/>
|
619
|
+
<xsl:with-param name="delimiter" select="' '"/>
|
620
|
+
</xsl:call-template>
|
621
|
+
</xsl:variable>
|
622
|
+
<xsl:variable name="font-size"><xsl:if test="string-length($lastWord) >= 12">90%</xsl:if></xsl:variable> <!-- to prevent overlapping 'NORME INTERNATIONALE' to number -->
|
623
|
+
|
591
624
|
<fo:table-cell>
|
592
625
|
<fo:block text-align="left">
|
593
626
|
<xsl:choose>
|
@@ -595,6 +628,9 @@
|
|
595
628
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
|
596
629
|
</xsl:when>
|
597
630
|
<xsl:otherwise>
|
631
|
+
<xsl:if test="$font-size != ''">
|
632
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
633
|
+
</xsl:if>
|
598
634
|
<xsl:value-of select="$doctype_uppercased"/>
|
599
635
|
</xsl:otherwise>
|
600
636
|
</xsl:choose>
|
@@ -602,6 +638,9 @@
|
|
602
638
|
</fo:table-cell>
|
603
639
|
<fo:table-cell>
|
604
640
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
641
|
+
<xsl:if test="$font-size != ''">
|
642
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
643
|
+
</xsl:if>
|
605
644
|
<xsl:value-of select="$docidentifierISO"/>
|
606
645
|
</fo:block>
|
607
646
|
</fo:table-cell>
|
@@ -699,54 +738,43 @@
|
|
699
738
|
<fo:block margin-right="5mm">
|
700
739
|
<fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
|
701
740
|
|
702
|
-
<xsl:
|
703
|
-
<xsl:value-of select="$title-intro"/>
|
704
|
-
<xsl:text> — </xsl:text>
|
705
|
-
</xsl:if>
|
706
|
-
|
707
|
-
<xsl:value-of select="$title-main"/>
|
708
|
-
|
709
|
-
<xsl:call-template name="printTitlePartEn"/>
|
710
|
-
<!-- <xsl:if test="normalize-space($title-part) != ''">
|
711
|
-
<xsl:if test="$part != ''">
|
712
|
-
<xsl:text> — </xsl:text>
|
713
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
714
|
-
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
715
|
-
<xsl:text>:</xsl:text>
|
716
|
-
</fo:block>
|
717
|
-
</xsl:if>
|
718
|
-
<xsl:value-of select="$title-part"/>
|
719
|
-
</xsl:if> -->
|
720
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
721
|
-
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
722
|
-
<fo:block margin-right="-5mm" margin-top="12pt" role="H1">
|
723
|
-
<xsl:call-template name="printAmendmentTitle"/>
|
724
|
-
</fo:block>
|
725
|
-
</xsl:if>
|
726
|
-
</fo:block>
|
727
|
-
|
728
|
-
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
729
|
-
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
730
|
-
|
731
|
-
<xsl:if test="normalize-space($title-intro-fr) != ''">
|
732
|
-
<xsl:value-of select="$title-intro-fr"/>
|
733
|
-
<xsl:text> — </xsl:text>
|
734
|
-
</xsl:if>
|
741
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
735
742
|
|
736
|
-
<xsl:
|
743
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
737
744
|
|
738
|
-
<xsl:
|
745
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
746
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
747
|
+
</xsl:apply-templates>
|
739
748
|
|
740
|
-
<xsl:
|
741
|
-
|
742
|
-
|
743
|
-
<xsl:call-template name="printAmendmentTitle">
|
744
|
-
<xsl:with-param name="lang" select="'fr'"/>
|
745
|
-
</xsl:call-template>
|
746
|
-
</fo:block>
|
747
|
-
</xsl:if>
|
749
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
750
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
751
|
+
</xsl:apply-templates>
|
748
752
|
|
749
753
|
</fo:block>
|
754
|
+
|
755
|
+
|
756
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
757
|
+
<xsl:variable name="lang_other" select="."/>
|
758
|
+
|
759
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
760
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
761
|
+
|
762
|
+
<!-- Example: title-intro fr -->
|
763
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
764
|
+
|
765
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
766
|
+
|
767
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
768
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
769
|
+
</xsl:apply-templates>
|
770
|
+
|
771
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
|
772
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
773
|
+
</xsl:apply-templates>
|
774
|
+
|
775
|
+
</fo:block>
|
776
|
+
</xsl:for-each>
|
777
|
+
|
750
778
|
</fo:block>
|
751
779
|
</fo:block-container>
|
752
780
|
</fo:table-cell>
|
@@ -830,41 +858,35 @@
|
|
830
858
|
|
831
859
|
<fo:block-container border-top="1mm double black" line-height="1.1">
|
832
860
|
<fo:block margin-right="40mm">
|
833
|
-
|
834
|
-
|
835
|
-
<xsl:if test="normalize-space($title-intro) != ''">
|
836
|
-
<xsl:value-of select="$title-intro"/>
|
837
|
-
<xsl:text> — </xsl:text>
|
838
|
-
</xsl:if>
|
861
|
+
<fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
|
839
862
|
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
<xsl:
|
845
|
-
<xsl:
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
<xsl:
|
852
|
-
|
853
|
-
|
863
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
864
|
+
|
865
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
866
|
+
|
867
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
868
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
869
|
+
</xsl:apply-templates>
|
870
|
+
|
871
|
+
</fo:block>
|
872
|
+
|
873
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
874
|
+
<xsl:variable name="lang_other" select="."/>
|
875
|
+
|
876
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
877
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
854
878
|
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
</fo:block>
|
879
|
+
<!-- Example: title-intro fr -->
|
880
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
881
|
+
|
882
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
883
|
+
|
884
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
885
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
886
|
+
</xsl:apply-templates>
|
887
|
+
|
888
|
+
</fo:block>
|
889
|
+
</xsl:for-each>
|
868
890
|
</fo:block>
|
869
891
|
</fo:block-container>
|
870
892
|
</fo:block-container>
|
@@ -947,48 +969,35 @@
|
|
947
969
|
<!-- Information and documentation — Codes for transcription systems -->
|
948
970
|
<fo:block font-weight="bold" role="H1">
|
949
971
|
|
950
|
-
<xsl:
|
951
|
-
|
952
|
-
|
953
|
-
</xsl:if>
|
954
|
-
|
955
|
-
<xsl:value-of select="$title-main"/>
|
972
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
973
|
+
|
974
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
956
975
|
|
957
|
-
<xsl:
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
962
|
-
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
963
|
-
<xsl:text>:</xsl:text>
|
964
|
-
</fo:block>
|
965
|
-
</xsl:if>
|
966
|
-
<xsl:value-of select="$title-part"/>
|
967
|
-
</xsl:if> -->
|
976
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
977
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
978
|
+
</xsl:apply-templates>
|
979
|
+
|
968
980
|
</fo:block>
|
969
981
|
|
970
|
-
<
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
</xsl:if>
|
982
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
983
|
+
<xsl:variable name="lang_other" select="."/>
|
984
|
+
|
985
|
+
<fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
|
986
|
+
<fo:block role="H1">
|
976
987
|
|
977
|
-
|
988
|
+
<!-- Example: title-intro fr -->
|
989
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
990
|
+
|
991
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
992
|
+
|
993
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
994
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
995
|
+
</xsl:apply-templates>
|
996
|
+
|
997
|
+
</fo:block>
|
978
998
|
|
979
|
-
|
980
|
-
|
981
|
-
<xsl:if test="$part != ''">
|
982
|
-
<xsl:text> — </xsl:text>
|
983
|
-
<fo:block margin-top="6pt" font-weight="normal">
|
984
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
985
|
-
<!-- <xsl:value-of select="$title-part-fr"/><xsl:value-of select="$part"/>
|
986
|
-
<xsl:text>:</xsl:text> -->
|
987
|
-
</fo:block>
|
988
|
-
</xsl:if>
|
989
|
-
<xsl:value-of select="$part-fr"/>
|
990
|
-
</xsl:if>
|
991
|
-
</fo:block>
|
999
|
+
</xsl:for-each>
|
1000
|
+
|
992
1001
|
</fo:block-container>
|
993
1002
|
<fo:block font-size="11pt" margin-bottom="8pt"><xsl:value-of select="$linebreak"/></fo:block>
|
994
1003
|
<fo:block-container font-size="40pt" text-align="center" margin-bottom="12pt" border="0.5pt solid black">
|
@@ -1149,48 +1158,27 @@
|
|
1149
1158
|
-->
|
1150
1159
|
<fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1">
|
1151
1160
|
|
1152
|
-
<xsl:variable name="title-part-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']"/>
|
1153
|
-
|
1154
|
-
<xsl:variable name="title-intro-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1155
|
-
|
1156
1161
|
<fo:block role="H1">
|
1157
|
-
|
1158
|
-
|
1159
|
-
<xsl:text> — </xsl:text>
|
1160
|
-
</xsl:if>
|
1162
|
+
|
1163
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1161
1164
|
|
1162
|
-
<xsl:
|
1165
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
1163
1166
|
|
1164
|
-
<xsl:
|
1167
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
1168
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
1169
|
+
<xsl:with-param name="isMainBody">true</xsl:with-param>
|
1170
|
+
</xsl:apply-templates>
|
1165
1171
|
|
1166
|
-
<xsl:if test="normalize-space($title-part-doc-lang) != ''">
|
1167
|
-
<xsl:if test="$part != ''">
|
1168
|
-
<xsl:text> — </xsl:text>
|
1169
|
-
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1170
|
-
<xsl:call-template name="getLocalizedString">
|
1171
|
-
<xsl:with-param name="key">Part.sg</xsl:with-param>
|
1172
|
-
</xsl:call-template>
|
1173
|
-
<xsl:text> </xsl:text>
|
1174
|
-
<xsl:value-of select="$part"/>
|
1175
|
-
<xsl:text>:</xsl:text>
|
1176
|
-
<!-- <xsl:value-of select="$title-part-en"/>
|
1177
|
-
<xsl:value-of select="$part"/>
|
1178
|
-
<xsl:text>:</xsl:text> -->
|
1179
|
-
</fo:block>
|
1180
|
-
</xsl:if>
|
1181
|
-
</xsl:if>
|
1182
1172
|
</fo:block>
|
1183
1173
|
<fo:block role="H1">
|
1184
|
-
<xsl:
|
1174
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
1185
1175
|
</fo:block>
|
1186
1176
|
|
1187
|
-
<xsl:
|
1188
|
-
|
1189
|
-
<
|
1190
|
-
|
1191
|
-
|
1192
|
-
</xsl:if>
|
1193
|
-
|
1177
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
1178
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
1179
|
+
<xsl:with-param name="isMainBody">true</xsl:with-param>
|
1180
|
+
</xsl:apply-templates>
|
1181
|
+
|
1194
1182
|
</fo:block>
|
1195
1183
|
|
1196
1184
|
</fo:block-container>
|
@@ -1302,27 +1290,97 @@
|
|
1302
1290
|
</fo:root>
|
1303
1291
|
</xsl:template>
|
1304
1292
|
|
1293
|
+
<!-- ==================== -->
|
1294
|
+
<!-- display titles -->
|
1295
|
+
<!-- ==================== -->
|
1296
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-intro']">
|
1297
|
+
<xsl:apply-templates/>
|
1298
|
+
<xsl:text> — </xsl:text>
|
1299
|
+
</xsl:template>
|
1305
1300
|
|
1306
|
-
<xsl:template match="
|
1307
|
-
<xsl:apply-templates/>
|
1301
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-main']">
|
1302
|
+
<xsl:apply-templates/>
|
1303
|
+
</xsl:template>
|
1304
|
+
|
1305
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-part']">
|
1306
|
+
<xsl:param name="curr_lang" select="$lang"/>
|
1307
|
+
<xsl:param name="isMainLang">false</xsl:param>
|
1308
|
+
<xsl:param name="isMainBody">false</xsl:param>
|
1309
|
+
<xsl:if test="$part != ''">
|
1310
|
+
<xsl:text> — </xsl:text>
|
1311
|
+
<xsl:variable name="part-text">
|
1312
|
+
<xsl:choose>
|
1313
|
+
<xsl:when test="$isMainLang = 'true'">
|
1314
|
+
<xsl:call-template name="getLocalizedString">
|
1315
|
+
<xsl:with-param name="key">locality.part</xsl:with-param>
|
1316
|
+
</xsl:call-template>
|
1317
|
+
<xsl:text> </xsl:text>
|
1318
|
+
<xsl:value-of select="$part"/>
|
1319
|
+
<xsl:text>:</xsl:text>
|
1320
|
+
</xsl:when>
|
1321
|
+
<xsl:otherwise>
|
1322
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang=$curr_lang]),'#',$part)"/>
|
1323
|
+
</xsl:otherwise>
|
1324
|
+
</xsl:choose>
|
1325
|
+
</xsl:variable>
|
1326
|
+
<xsl:choose>
|
1327
|
+
<xsl:when test="$isMainBody = 'true'">
|
1328
|
+
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1329
|
+
<xsl:value-of select="$part-text"/>
|
1330
|
+
</fo:block>
|
1331
|
+
</xsl:when>
|
1332
|
+
<xsl:when test="$isMainLang = 'true'">
|
1333
|
+
<fo:block font-weight="normal" margin-top="6pt">
|
1334
|
+
<xsl:value-of select="$part-text"/>
|
1335
|
+
</fo:block>
|
1336
|
+
</xsl:when>
|
1337
|
+
<xsl:otherwise>
|
1338
|
+
<xsl:value-of select="$part-text"/>
|
1339
|
+
<xsl:text> </xsl:text>
|
1340
|
+
</xsl:otherwise>
|
1341
|
+
</xsl:choose>
|
1342
|
+
</xsl:if>
|
1343
|
+
<xsl:if test="$isMainBody = 'false'">
|
1344
|
+
<xsl:apply-templates/>
|
1345
|
+
</xsl:if>
|
1308
1346
|
</xsl:template>
|
1309
1347
|
|
1310
|
-
<xsl:template
|
1311
|
-
<xsl:param name="
|
1312
|
-
<xsl:
|
1313
|
-
<xsl:
|
1314
|
-
|
1315
|
-
|
1316
|
-
<xsl:
|
1317
|
-
|
1318
|
-
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1348
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-amd']">
|
1349
|
+
<xsl:param name="isMainLang">false</xsl:param>
|
1350
|
+
<xsl:param name="curr_lang" select="$lang"/>
|
1351
|
+
<xsl:param name="isMainBody">false</xsl:param>
|
1352
|
+
<xsl:if test="$doctype = 'amendment'">
|
1353
|
+
<fo:block margin-right="-5mm" margin-top="6pt" role="H1">
|
1354
|
+
<xsl:if test="$isMainLang = 'true'">
|
1355
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1319
1356
|
</xsl:if>
|
1320
|
-
<xsl:
|
1321
|
-
|
1357
|
+
<xsl:if test="$stage-abbreviation = 'DIS' or $isMainBody = 'true'">
|
1358
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1359
|
+
</xsl:if>
|
1360
|
+
|
1361
|
+
<fo:block font-weight="normal" line-height="1.1">
|
1362
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
1363
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1364
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1365
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1366
|
+
</xsl:if>
|
1367
|
+
<xsl:text>: </xsl:text>
|
1368
|
+
<xsl:apply-templates/>
|
1369
|
+
</fo:block>
|
1370
|
+
|
1322
1371
|
</fo:block>
|
1323
1372
|
</xsl:if>
|
1324
1373
|
</xsl:template>
|
1325
1374
|
|
1375
|
+
|
1376
|
+
<!-- ==================== -->
|
1377
|
+
<!-- END display titles -->
|
1378
|
+
<!-- ==================== -->
|
1379
|
+
|
1380
|
+
<xsl:template match="node()">
|
1381
|
+
<xsl:apply-templates/>
|
1382
|
+
</xsl:template>
|
1383
|
+
|
1326
1384
|
<!-- ============================= -->
|
1327
1385
|
<!-- CONTENTS -->
|
1328
1386
|
<!-- ============================= -->
|
@@ -1812,43 +1870,13 @@
|
|
1812
1870
|
</xsl:when>
|
1813
1871
|
</xsl:choose>
|
1814
1872
|
<xsl:variable name="title-edition">
|
1815
|
-
<xsl:call-template name="
|
1816
|
-
<xsl:with-param name="
|
1873
|
+
<xsl:call-template name="getLocalizedString">
|
1874
|
+
<xsl:with-param name="key">edition</xsl:with-param>
|
1817
1875
|
</xsl:call-template>
|
1818
1876
|
</xsl:variable>
|
1819
1877
|
<xsl:if test="$edition != ''"><xsl:text> </xsl:text><xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/></xsl:if>
|
1820
1878
|
</xsl:template>
|
1821
1879
|
|
1822
|
-
<xsl:template name="printTitlePartFr">
|
1823
|
-
<xsl:variable name="part-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-part']"/>
|
1824
|
-
<xsl:if test="normalize-space($part-fr) != ''">
|
1825
|
-
<xsl:if test="$part != ''">
|
1826
|
-
<xsl:text> — </xsl:text>
|
1827
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
1828
|
-
<!-- <xsl:value-of select="$title-part-fr"/>
|
1829
|
-
<xsl:value-of select="$part"/>
|
1830
|
-
<xsl:text>:</xsl:text> -->
|
1831
|
-
</xsl:if>
|
1832
|
-
<xsl:value-of select="$part-fr"/>
|
1833
|
-
</xsl:if>
|
1834
|
-
</xsl:template>
|
1835
|
-
|
1836
|
-
<xsl:template name="printTitlePartEn">
|
1837
|
-
<xsl:variable name="part-en" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-part']"/>
|
1838
|
-
<xsl:if test="normalize-space($part-en) != ''">
|
1839
|
-
<xsl:if test="$part != ''">
|
1840
|
-
<xsl:text> — </xsl:text>
|
1841
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
1842
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
|
1843
|
-
<!-- <xsl:value-of select="$title-part-en"/>
|
1844
|
-
<xsl:value-of select="$part"/>
|
1845
|
-
<xsl:text>:</xsl:text> -->
|
1846
|
-
</fo:block>
|
1847
|
-
</xsl:if>
|
1848
|
-
<xsl:value-of select="$part-en"/>
|
1849
|
-
</xsl:if>
|
1850
|
-
</xsl:template>
|
1851
|
-
|
1852
1880
|
|
1853
1881
|
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
|
1854
1882
|
<xsl:call-template name="getLang"/>
|
@@ -1876,6 +1904,10 @@
|
|
1876
1904
|
<xsl:text>Édition </xsl:text>
|
1877
1905
|
</title-edition>
|
1878
1906
|
|
1907
|
+
<title-edition lang="ru">
|
1908
|
+
<xsl:text>Издание </xsl:text>
|
1909
|
+
</title-edition>
|
1910
|
+
|
1879
1911
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
1880
1912
|
<title-toc lang="en">
|
1881
1913
|
|
@@ -1906,7 +1938,13 @@
|
|
1906
1938
|
|
1907
1939
|
|
1908
1940
|
|
1909
|
-
</title-part>
|
1941
|
+
</title-part>
|
1942
|
+
<title-part lang="ru">
|
1943
|
+
|
1944
|
+
<xsl:text>Часть #:</xsl:text>
|
1945
|
+
|
1946
|
+
|
1947
|
+
</title-part>
|
1910
1948
|
<title-part lang="zh">第 # 部分:</title-part>
|
1911
1949
|
|
1912
1950
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
@@ -1922,6 +1960,7 @@
|
|
1922
1960
|
|
1923
1961
|
<title-summary lang="en">Summary</title-summary>
|
1924
1962
|
|
1963
|
+
<title-continued lang="ru">(продолжение)</title-continued>
|
1925
1964
|
<title-continued lang="en">(continued)</title-continued>
|
1926
1965
|
<title-continued lang="fr">(continué)</title-continued>
|
1927
1966
|
|
@@ -2693,13 +2732,19 @@
|
|
2693
2732
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2694
2733
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2695
2734
|
</xsl:variable><xsl:attribute-set name="add-style">
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2700
|
-
|
2701
|
-
|
2702
|
-
|
2735
|
+
|
2736
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2737
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2738
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2739
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2740
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2741
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2742
|
+
|
2743
|
+
</xsl:attribute-set><xsl:variable name="add-style">
|
2744
|
+
<add-style xsl:use-attribute-sets="add-style"/>
|
2745
|
+
</xsl:variable><xsl:template name="append_add-style">
|
2746
|
+
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
2747
|
+
</xsl:template><xsl:variable name="color-deleted-text">
|
2703
2748
|
<xsl:text>red</xsl:text>
|
2704
2749
|
</xsl:variable><xsl:attribute-set name="del-style">
|
2705
2750
|
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
@@ -3124,14 +3169,42 @@
|
|
3124
3169
|
|
3125
3170
|
|
3126
3171
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3172
|
+
<xsl:variable name="nodes_preface_">
|
3173
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3174
|
+
<node id="{@id}"/>
|
3175
|
+
</xsl:for-each>
|
3176
|
+
</xsl:variable>
|
3177
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
3178
|
+
|
3127
3179
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3128
3180
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3181
|
+
|
3182
|
+
<!-- process Section's title -->
|
3183
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3184
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3185
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3186
|
+
</xsl:if>
|
3187
|
+
|
3129
3188
|
<xsl:apply-templates select="." mode="contents"/>
|
3130
3189
|
</xsl:for-each>
|
3131
3190
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
3132
3191
|
|
3192
|
+
<xsl:variable name="nodes_sections_">
|
3193
|
+
<xsl:for-each select="/*/*[local-name()='sections']/*">
|
3194
|
+
<node id="{@id}"/>
|
3195
|
+
</xsl:for-each>
|
3196
|
+
</xsl:variable>
|
3197
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
3198
|
+
|
3133
3199
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
3134
3200
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3201
|
+
|
3202
|
+
<!-- process Section's title -->
|
3203
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3204
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3205
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3206
|
+
</xsl:if>
|
3207
|
+
|
3135
3208
|
<xsl:apply-templates select="." mode="contents"/>
|
3136
3209
|
</xsl:for-each>
|
3137
3210
|
|
@@ -3281,7 +3354,7 @@
|
|
3281
3354
|
</xsl:call-template>
|
3282
3355
|
</xsl:if>
|
3283
3356
|
</xsl:variable>
|
3284
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3357
|
+
<!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3285
3358
|
|
3286
3359
|
|
3287
3360
|
<xsl:variable name="margin-side">
|
@@ -3551,7 +3624,7 @@
|
|
3551
3624
|
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
3552
3625
|
<!-- 2009 thinspace -->
|
3553
3626
|
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
3554
|
-
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '
|
3627
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
3555
3628
|
</xsl:call-template>
|
3556
3629
|
</xsl:variable>
|
3557
3630
|
<xsl:variable name="max_length">
|
@@ -5276,6 +5349,9 @@
|
|
5276
5349
|
</fo:inline>
|
5277
5350
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5278
5351
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5352
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
5353
|
+
<xsl:call-template name="append_add-style"/>
|
5354
|
+
</xsl:if>
|
5279
5355
|
<xsl:apply-templates/>
|
5280
5356
|
</fo:basic-link>
|
5281
5357
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -5373,6 +5449,13 @@
|
|
5373
5449
|
|
5374
5450
|
|
5375
5451
|
|
5452
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5453
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5454
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5455
|
+
<xsl:call-template name="append_add-style"/>
|
5456
|
+
</xsl:if>
|
5457
|
+
|
5458
|
+
|
5376
5459
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
5377
5460
|
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
5378
5461
|
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
@@ -5411,6 +5494,12 @@
|
|
5411
5494
|
|
5412
5495
|
|
5413
5496
|
|
5497
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5498
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5499
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5500
|
+
<xsl:call-template name="append_add-style"/>
|
5501
|
+
</xsl:if>
|
5502
|
+
|
5414
5503
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
5415
5504
|
|
5416
5505
|
</fo:inline>
|
@@ -5462,6 +5551,7 @@
|
|
5462
5551
|
</fo:block>
|
5463
5552
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
5464
5553
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5554
|
+
|
5465
5555
|
|
5466
5556
|
|
5467
5557
|
|
@@ -5900,7 +5990,11 @@
|
|
5900
5990
|
<xsl:value-of select="."/>
|
5901
5991
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5902
5992
|
<xsl:apply-templates mode="contents"/>
|
5903
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = '
|
5993
|
+
</xsl:template><xsl:template match="*[local-name() = 'preface' or local-name() = 'sections']/*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" mode="contents_no_displayorder">
|
5994
|
+
<xsl:call-template name="contents_section-title"/>
|
5995
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
|
5996
|
+
<xsl:call-template name="contents_section-title"/>
|
5997
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title']/@depth or ../*[local-name() = 'title']/@depth = 1)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" name="contents_section-title" mode="contents">
|
5904
5998
|
<xsl:variable name="level">
|
5905
5999
|
<xsl:call-template name="getLevel">
|
5906
6000
|
<xsl:with-param name="depth" select="@depth"/>
|
@@ -7211,7 +7305,7 @@
|
|
7211
7305
|
|
7212
7306
|
|
7213
7307
|
|
7214
|
-
|
7308
|
+
|
7215
7309
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
7216
7310
|
</fo:list-block>
|
7217
7311
|
<!-- <xsl:for-each select="./iho:note">
|
@@ -7229,6 +7323,11 @@
|
|
7229
7323
|
|
7230
7324
|
|
7231
7325
|
|
7326
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7327
|
+
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7328
|
+
<xsl:call-template name="append_add-style"/>
|
7329
|
+
</xsl:if>
|
7330
|
+
|
7232
7331
|
<xsl:call-template name="getListItemFormat"/>
|
7233
7332
|
</fo:block>
|
7234
7333
|
</fo:list-item-label>
|
@@ -8303,53 +8402,153 @@
|
|
8303
8402
|
<xsl:param name="first"/>
|
8304
8403
|
<xsl:if test="$number != ''">
|
8305
8404
|
<xsl:variable name="words">
|
8306
|
-
|
8307
|
-
<
|
8308
|
-
|
8309
|
-
|
8310
|
-
|
8311
|
-
|
8312
|
-
|
8313
|
-
|
8314
|
-
|
8315
|
-
|
8316
|
-
|
8317
|
-
|
8318
|
-
|
8319
|
-
|
8320
|
-
|
8321
|
-
|
8322
|
-
|
8323
|
-
|
8324
|
-
|
8325
|
-
|
8326
|
-
|
8327
|
-
|
8328
|
-
|
8329
|
-
|
8330
|
-
|
8331
|
-
|
8332
|
-
|
8333
|
-
|
8334
|
-
|
8335
|
-
|
8336
|
-
|
8337
|
-
|
8338
|
-
|
8339
|
-
|
8340
|
-
|
8341
|
-
|
8342
|
-
|
8343
|
-
|
8344
|
-
|
8345
|
-
|
8346
|
-
|
8347
|
-
|
8348
|
-
|
8349
|
-
|
8350
|
-
|
8351
|
-
|
8352
|
-
|
8405
|
+
<words>
|
8406
|
+
<xsl:choose>
|
8407
|
+
<xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
|
8408
|
+
<word cardinal="1">Une-</word>
|
8409
|
+
<word ordinal="1">Première </word>
|
8410
|
+
<word cardinal="2">Deux-</word>
|
8411
|
+
<word ordinal="2">Seconde </word>
|
8412
|
+
<word cardinal="3">Trois-</word>
|
8413
|
+
<word ordinal="3">Tierce </word>
|
8414
|
+
<word cardinal="4">Quatre-</word>
|
8415
|
+
<word ordinal="4">Quatrième </word>
|
8416
|
+
<word cardinal="5">Cinq-</word>
|
8417
|
+
<word ordinal="5">Cinquième </word>
|
8418
|
+
<word cardinal="6">Six-</word>
|
8419
|
+
<word ordinal="6">Sixième </word>
|
8420
|
+
<word cardinal="7">Sept-</word>
|
8421
|
+
<word ordinal="7">Septième </word>
|
8422
|
+
<word cardinal="8">Huit-</word>
|
8423
|
+
<word ordinal="8">Huitième </word>
|
8424
|
+
<word cardinal="9">Neuf-</word>
|
8425
|
+
<word ordinal="9">Neuvième </word>
|
8426
|
+
<word ordinal="10">Dixième </word>
|
8427
|
+
<word ordinal="11">Onzième </word>
|
8428
|
+
<word ordinal="12">Douzième </word>
|
8429
|
+
<word ordinal="13">Treizième </word>
|
8430
|
+
<word ordinal="14">Quatorzième </word>
|
8431
|
+
<word ordinal="15">Quinzième </word>
|
8432
|
+
<word ordinal="16">Seizième </word>
|
8433
|
+
<word ordinal="17">Dix-septième </word>
|
8434
|
+
<word ordinal="18">Dix-huitième </word>
|
8435
|
+
<word ordinal="19">Dix-neuvième </word>
|
8436
|
+
<word cardinal="20">Vingt-</word>
|
8437
|
+
<word ordinal="20">Vingtième </word>
|
8438
|
+
<word cardinal="30">Trente-</word>
|
8439
|
+
<word ordinal="30">Trentième </word>
|
8440
|
+
<word cardinal="40">Quarante-</word>
|
8441
|
+
<word ordinal="40">Quarantième </word>
|
8442
|
+
<word cardinal="50">Cinquante-</word>
|
8443
|
+
<word ordinal="50">Cinquantième </word>
|
8444
|
+
<word cardinal="60">Soixante-</word>
|
8445
|
+
<word ordinal="60">Soixantième </word>
|
8446
|
+
<word cardinal="70">Septante-</word>
|
8447
|
+
<word ordinal="70">Septantième </word>
|
8448
|
+
<word cardinal="80">Huitante-</word>
|
8449
|
+
<word ordinal="80">Huitantième </word>
|
8450
|
+
<word cardinal="90">Nonante-</word>
|
8451
|
+
<word ordinal="90">Nonantième </word>
|
8452
|
+
<word cardinal="100">Cent-</word>
|
8453
|
+
<word ordinal="100">Centième </word>
|
8454
|
+
</xsl:when>
|
8455
|
+
<xsl:when test="$lang = 'ru'">
|
8456
|
+
<word cardinal="1">Одна-</word>
|
8457
|
+
<word ordinal="1">Первое </word>
|
8458
|
+
<word cardinal="2">Две-</word>
|
8459
|
+
<word ordinal="2">Второе </word>
|
8460
|
+
<word cardinal="3">Три-</word>
|
8461
|
+
<word ordinal="3">Третье </word>
|
8462
|
+
<word cardinal="4">Четыре-</word>
|
8463
|
+
<word ordinal="4">Четвертое </word>
|
8464
|
+
<word cardinal="5">Пять-</word>
|
8465
|
+
<word ordinal="5">Пятое </word>
|
8466
|
+
<word cardinal="6">Шесть-</word>
|
8467
|
+
<word ordinal="6">Шестое </word>
|
8468
|
+
<word cardinal="7">Семь-</word>
|
8469
|
+
<word ordinal="7">Седьмое </word>
|
8470
|
+
<word cardinal="8">Восемь-</word>
|
8471
|
+
<word ordinal="8">Восьмое </word>
|
8472
|
+
<word cardinal="9">Девять-</word>
|
8473
|
+
<word ordinal="9">Девятое </word>
|
8474
|
+
<word ordinal="10">Десятое </word>
|
8475
|
+
<word ordinal="11">Одиннадцатое </word>
|
8476
|
+
<word ordinal="12">Двенадцатое </word>
|
8477
|
+
<word ordinal="13">Тринадцатое </word>
|
8478
|
+
<word ordinal="14">Четырнадцатое </word>
|
8479
|
+
<word ordinal="15">Пятнадцатое </word>
|
8480
|
+
<word ordinal="16">Шестнадцатое </word>
|
8481
|
+
<word ordinal="17">Семнадцатое </word>
|
8482
|
+
<word ordinal="18">Восемнадцатое </word>
|
8483
|
+
<word ordinal="19">Девятнадцатое </word>
|
8484
|
+
<word cardinal="20">Двадцать-</word>
|
8485
|
+
<word ordinal="20">Двадцатое </word>
|
8486
|
+
<word cardinal="30">Тридцать-</word>
|
8487
|
+
<word ordinal="30">Тридцатое </word>
|
8488
|
+
<word cardinal="40">Сорок-</word>
|
8489
|
+
<word ordinal="40">Сороковое </word>
|
8490
|
+
<word cardinal="50">Пятьдесят-</word>
|
8491
|
+
<word ordinal="50">Пятидесятое </word>
|
8492
|
+
<word cardinal="60">Шестьдесят-</word>
|
8493
|
+
<word ordinal="60">Шестидесятое </word>
|
8494
|
+
<word cardinal="70">Семьдесят-</word>
|
8495
|
+
<word ordinal="70">Семидесятое </word>
|
8496
|
+
<word cardinal="80">Восемьдесят-</word>
|
8497
|
+
<word ordinal="80">Восьмидесятое </word>
|
8498
|
+
<word cardinal="90">Девяносто-</word>
|
8499
|
+
<word ordinal="90">Девяностое </word>
|
8500
|
+
<word cardinal="100">Сто-</word>
|
8501
|
+
<word ordinal="100">Сотое </word>
|
8502
|
+
</xsl:when>
|
8503
|
+
<xsl:otherwise> <!-- default english -->
|
8504
|
+
<word cardinal="1">One-</word>
|
8505
|
+
<word ordinal="1">First </word>
|
8506
|
+
<word cardinal="2">Two-</word>
|
8507
|
+
<word ordinal="2">Second </word>
|
8508
|
+
<word cardinal="3">Three-</word>
|
8509
|
+
<word ordinal="3">Third </word>
|
8510
|
+
<word cardinal="4">Four-</word>
|
8511
|
+
<word ordinal="4">Fourth </word>
|
8512
|
+
<word cardinal="5">Five-</word>
|
8513
|
+
<word ordinal="5">Fifth </word>
|
8514
|
+
<word cardinal="6">Six-</word>
|
8515
|
+
<word ordinal="6">Sixth </word>
|
8516
|
+
<word cardinal="7">Seven-</word>
|
8517
|
+
<word ordinal="7">Seventh </word>
|
8518
|
+
<word cardinal="8">Eight-</word>
|
8519
|
+
<word ordinal="8">Eighth </word>
|
8520
|
+
<word cardinal="9">Nine-</word>
|
8521
|
+
<word ordinal="9">Ninth </word>
|
8522
|
+
<word ordinal="10">Tenth </word>
|
8523
|
+
<word ordinal="11">Eleventh </word>
|
8524
|
+
<word ordinal="12">Twelfth </word>
|
8525
|
+
<word ordinal="13">Thirteenth </word>
|
8526
|
+
<word ordinal="14">Fourteenth </word>
|
8527
|
+
<word ordinal="15">Fifteenth </word>
|
8528
|
+
<word ordinal="16">Sixteenth </word>
|
8529
|
+
<word ordinal="17">Seventeenth </word>
|
8530
|
+
<word ordinal="18">Eighteenth </word>
|
8531
|
+
<word ordinal="19">Nineteenth </word>
|
8532
|
+
<word cardinal="20">Twenty-</word>
|
8533
|
+
<word ordinal="20">Twentieth </word>
|
8534
|
+
<word cardinal="30">Thirty-</word>
|
8535
|
+
<word ordinal="30">Thirtieth </word>
|
8536
|
+
<word cardinal="40">Forty-</word>
|
8537
|
+
<word ordinal="40">Fortieth </word>
|
8538
|
+
<word cardinal="50">Fifty-</word>
|
8539
|
+
<word ordinal="50">Fiftieth </word>
|
8540
|
+
<word cardinal="60">Sixty-</word>
|
8541
|
+
<word ordinal="60">Sixtieth </word>
|
8542
|
+
<word cardinal="70">Seventy-</word>
|
8543
|
+
<word ordinal="70">Seventieth </word>
|
8544
|
+
<word cardinal="80">Eighty-</word>
|
8545
|
+
<word ordinal="80">Eightieth </word>
|
8546
|
+
<word cardinal="90">Ninety-</word>
|
8547
|
+
<word ordinal="90">Ninetieth </word>
|
8548
|
+
<word cardinal="100">Hundred-</word>
|
8549
|
+
<word ordinal="100">Hundredth </word>
|
8550
|
+
</xsl:otherwise>
|
8551
|
+
</xsl:choose>
|
8353
8552
|
</words>
|
8354
8553
|
</xsl:variable>
|
8355
8554
|
|
@@ -8423,4 +8622,18 @@
|
|
8423
8622
|
<xsl:otherwise>_</xsl:otherwise>
|
8424
8623
|
</xsl:choose>
|
8425
8624
|
</xsl:attribute>
|
8625
|
+
</xsl:template><xsl:template name="substring-after-last">
|
8626
|
+
<xsl:param name="value"/>
|
8627
|
+
<xsl:param name="delimiter"/>
|
8628
|
+
<xsl:choose>
|
8629
|
+
<xsl:when test="contains($value, $delimiter)">
|
8630
|
+
<xsl:call-template name="substring-after-last">
|
8631
|
+
<xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
|
8632
|
+
<xsl:with-param name="delimiter" select="$delimiter"/>
|
8633
|
+
</xsl:call-template>
|
8634
|
+
</xsl:when>
|
8635
|
+
<xsl:otherwise>
|
8636
|
+
<xsl:value-of select="$value"/>
|
8637
|
+
</xsl:otherwise>
|
8638
|
+
</xsl:choose>
|
8426
8639
|
</xsl:template></xsl:stylesheet>
|