metanorma-iso 2.0.2 → 2.0.5
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/Gemfile +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +20 -0
- data/lib/isodoc/iso/html/wordstyle.scss +20 -0
- data/lib/isodoc/iso/i18n-en.yaml +29 -2
- data/lib/isodoc/iso/i18n-fr.yaml +27 -3
- data/lib/isodoc/iso/i18n-ru.yaml +45 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +27 -3
- data/lib/isodoc/iso/i18n.rb +1 -0
- data/lib/isodoc/iso/init.rb +1 -2
- data/lib/isodoc/iso/iso.amendment.xsl +1752 -807
- data/lib/isodoc/iso/iso.international-standard.xsl +1752 -807
- data/lib/isodoc/iso/metadata.rb +12 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +58 -21
- data/lib/metanorma/iso/basicdoc.rng +5 -3
- data/lib/metanorma/iso/biblio.rng +5 -3
- 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 +42 -11
- 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/processor.rb +14 -7
- data/lib/metanorma/iso/validate.rb +30 -2
- data/lib/metanorma/iso/validate_image.rb +3 -3
- data/lib/metanorma/iso/validate_list.rb +107 -0
- data/lib/metanorma/iso/validate_section.rb +42 -34
- data/lib/metanorma/iso/validate_style.rb +32 -2
- data/lib/metanorma/iso/validate_title.rb +13 -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/inline_spec.rb +127 -10
- data/spec/isodoc/metadata_spec.rb +153 -3
- data/spec/isodoc/postproc_spec.rb +3 -4
- data/spec/isodoc/section_spec.rb +1 -0
- data/spec/isodoc/terms_spec.rb +4 -4
- data/spec/isodoc/xref_spec.rb +18 -18
- data/spec/metanorma/base_spec.rb +434 -375
- data/spec/metanorma/cleanup_spec.rb +11 -11
- data/spec/metanorma/refs_spec.rb +333 -65
- data/spec/metanorma/section_spec.rb +15 -20
- data/spec/metanorma/validate_spec.rb +449 -14
- data/spec/spec_helper.rb +6 -4
- data/spec/vcr_cassettes/docrels.yml +211 -16
- data/spec/vcr_cassettes/withdrawn_iso.yml +301 -0
- metadata +6 -3
- data/spec/vcr_cassettes/sortrefs.yml +0 -599
@@ -2,11 +2,6 @@
|
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:param name="svg_images"/>
|
6
|
-
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
7
|
-
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
-
<xsl:param name="basepath"/>
|
9
|
-
|
10
5
|
|
11
6
|
|
12
7
|
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
@@ -15,13 +10,10 @@
|
|
15
10
|
|
16
11
|
|
17
12
|
|
13
|
+
<xsl:variable name="namespace_full">https://www.metanorma.org/ns/iso</xsl:variable>
|
14
|
+
|
18
15
|
<xsl:variable name="debug">false</xsl:variable>
|
19
16
|
|
20
|
-
<xsl:variable name="marginLeftRight1" select="25"/>
|
21
|
-
<xsl:variable name="marginLeftRight2" select="12.5"/>
|
22
|
-
<xsl:variable name="marginTop" select="27.4"/>
|
23
|
-
<xsl:variable name="marginBottom" select="13"/>
|
24
|
-
|
25
17
|
<xsl:variable name="docidentifierISO" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
|
26
18
|
|
27
19
|
<xsl:variable name="all_rights_reserved">
|
@@ -37,19 +29,26 @@
|
|
37
29
|
<!-- <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)"/> -->
|
38
30
|
<xsl:variable name="ISOname" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-reference']"/>
|
39
31
|
|
40
|
-
<!-- Information and documentation — Codes for transcription systems -->
|
41
|
-
<xsl:variable name="title-intro" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-intro']"/>
|
42
|
-
<xsl:variable name="title-intro-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-intro']"/>
|
43
|
-
<xsl:variable name="title-main" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-main']"/>
|
44
|
-
<xsl:variable name="title-main-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-main']"/>
|
45
32
|
<xsl:variable name="part" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@part"/>
|
46
33
|
|
47
34
|
<xsl:variable name="doctype" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype"/>
|
48
|
-
|
35
|
+
<xsl:variable name="doctype_localized" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype[@language = $lang]"/>
|
36
|
+
|
37
|
+
<xsl:variable name="doctype_uppercased">
|
38
|
+
<xsl:choose>
|
39
|
+
<xsl:when test="$doctype_localized != ''">
|
40
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(normalize-space($doctype_localized),'-',' ')))"/>
|
41
|
+
</xsl:when>
|
42
|
+
<xsl:otherwise>
|
43
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(normalize-space($doctype),'-',' ')))"/>
|
44
|
+
</xsl:otherwise>
|
45
|
+
</xsl:choose>
|
46
|
+
</xsl:variable>
|
49
47
|
|
50
48
|
<xsl:variable name="stage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:stage)"/>
|
51
49
|
<xsl:variable name="substage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:substage)"/>
|
52
50
|
<xsl:variable name="stagename" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:stagename)"/>
|
51
|
+
<xsl:variable name="stagename_localized" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage[@language = $lang])"/>
|
53
52
|
<xsl:variable name="abbreviation" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:status/iso:stage/@abbreviation)"/>
|
54
53
|
|
55
54
|
<xsl:variable name="stage-abbreviation">
|
@@ -73,7 +72,10 @@
|
|
73
72
|
|
74
73
|
<xsl:variable name="stage-fullname-uppercased">
|
75
74
|
<xsl:choose>
|
76
|
-
<xsl:when test="$
|
75
|
+
<xsl:when test="$stagename_localized != ''">
|
76
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($stagename_localized))"/>
|
77
|
+
</xsl:when>
|
78
|
+
<xsl:when test="$stagename != ''">
|
77
79
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($stagename))"/>
|
78
80
|
</xsl:when>
|
79
81
|
<xsl:when test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP'">NEW WORK ITEM PROPOSAL</xsl:when>
|
@@ -160,18 +162,26 @@
|
|
160
162
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
161
163
|
<item id="term-script" display="false">3.2</item>
|
162
164
|
-->
|
163
|
-
<xsl:variable name="
|
165
|
+
<xsl:variable name="contents_">
|
164
166
|
<contents>
|
165
167
|
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
166
168
|
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
167
169
|
<xsl:apply-templates select="//iso:indexsect" mode="contents"/>
|
170
|
+
<xsl:call-template name="processTablesFigures_Contents"/>
|
168
171
|
</contents>
|
169
172
|
</xsl:variable>
|
173
|
+
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
170
174
|
|
171
|
-
<xsl:variable name="
|
172
|
-
<xsl:
|
175
|
+
<xsl:variable name="lang_other">
|
176
|
+
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:title[@language != $lang]">
|
177
|
+
<xsl:if test="not(preceding-sibling::iso:title[@language = current()/@language])">
|
178
|
+
<lang><xsl:value-of select="@language"/></lang>
|
179
|
+
</xsl:if>
|
180
|
+
</xsl:for-each>
|
173
181
|
</xsl:variable>
|
174
182
|
|
183
|
+
<xsl:variable name="XML" select="/"/>
|
184
|
+
|
175
185
|
<xsl:template match="/">
|
176
186
|
<xsl:call-template name="namespaceCheck"/>
|
177
187
|
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}"> <!-- -->
|
@@ -428,7 +438,7 @@
|
|
428
438
|
<!-- Reference number -->
|
429
439
|
<fo:block>
|
430
440
|
<xsl:call-template name="getLocalizedString">
|
431
|
-
<xsl:with-param name="key">reference_number</xsl:with-param>
|
441
|
+
<xsl:with-param name="key">reference_number</xsl:with-param>
|
432
442
|
</xsl:call-template>
|
433
443
|
</fo:block>
|
434
444
|
<fo:block>
|
@@ -476,7 +486,12 @@
|
|
476
486
|
</fo:block>
|
477
487
|
</fo:table-cell>
|
478
488
|
<fo:table-cell>
|
479
|
-
<fo:block>
|
489
|
+
<fo:block>
|
490
|
+
<xsl:call-template name="getLocalizedString">
|
491
|
+
<xsl:with-param name="key">secretariat</xsl:with-param>
|
492
|
+
</xsl:call-template>
|
493
|
+
<xsl:text>: </xsl:text>
|
494
|
+
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>
|
480
495
|
</fo:table-cell>
|
481
496
|
</fo:table-row>
|
482
497
|
<fo:table-row>
|
@@ -521,47 +536,45 @@
|
|
521
536
|
<fo:block-container border-top="1mm double black" line-height="1.1" margin-top="3mm">
|
522
537
|
<fo:block margin-right="5mm">
|
523
538
|
<fo:block font-size="18pt" font-weight="bold" margin-top="6pt" role="H1">
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
<xsl:value-of select="$title-main"/>
|
530
|
-
|
531
|
-
<xsl:call-template name="printTitlePartEn"/>
|
532
|
-
|
533
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
534
|
-
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
535
|
-
<fo:block margin-top="12pt" role="H1">
|
536
|
-
<xsl:call-template name="printAmendmentTitle"/>
|
537
|
-
</fo:block>
|
538
|
-
</xsl:if>
|
539
|
-
|
540
|
-
</fo:block>
|
541
|
-
|
542
|
-
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
543
|
-
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
544
|
-
|
545
|
-
<xsl:if test="normalize-space($title-intro-fr) != ''">
|
546
|
-
<xsl:value-of select="$title-intro-fr"/>
|
547
|
-
<xsl:text> — </xsl:text>
|
548
|
-
</xsl:if>
|
549
|
-
|
550
|
-
<xsl:value-of select="$title-main-fr"/>
|
551
|
-
|
552
|
-
<xsl:call-template name="printTitlePartFr"/>
|
539
|
+
|
540
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
541
|
+
|
542
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
553
543
|
|
554
|
-
<xsl:
|
555
|
-
<xsl:
|
556
|
-
|
557
|
-
<xsl:call-template name="printAmendmentTitle">
|
558
|
-
<xsl:with-param name="lang" select="'fr'"/>
|
559
|
-
</xsl:call-template>
|
560
|
-
</fo:block>
|
561
|
-
</xsl:if>
|
544
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
545
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
546
|
+
</xsl:apply-templates>
|
562
547
|
|
548
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
549
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
550
|
+
</xsl:apply-templates>
|
551
|
+
|
563
552
|
</fo:block>
|
553
|
+
|
554
|
+
|
555
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
556
|
+
<xsl:variable name="lang_other" select="."/>
|
557
|
+
|
558
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
559
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
560
|
+
|
561
|
+
<!-- Example: title-intro fr -->
|
562
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
563
|
+
|
564
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
565
|
+
|
566
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
567
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
568
|
+
</xsl:apply-templates>
|
569
|
+
|
570
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
|
571
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
572
|
+
</xsl:apply-templates>
|
573
|
+
|
574
|
+
</fo:block>
|
575
|
+
</xsl:for-each>
|
564
576
|
</fo:block>
|
577
|
+
|
565
578
|
<fo:block margin-top="10mm">
|
566
579
|
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
|
567
580
|
<xsl:if test="position() = 1"><fo:inline>ICS: </fo:inline></xsl:if>
|
@@ -569,6 +582,7 @@
|
|
569
582
|
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
570
583
|
</xsl:for-each>
|
571
584
|
</fo:block>
|
585
|
+
|
572
586
|
</fo:block-container>
|
573
587
|
|
574
588
|
|
@@ -602,6 +616,15 @@
|
|
602
616
|
<xsl:if test="$stage-name = 'final-draft'">FINAL<xsl:value-of select="$linebreak"/>DRAFT</xsl:if> -->
|
603
617
|
</fo:block>
|
604
618
|
</fo:table-cell>
|
619
|
+
|
620
|
+
<xsl:variable name="lastWord">
|
621
|
+
<xsl:call-template name="substring-after-last">
|
622
|
+
<xsl:with-param name="value" select="$doctype_uppercased"/>
|
623
|
+
<xsl:with-param name="delimiter" select="' '"/>
|
624
|
+
</xsl:call-template>
|
625
|
+
</xsl:variable>
|
626
|
+
<xsl:variable name="font-size"><xsl:if test="string-length($lastWord) >= 12">90%</xsl:if></xsl:variable> <!-- to prevent overlapping 'NORME INTERNATIONALE' to number -->
|
627
|
+
|
605
628
|
<fo:table-cell>
|
606
629
|
<fo:block text-align="left">
|
607
630
|
<xsl:choose>
|
@@ -609,6 +632,9 @@
|
|
609
632
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
|
610
633
|
</xsl:when>
|
611
634
|
<xsl:otherwise>
|
635
|
+
<xsl:if test="$font-size != ''">
|
636
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
637
|
+
</xsl:if>
|
612
638
|
<xsl:value-of select="$doctype_uppercased"/>
|
613
639
|
</xsl:otherwise>
|
614
640
|
</xsl:choose>
|
@@ -616,6 +642,9 @@
|
|
616
642
|
</fo:table-cell>
|
617
643
|
<fo:table-cell>
|
618
644
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
645
|
+
<xsl:if test="$font-size != ''">
|
646
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
647
|
+
</xsl:if>
|
619
648
|
<xsl:value-of select="$docidentifierISO"/>
|
620
649
|
</fo:block>
|
621
650
|
</fo:table-cell>
|
@@ -713,54 +742,43 @@
|
|
713
742
|
<fo:block margin-right="5mm">
|
714
743
|
<fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
|
715
744
|
|
716
|
-
<xsl:
|
717
|
-
<xsl:value-of select="$title-intro"/>
|
718
|
-
<xsl:text> — </xsl:text>
|
719
|
-
</xsl:if>
|
720
|
-
|
721
|
-
<xsl:value-of select="$title-main"/>
|
722
|
-
|
723
|
-
<xsl:call-template name="printTitlePartEn"/>
|
724
|
-
<!-- <xsl:if test="normalize-space($title-part) != ''">
|
725
|
-
<xsl:if test="$part != ''">
|
726
|
-
<xsl:text> — </xsl:text>
|
727
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
728
|
-
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
729
|
-
<xsl:text>:</xsl:text>
|
730
|
-
</fo:block>
|
731
|
-
</xsl:if>
|
732
|
-
<xsl:value-of select="$title-part"/>
|
733
|
-
</xsl:if> -->
|
734
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
735
|
-
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
736
|
-
<fo:block margin-right="-5mm" margin-top="12pt" role="H1">
|
737
|
-
<xsl:call-template name="printAmendmentTitle"/>
|
738
|
-
</fo:block>
|
739
|
-
</xsl:if>
|
740
|
-
</fo:block>
|
741
|
-
|
742
|
-
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
743
|
-
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
744
|
-
|
745
|
-
<xsl:if test="normalize-space($title-intro-fr) != ''">
|
746
|
-
<xsl:value-of select="$title-intro-fr"/>
|
747
|
-
<xsl:text> — </xsl:text>
|
748
|
-
</xsl:if>
|
745
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
749
746
|
|
750
|
-
<xsl:
|
747
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
751
748
|
|
752
|
-
<xsl:
|
749
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
750
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
751
|
+
</xsl:apply-templates>
|
753
752
|
|
754
|
-
<xsl:
|
755
|
-
|
756
|
-
|
757
|
-
<xsl:call-template name="printAmendmentTitle">
|
758
|
-
<xsl:with-param name="lang" select="'fr'"/>
|
759
|
-
</xsl:call-template>
|
760
|
-
</fo:block>
|
761
|
-
</xsl:if>
|
753
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
754
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
755
|
+
</xsl:apply-templates>
|
762
756
|
|
763
757
|
</fo:block>
|
758
|
+
|
759
|
+
|
760
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
761
|
+
<xsl:variable name="lang_other" select="."/>
|
762
|
+
|
763
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
764
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
765
|
+
|
766
|
+
<!-- Example: title-intro fr -->
|
767
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
768
|
+
|
769
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
770
|
+
|
771
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
772
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
773
|
+
</xsl:apply-templates>
|
774
|
+
|
775
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
|
776
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
777
|
+
</xsl:apply-templates>
|
778
|
+
|
779
|
+
</fo:block>
|
780
|
+
</xsl:for-each>
|
781
|
+
|
764
782
|
</fo:block>
|
765
783
|
</fo:block-container>
|
766
784
|
</fo:table-cell>
|
@@ -844,41 +862,35 @@
|
|
844
862
|
|
845
863
|
<fo:block-container border-top="1mm double black" line-height="1.1">
|
846
864
|
<fo:block margin-right="40mm">
|
847
|
-
|
848
|
-
|
849
|
-
<xsl:if test="normalize-space($title-intro) != ''">
|
850
|
-
<xsl:value-of select="$title-intro"/>
|
851
|
-
<xsl:text> — </xsl:text>
|
852
|
-
</xsl:if>
|
853
|
-
|
854
|
-
<xsl:value-of select="$title-main"/>
|
865
|
+
<fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
|
855
866
|
|
856
|
-
|
857
|
-
|
858
|
-
<xsl:
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
867
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
868
|
+
|
869
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
870
|
+
|
871
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
872
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
873
|
+
</xsl:apply-templates>
|
874
|
+
|
875
|
+
</fo:block>
|
876
|
+
|
877
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
878
|
+
<xsl:variable name="lang_other" select="."/>
|
879
|
+
|
880
|
+
<fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
|
881
|
+
<fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
|
868
882
|
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
</fo:block>
|
883
|
+
<!-- Example: title-intro fr -->
|
884
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
885
|
+
|
886
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
887
|
+
|
888
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
889
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
890
|
+
</xsl:apply-templates>
|
891
|
+
|
892
|
+
</fo:block>
|
893
|
+
</xsl:for-each>
|
882
894
|
</fo:block>
|
883
895
|
</fo:block-container>
|
884
896
|
</fo:block-container>
|
@@ -961,48 +973,35 @@
|
|
961
973
|
<!-- Information and documentation — Codes for transcription systems -->
|
962
974
|
<fo:block font-weight="bold" role="H1">
|
963
975
|
|
964
|
-
<xsl:
|
965
|
-
|
966
|
-
|
967
|
-
</xsl:if>
|
968
|
-
|
969
|
-
<xsl:value-of select="$title-main"/>
|
976
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
977
|
+
|
978
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
970
979
|
|
971
|
-
<xsl:
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
976
|
-
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
977
|
-
<xsl:text>:</xsl:text>
|
978
|
-
</fo:block>
|
979
|
-
</xsl:if>
|
980
|
-
<xsl:value-of select="$title-part"/>
|
981
|
-
</xsl:if> -->
|
980
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
981
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
982
|
+
</xsl:apply-templates>
|
983
|
+
|
982
984
|
</fo:block>
|
983
985
|
|
984
|
-
<
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
</xsl:if>
|
986
|
+
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
987
|
+
<xsl:variable name="lang_other" select="."/>
|
988
|
+
|
989
|
+
<fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
|
990
|
+
<fo:block role="H1">
|
990
991
|
|
991
|
-
|
992
|
+
<!-- Example: title-intro fr -->
|
993
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
994
|
+
|
995
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
996
|
+
|
997
|
+
<xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
998
|
+
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
999
|
+
</xsl:apply-templates>
|
1000
|
+
|
1001
|
+
</fo:block>
|
992
1002
|
|
993
|
-
|
994
|
-
|
995
|
-
<xsl:if test="$part != ''">
|
996
|
-
<xsl:text> — </xsl:text>
|
997
|
-
<fo:block margin-top="6pt" font-weight="normal">
|
998
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
999
|
-
<!-- <xsl:value-of select="$title-part-fr"/><xsl:value-of select="$part"/>
|
1000
|
-
<xsl:text>:</xsl:text> -->
|
1001
|
-
</fo:block>
|
1002
|
-
</xsl:if>
|
1003
|
-
<xsl:value-of select="$part-fr"/>
|
1004
|
-
</xsl:if>
|
1005
|
-
</fo:block>
|
1003
|
+
</xsl:for-each>
|
1004
|
+
|
1006
1005
|
</fo:block-container>
|
1007
1006
|
<fo:block font-size="11pt" margin-bottom="8pt"><xsl:value-of select="$linebreak"/></fo:block>
|
1008
1007
|
<fo:block-container font-size="40pt" text-align="center" margin-bottom="12pt" border="0.5pt solid black">
|
@@ -1031,312 +1030,418 @@
|
|
1031
1030
|
</xsl:otherwise>
|
1032
1031
|
</xsl:choose>
|
1033
1032
|
|
1034
|
-
<
|
1035
|
-
<xsl:
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1033
|
+
<xsl:variable name="updated_xml_step1">
|
1034
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
1035
|
+
</xsl:variable>
|
1036
|
+
<!-- DEBUG: updated_xml_step1=<xsl:copy-of select="$updated_xml_step1"/> -->
|
1037
|
+
|
1038
|
+
<xsl:variable name="updated_xml_step2">
|
1039
|
+
<xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
|
1040
|
+
</xsl:variable>
|
1041
|
+
<!-- DEBUG: updated_xml_step2=<xsl:copy-of select="$updated_xml_step2"/> -->
|
1042
|
+
|
1043
|
+
<xsl:for-each select="xalan:nodeset($updated_xml_step2)">
|
1044
|
+
|
1045
|
+
<fo:page-sequence master-reference="preface{$document-master-reference}" format="i" force-page-count="{$force-page-count-preface}">
|
1046
|
+
<xsl:call-template name="insertHeaderFooter">
|
1047
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
1048
|
+
</xsl:call-template>
|
1049
|
+
<fo:flow flow-name="xsl-region-body" line-height="115%">
|
1050
|
+
<xsl:if test="/iso:iso-standard/iso:boilerplate/iso:copyright-statement">
|
1051
|
+
|
1052
|
+
<fo:block-container height="252mm" display-align="after">
|
1053
|
+
<!-- <fo:block margin-bottom="3mm">
|
1054
|
+
<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}"/>
|
1055
|
+
<fo:inline padding-left="6mm" font-size="12pt" font-weight="bold"></fo:inline>
|
1056
|
+
</fo:block> -->
|
1057
|
+
<fo:block line-height="90%">
|
1058
|
+
<fo:block font-size="9pt" text-align="justify">
|
1059
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
|
1060
|
+
</fo:block>
|
1049
1061
|
</fo:block>
|
1050
|
-
</fo:block>
|
1051
|
-
</
|
1052
|
-
</xsl:if>
|
1053
|
-
|
1054
|
-
|
1055
|
-
<xsl:choose>
|
1056
|
-
<xsl:when test="$doctype = 'amendment'"/><!-- ToC shouldn't be generated in amendments. -->
|
1062
|
+
</fo:block-container>
|
1063
|
+
</xsl:if>
|
1057
1064
|
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
<
|
1063
|
-
<
|
1064
|
-
<fo:block
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
<fo:inline keep-together.within-line="always">
|
1072
|
-
<fo:leader leader-pattern="space"/>
|
1073
|
-
<fo:inline font-weight="normal" font-size="10pt">
|
1074
|
-
<!-- Page -->
|
1065
|
+
|
1066
|
+
<xsl:choose>
|
1067
|
+
<xsl:when test="$doctype = 'amendment'"/><!-- ToC shouldn't be generated in amendments. -->
|
1068
|
+
|
1069
|
+
<xsl:otherwise>
|
1070
|
+
<xsl:if test="/iso:iso-standard/iso:boilerplate/iso:copyright-statement">
|
1071
|
+
<fo:block break-after="page"/>
|
1072
|
+
</xsl:if>
|
1073
|
+
<fo:block-container font-weight="bold">
|
1074
|
+
<fo:block role="TOC">
|
1075
|
+
<fo:block text-align-last="justify" font-size="16pt" margin-top="10pt" margin-bottom="18pt">
|
1076
|
+
<fo:inline font-size="16pt" font-weight="bold" role="H1">
|
1077
|
+
<!-- Contents -->
|
1075
1078
|
<xsl:call-template name="getLocalizedString">
|
1076
|
-
|
1077
|
-
|
1079
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1080
|
+
</xsl:call-template>
|
1078
1081
|
</fo:inline>
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
<xsl:variable name="margin-left">12</xsl:variable>
|
1090
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1082
|
+
<fo:inline keep-together.within-line="always">
|
1083
|
+
<fo:leader leader-pattern="space"/>
|
1084
|
+
<fo:inline font-weight="normal" font-size="10pt">
|
1085
|
+
<!-- Page -->
|
1086
|
+
<xsl:call-template name="getLocalizedString">
|
1087
|
+
<xsl:with-param name="key">locality.page</xsl:with-param>
|
1088
|
+
</xsl:call-template>
|
1089
|
+
</fo:inline>
|
1090
|
+
</fo:inline>
|
1091
|
+
</fo:block>
|
1091
1092
|
|
1092
|
-
<
|
1093
|
-
<xsl:
|
1094
|
-
|
1095
|
-
|
1096
|
-
<xsl:
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1093
|
+
<xsl:if test="$debug = 'true'">
|
1094
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
1095
|
+
DEBUG
|
1096
|
+
contents=<xsl:copy-of select="$contents"/>
|
1097
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
1098
|
+
</xsl:if>
|
1099
|
+
|
1100
|
+
<xsl:variable name="margin-left">12</xsl:variable>
|
1101
|
+
<xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1102
|
+
|
1103
|
+
<fo:block role="TOCI">
|
1104
|
+
<xsl:if test="@level = 1">
|
1105
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
1103
1106
|
</xsl:if>
|
1104
|
-
<xsl:
|
1105
|
-
<xsl:
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1107
|
+
<xsl:if test="@level = 3">
|
1108
|
+
<xsl:attribute name="margin-top">-0.7pt</xsl:attribute>
|
1109
|
+
</xsl:if>
|
1110
|
+
<fo:list-block>
|
1111
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
|
1112
|
+
<xsl:if test="@level >= 2 or @type = 'annex'">
|
1113
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1114
|
+
</xsl:if>
|
1115
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
1116
|
+
<xsl:choose>
|
1117
|
+
<!-- skip 0 section without subsections -->
|
1118
|
+
<xsl:when test="@level >= 3"><xsl:value-of select="$margin-left * 1.2"/>mm</xsl:when>
|
1119
|
+
<xsl:when test="@section != ''"><xsl:value-of select="$margin-left"/>mm</xsl:when>
|
1120
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1121
|
+
</xsl:choose>
|
1122
|
+
</xsl:attribute>
|
1123
|
+
<fo:list-item>
|
1124
|
+
<fo:list-item-label end-indent="label-end()">
|
1125
|
+
<fo:block>
|
1126
|
+
<xsl:value-of select="@section"/>
|
1127
|
+
</fo:block>
|
1128
|
+
</fo:list-item-label>
|
1129
|
+
<fo:list-item-body start-indent="body-start()">
|
1130
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
1131
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1123
1132
|
|
1124
|
-
|
1125
|
-
|
1126
|
-
<fo:inline
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1133
|
+
<xsl:apply-templates select="title"/>
|
1134
|
+
|
1135
|
+
<fo:inline keep-together.within-line="always">
|
1136
|
+
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
1137
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1138
|
+
</fo:inline>
|
1139
|
+
</fo:basic-link>
|
1140
|
+
</fo:block>
|
1141
|
+
</fo:list-item-body>
|
1142
|
+
</fo:list-item>
|
1143
|
+
</fo:list-block>
|
1144
|
+
</fo:block>
|
1145
|
+
|
1146
|
+
</xsl:for-each>
|
1134
1147
|
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1148
|
+
<!-- List of Tables -->
|
1149
|
+
<xsl:if test="$contents//tables/table">
|
1150
|
+
<xsl:call-template name="insertListOf_Title">
|
1151
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
1152
|
+
</xsl:call-template>
|
1153
|
+
<xsl:for-each select="$contents//tables/table">
|
1154
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1155
|
+
</xsl:for-each>
|
1156
|
+
</xsl:if>
|
1157
|
+
|
1158
|
+
<!-- List of Figures -->
|
1159
|
+
<xsl:if test="$contents//figures/figure">
|
1160
|
+
<xsl:call-template name="insertListOf_Title">
|
1161
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
1162
|
+
</xsl:call-template>
|
1163
|
+
<xsl:for-each select="$contents//figures/figure">
|
1164
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1165
|
+
</xsl:for-each>
|
1166
|
+
</xsl:if>
|
1167
|
+
|
1168
|
+
</fo:block>
|
1169
|
+
</fo:block-container>
|
1170
|
+
</xsl:otherwise>
|
1171
|
+
</xsl:choose>
|
1143
1172
|
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
1150
|
-
<fo:block>
|
1151
|
-
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
1152
|
-
</fo:block>
|
1153
|
-
</fo:static-content>
|
1154
|
-
<xsl:call-template name="insertHeaderFooter"/>
|
1155
|
-
<fo:flow flow-name="xsl-region-body">
|
1173
|
+
<!-- Foreword, Introduction -->
|
1174
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
1175
|
+
|
1176
|
+
</fo:flow>
|
1177
|
+
</fo:page-sequence>
|
1156
1178
|
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
<
|
1179
|
+
<!-- BODY -->
|
1180
|
+
<fo:page-sequence master-reference="document{$document-master-reference}" initial-page-number="1" force-page-count="no-force">
|
1181
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
1182
|
+
<fo:block>
|
1183
|
+
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
1162
1184
|
</fo:block>
|
1163
|
-
|
1164
|
-
|
1185
|
+
</fo:static-content>
|
1186
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
1187
|
+
<fo:flow flow-name="xsl-region-body">
|
1188
|
+
|
1165
1189
|
|
1166
|
-
|
1167
|
-
|
1168
|
-
<
|
1190
|
+
<fo:block-container>
|
1191
|
+
<!-- Information and documentation — Codes for transcription systems -->
|
1192
|
+
<!-- <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt">
|
1193
|
+
<xsl:value-of select="$title-en"/>
|
1194
|
+
</fo:block>
|
1195
|
+
-->
|
1196
|
+
<fo:block font-size="18pt" font-weight="bold" margin-top="40pt" margin-bottom="20pt" line-height="1.1">
|
1169
1197
|
|
1170
|
-
|
1171
|
-
<xsl:if test="normalize-space($title-intro-doc-lang) != ''">
|
1172
|
-
<xsl:value-of select="$title-intro-doc-lang"/>
|
1173
|
-
<xsl:text> — </xsl:text>
|
1174
|
-
</xsl:if>
|
1198
|
+
<fo:block role="H1">
|
1175
1199
|
|
1176
|
-
|
1200
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1201
|
+
|
1202
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
1203
|
+
|
1204
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
1205
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
1206
|
+
<xsl:with-param name="isMainBody">true</xsl:with-param>
|
1207
|
+
</xsl:apply-templates>
|
1208
|
+
|
1209
|
+
</fo:block>
|
1210
|
+
<fo:block role="H1">
|
1211
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
1212
|
+
</fo:block>
|
1177
1213
|
|
1178
|
-
<xsl:
|
1214
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']">
|
1215
|
+
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
1216
|
+
<xsl:with-param name="isMainBody">true</xsl:with-param>
|
1217
|
+
</xsl:apply-templates>
|
1179
1218
|
|
1180
|
-
<xsl:if test="normalize-space($title-part-doc-lang) != ''">
|
1181
|
-
<xsl:if test="$part != ''">
|
1182
|
-
<xsl:text> — </xsl:text>
|
1183
|
-
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1184
|
-
<xsl:call-template name="getLocalizedString">
|
1185
|
-
<xsl:with-param name="key">Part.sg</xsl:with-param>
|
1186
|
-
</xsl:call-template>
|
1187
|
-
<xsl:text> </xsl:text>
|
1188
|
-
<xsl:value-of select="$part"/>
|
1189
|
-
<xsl:text>:</xsl:text>
|
1190
|
-
<!-- <xsl:value-of select="$title-part-en"/>
|
1191
|
-
<xsl:value-of select="$part"/>
|
1192
|
-
<xsl:text>:</xsl:text> -->
|
1193
|
-
</fo:block>
|
1194
|
-
</xsl:if>
|
1195
|
-
</xsl:if>
|
1196
1219
|
</fo:block>
|
1197
|
-
<fo:block role="H1">
|
1198
|
-
<xsl:value-of select="$title-part-doc-lang"/>
|
1199
|
-
</fo:block>
|
1200
|
-
|
1201
|
-
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
|
1202
|
-
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1203
|
-
<fo:block margin-top="12pt" role="H1">
|
1204
|
-
<xsl:call-template name="printAmendmentTitle"/>
|
1205
|
-
</fo:block>
|
1206
|
-
</xsl:if>
|
1207
1220
|
|
1221
|
+
</fo:block-container>
|
1222
|
+
<!-- Clause(s) -->
|
1223
|
+
<fo:block>
|
1224
|
+
|
1225
|
+
<xsl:choose>
|
1226
|
+
<xsl:when test="$doctype = 'amendment'">
|
1227
|
+
<xsl:apply-templates select="/iso:iso-standard/iso:sections/*"/>
|
1228
|
+
</xsl:when>
|
1229
|
+
<xsl:otherwise>
|
1230
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
1231
|
+
</xsl:otherwise>
|
1232
|
+
</xsl:choose>
|
1233
|
+
|
1234
|
+
<fo:block id="lastBlock" font-size="1pt"> </fo:block>
|
1208
1235
|
</fo:block>
|
1209
|
-
|
1210
|
-
</fo:block-container>
|
1211
|
-
<!-- Clause(s) -->
|
1212
|
-
<fo:block>
|
1213
1236
|
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
<
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1237
|
+
</fo:flow>
|
1238
|
+
</fo:page-sequence>
|
1239
|
+
|
1240
|
+
|
1241
|
+
<!-- Index -->
|
1242
|
+
<xsl:apply-templates select="//iso:indexsect" mode="index"/>
|
1243
|
+
|
1244
|
+
<xsl:if test="$isPublished = 'true'">
|
1245
|
+
<fo:page-sequence master-reference="last-page" force-page-count="no-force">
|
1246
|
+
<xsl:call-template name="insertHeaderEven"/>
|
1247
|
+
<fo:static-content flow-name="last-page-footer" font-size="10pt">
|
1248
|
+
<fo:table table-layout="fixed" width="100%">
|
1249
|
+
<fo:table-column column-width="33%"/>
|
1250
|
+
<fo:table-column column-width="33%"/>
|
1251
|
+
<fo:table-column column-width="34%"/>
|
1252
|
+
<fo:table-body>
|
1253
|
+
<fo:table-row>
|
1254
|
+
<fo:table-cell display-align="center">
|
1255
|
+
<fo:block font-size="9pt"><xsl:value-of select="$copyrightText"/></fo:block>
|
1256
|
+
</fo:table-cell>
|
1257
|
+
<fo:table-cell>
|
1258
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center">
|
1259
|
+
<xsl:if test="$stage-abbreviation = 'PRF'">
|
1260
|
+
<xsl:value-of select="$proof-text"/>
|
1261
|
+
</xsl:if>
|
1262
|
+
</fo:block>
|
1263
|
+
</fo:table-cell>
|
1264
|
+
<fo:table-cell>
|
1265
|
+
<fo:block> </fo:block>
|
1266
|
+
</fo:table-cell>
|
1267
|
+
</fo:table-row>
|
1268
|
+
</fo:table-body>
|
1269
|
+
</fo:table>
|
1270
|
+
</fo:static-content>
|
1271
|
+
<fo:flow flow-name="xsl-region-body">
|
1272
|
+
<fo:block-container height="252mm" display-align="after">
|
1273
|
+
<fo:block-container border-top="1mm double black">
|
1274
|
+
<fo:block font-size="12pt" font-weight="bold" padding-top="3.5mm" padding-bottom="0.5mm">
|
1275
|
+
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
|
1276
|
+
<xsl:if test="position() = 1"><fo:inline>ICS </fo:inline></xsl:if>
|
1277
|
+
<xsl:value-of select="."/>
|
1278
|
+
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
1279
|
+
</xsl:for-each>
|
1280
|
+
<!-- <xsl:choose>
|
1281
|
+
<xsl:when test="$stage-name = 'FDIS'">ICS  01.140.30</xsl:when>
|
1282
|
+
<xsl:when test="$stage-name = 'PRF'">ICS  35.240.63</xsl:when>
|
1283
|
+
<xsl:when test="$stage-name = 'published'">ICS  35.240.30</xsl:when>
|
1284
|
+
<xsl:otherwise>ICS  67.060</xsl:otherwise>
|
1285
|
+
</xsl:choose> -->
|
1251
1286
|
</fo:block>
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
<fo:block-container border-top="1mm double black">
|
1263
|
-
<fo:block font-size="12pt" font-weight="bold" padding-top="3.5mm" padding-bottom="0.5mm">
|
1264
|
-
<xsl:for-each select="/iso:iso-standard/iso:bibdata/iso:ext/iso:ics/iso:code">
|
1265
|
-
<xsl:if test="position() = 1"><fo:inline>ICS </fo:inline></xsl:if>
|
1266
|
-
<xsl:value-of select="."/>
|
1267
|
-
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
1268
|
-
</xsl:for-each>
|
1269
|
-
<!-- <xsl:choose>
|
1270
|
-
<xsl:when test="$stage-name = 'FDIS'">ICS  01.140.30</xsl:when>
|
1271
|
-
<xsl:when test="$stage-name = 'PRF'">ICS  35.240.63</xsl:when>
|
1272
|
-
<xsl:when test="$stage-name = 'published'">ICS  35.240.30</xsl:when>
|
1273
|
-
<xsl:otherwise>ICS  67.060</xsl:otherwise>
|
1274
|
-
</xsl:choose> -->
|
1275
|
-
</fo:block>
|
1276
|
-
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
|
1277
|
-
<fo:block font-size="9pt" margin-bottom="6pt">
|
1278
|
-
<xsl:variable name="title-descriptors">
|
1279
|
-
<xsl:call-template name="getTitle">
|
1280
|
-
<xsl:with-param name="name" select="'title-descriptors'"/>
|
1287
|
+
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
|
1288
|
+
<fo:block font-size="9pt" margin-bottom="6pt">
|
1289
|
+
<xsl:variable name="title-descriptors">
|
1290
|
+
<xsl:call-template name="getTitle">
|
1291
|
+
<xsl:with-param name="name" select="'title-descriptors'"/>
|
1292
|
+
</xsl:call-template>
|
1293
|
+
</xsl:variable>
|
1294
|
+
<fo:inline font-weight="bold"><xsl:value-of select="$title-descriptors"/>: </fo:inline>
|
1295
|
+
<xsl:call-template name="insertKeywords">
|
1296
|
+
<xsl:with-param name="sorting">no</xsl:with-param>
|
1281
1297
|
</xsl:call-template>
|
1282
|
-
</
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1298
|
+
</fo:block>
|
1299
|
+
</xsl:if>
|
1300
|
+
<xsl:variable name="countPages"/>
|
1301
|
+
<xsl:variable name="price_based_on">
|
1302
|
+
<xsl:call-template name="getLocalizedString">
|
1303
|
+
<xsl:with-param name="key">price_based_on</xsl:with-param>
|
1304
|
+
</xsl:call-template>
|
1305
|
+
</xsl:variable>
|
1306
|
+
<xsl:variable name="price_based_on_items">
|
1307
|
+
<xsl:call-template name="split">
|
1308
|
+
<xsl:with-param name="pText" select="$price_based_on"/>
|
1309
|
+
<xsl:with-param name="sep" select="'%'"/>
|
1310
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
1286
1311
|
</xsl:call-template>
|
1312
|
+
</xsl:variable>
|
1313
|
+
<!-- Price based on ... pages -->
|
1314
|
+
<fo:block font-size="9pt">
|
1315
|
+
<xsl:for-each select="xalan:nodeset($price_based_on_items)/item">
|
1316
|
+
<xsl:value-of select="."/>
|
1317
|
+
<xsl:if test="position() != last()">
|
1318
|
+
<fo:page-number-citation ref-id="lastBlock"/>
|
1319
|
+
</xsl:if>
|
1320
|
+
</xsl:for-each>
|
1287
1321
|
</fo:block>
|
1288
|
-
</
|
1289
|
-
<xsl:variable name="countPages"/>
|
1290
|
-
<xsl:variable name="price_based_on">
|
1291
|
-
<xsl:call-template name="getLocalizedString">
|
1292
|
-
<xsl:with-param name="key">price_based_on</xsl:with-param>
|
1293
|
-
</xsl:call-template>
|
1294
|
-
</xsl:variable>
|
1295
|
-
<xsl:variable name="price_based_on_items">
|
1296
|
-
<xsl:call-template name="split">
|
1297
|
-
<xsl:with-param name="pText" select="$price_based_on"/>
|
1298
|
-
<xsl:with-param name="sep" select="'%'"/>
|
1299
|
-
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
1300
|
-
</xsl:call-template>
|
1301
|
-
</xsl:variable>
|
1302
|
-
<!-- Price based on ... pages -->
|
1303
|
-
<fo:block font-size="9pt">
|
1304
|
-
<xsl:for-each select="xalan:nodeset($price_based_on_items)/item">
|
1305
|
-
<xsl:value-of select="."/>
|
1306
|
-
<xsl:if test="position() != last()">
|
1307
|
-
<fo:page-number-citation ref-id="lastBlock"/>
|
1308
|
-
</xsl:if>
|
1309
|
-
</xsl:for-each>
|
1310
|
-
</fo:block>
|
1322
|
+
</fo:block-container>
|
1311
1323
|
</fo:block-container>
|
1312
|
-
</fo:
|
1313
|
-
</fo:
|
1314
|
-
</
|
1315
|
-
</xsl:
|
1324
|
+
</fo:flow>
|
1325
|
+
</fo:page-sequence>
|
1326
|
+
</xsl:if>
|
1327
|
+
</xsl:for-each>
|
1316
1328
|
</fo:root>
|
1317
1329
|
</xsl:template>
|
1318
1330
|
|
1331
|
+
|
1332
|
+
<xsl:template name="insertListOf_Title">
|
1333
|
+
<xsl:param name="title"/>
|
1334
|
+
<fo:block role="TOCI" margin-top="5pt" keep-with-next="always">
|
1335
|
+
<xsl:value-of select="$title"/>
|
1336
|
+
</fo:block>
|
1337
|
+
</xsl:template>
|
1338
|
+
|
1339
|
+
<xsl:template name="insertListOf_Item">
|
1340
|
+
<fo:block role="TOCI" font-weight="normal" text-align-last="justify" margin-left="12mm">
|
1341
|
+
<fo:basic-link internal-destination="{@id}">
|
1342
|
+
<xsl:call-template name="setAltText">
|
1343
|
+
<xsl:with-param name="value" select="@alt-text"/>
|
1344
|
+
</xsl:call-template>
|
1345
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1346
|
+
<fo:inline keep-together.within-line="always">
|
1347
|
+
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
1348
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1349
|
+
</fo:inline>
|
1350
|
+
</fo:basic-link>
|
1351
|
+
</fo:block>
|
1352
|
+
</xsl:template>
|
1353
|
+
|
1354
|
+
<!-- ==================== -->
|
1355
|
+
<!-- display titles -->
|
1356
|
+
<!-- ==================== -->
|
1357
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-intro']">
|
1358
|
+
<xsl:apply-templates/>
|
1359
|
+
<xsl:text> — </xsl:text>
|
1360
|
+
</xsl:template>
|
1319
1361
|
|
1320
|
-
<xsl:template match="
|
1321
|
-
<xsl:apply-templates/>
|
1362
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-main']">
|
1363
|
+
<xsl:apply-templates/>
|
1364
|
+
</xsl:template>
|
1365
|
+
|
1366
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-part']">
|
1367
|
+
<xsl:param name="curr_lang" select="$lang"/>
|
1368
|
+
<xsl:param name="isMainLang">false</xsl:param>
|
1369
|
+
<xsl:param name="isMainBody">false</xsl:param>
|
1370
|
+
<xsl:if test="$part != ''">
|
1371
|
+
<xsl:text> — </xsl:text>
|
1372
|
+
<xsl:variable name="part-text">
|
1373
|
+
<xsl:choose>
|
1374
|
+
<xsl:when test="$isMainLang = 'true'">
|
1375
|
+
<xsl:call-template name="getLocalizedString">
|
1376
|
+
<xsl:with-param name="key">locality.part</xsl:with-param>
|
1377
|
+
</xsl:call-template>
|
1378
|
+
<xsl:text> </xsl:text>
|
1379
|
+
<xsl:value-of select="$part"/>
|
1380
|
+
<xsl:text>:</xsl:text>
|
1381
|
+
</xsl:when>
|
1382
|
+
<xsl:otherwise>
|
1383
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang=$curr_lang]),'#',$part)"/>
|
1384
|
+
</xsl:otherwise>
|
1385
|
+
</xsl:choose>
|
1386
|
+
</xsl:variable>
|
1387
|
+
<xsl:choose>
|
1388
|
+
<xsl:when test="$isMainBody = 'true'">
|
1389
|
+
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1390
|
+
<xsl:value-of select="$part-text"/>
|
1391
|
+
</fo:block>
|
1392
|
+
</xsl:when>
|
1393
|
+
<xsl:when test="$isMainLang = 'true'">
|
1394
|
+
<fo:block font-weight="normal" margin-top="6pt">
|
1395
|
+
<xsl:value-of select="$part-text"/>
|
1396
|
+
</fo:block>
|
1397
|
+
</xsl:when>
|
1398
|
+
<xsl:otherwise>
|
1399
|
+
<xsl:value-of select="$part-text"/>
|
1400
|
+
<xsl:text> </xsl:text>
|
1401
|
+
</xsl:otherwise>
|
1402
|
+
</xsl:choose>
|
1403
|
+
</xsl:if>
|
1404
|
+
<xsl:if test="$isMainBody = 'false'">
|
1405
|
+
<xsl:apply-templates/>
|
1406
|
+
</xsl:if>
|
1322
1407
|
</xsl:template>
|
1323
1408
|
|
1324
|
-
<xsl:template
|
1325
|
-
<xsl:param name="
|
1326
|
-
<xsl:
|
1327
|
-
<xsl:
|
1328
|
-
|
1329
|
-
|
1330
|
-
<xsl:
|
1331
|
-
|
1332
|
-
|
1409
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-amd']">
|
1410
|
+
<xsl:param name="isMainLang">false</xsl:param>
|
1411
|
+
<xsl:param name="curr_lang" select="$lang"/>
|
1412
|
+
<xsl:param name="isMainBody">false</xsl:param>
|
1413
|
+
<xsl:if test="$doctype = 'amendment'">
|
1414
|
+
<fo:block margin-right="-5mm" margin-top="6pt" role="H1">
|
1415
|
+
<xsl:if test="$isMainLang = 'true'">
|
1416
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1417
|
+
</xsl:if>
|
1418
|
+
<xsl:if test="$stage-abbreviation = 'DIS' or $isMainBody = 'true'">
|
1419
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1333
1420
|
</xsl:if>
|
1334
|
-
|
1335
|
-
<
|
1421
|
+
|
1422
|
+
<fo:block font-weight="normal" line-height="1.1">
|
1423
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
1424
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1425
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1426
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1427
|
+
</xsl:if>
|
1428
|
+
<xsl:text>: </xsl:text>
|
1429
|
+
<xsl:apply-templates/>
|
1430
|
+
</fo:block>
|
1431
|
+
|
1336
1432
|
</fo:block>
|
1337
1433
|
</xsl:if>
|
1338
1434
|
</xsl:template>
|
1339
1435
|
|
1436
|
+
|
1437
|
+
<!-- ==================== -->
|
1438
|
+
<!-- END display titles -->
|
1439
|
+
<!-- ==================== -->
|
1440
|
+
|
1441
|
+
<xsl:template match="node()">
|
1442
|
+
<xsl:apply-templates/>
|
1443
|
+
</xsl:template>
|
1444
|
+
|
1340
1445
|
<!-- ============================= -->
|
1341
1446
|
<!-- CONTENTS -->
|
1342
1447
|
<!-- ============================= -->
|
@@ -1405,36 +1510,7 @@
|
|
1405
1510
|
|
1406
1511
|
<xsl:template match="iso:p | iso:termsource | iso:termnote" mode="contents"/>
|
1407
1512
|
|
1408
|
-
|
1409
|
-
<xsl:choose>
|
1410
|
-
<xsl:when test="local-name(..) = 'ul'">
|
1411
|
-
<xsl:call-template name="setULLabel"/>
|
1412
|
-
</xsl:when>
|
1413
|
-
<xsl:otherwise> <!-- for ordered lists -->
|
1414
|
-
<xsl:choose>
|
1415
|
-
<xsl:when test="../@type = 'arabic'">
|
1416
|
-
<xsl:number format="1." lang="en"/>
|
1417
|
-
</xsl:when>
|
1418
|
-
<xsl:when test="../@type = 'alphabet'">
|
1419
|
-
<xsl:number format="a)" lang="en"/>
|
1420
|
-
</xsl:when>
|
1421
|
-
<xsl:when test="../@type = 'alphabet_upper'">
|
1422
|
-
<xsl:number format="A." lang="en"/>
|
1423
|
-
</xsl:when>
|
1424
|
-
<xsl:when test="../@type = 'roman'">
|
1425
|
-
<xsl:number format="i)"/>
|
1426
|
-
</xsl:when>
|
1427
|
-
<xsl:when test="../@type = 'roman_upper'">
|
1428
|
-
<xsl:number format="I."/>
|
1429
|
-
</xsl:when>
|
1430
|
-
<xsl:otherwise>
|
1431
|
-
<xsl:number format="a)"/>
|
1432
|
-
</xsl:otherwise>
|
1433
|
-
</xsl:choose>
|
1434
|
-
</xsl:otherwise>
|
1435
|
-
</xsl:choose>
|
1436
|
-
</xsl:template>
|
1437
|
-
|
1513
|
+
|
1438
1514
|
|
1439
1515
|
<!-- ============================= -->
|
1440
1516
|
<!-- ============================= -->
|
@@ -1648,11 +1724,11 @@
|
|
1648
1724
|
<xsl:template match="iso:li//iso:p//text()">
|
1649
1725
|
<xsl:choose>
|
1650
1726
|
<xsl:when test="contains(., '	')">
|
1651
|
-
<!-- <fo:inline white-space="pre"><xsl:value-of select="translate(., $
|
1727
|
+
<!-- <fo:inline white-space="pre"><xsl:value-of select="translate(., $thin_space, ' ')"/></fo:inline> -->
|
1652
1728
|
<fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
|
1653
1729
|
</xsl:when>
|
1654
1730
|
<xsl:otherwise>
|
1655
|
-
<!-- <xsl:value-of select="translate(., $
|
1731
|
+
<!-- <xsl:value-of select="translate(., $thin_space, ' ')"/> -->
|
1656
1732
|
<xsl:value-of select="."/>
|
1657
1733
|
</xsl:otherwise>
|
1658
1734
|
</xsl:choose>
|
@@ -1665,76 +1741,6 @@
|
|
1665
1741
|
<xsl:apply-templates/>
|
1666
1742
|
</xsl:template>
|
1667
1743
|
|
1668
|
-
|
1669
|
-
<xsl:template match="iso:ul | iso:ol" mode="ul_ol">
|
1670
|
-
<fo:list-block provisional-distance-between-starts="7mm" margin-top="8pt"> <!-- margin-bottom="8pt" -->
|
1671
|
-
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
1672
|
-
</fo:list-block>
|
1673
|
-
<xsl:for-each select="./iso:note">
|
1674
|
-
<xsl:call-template name="note"/>
|
1675
|
-
</xsl:for-each>
|
1676
|
-
</xsl:template>
|
1677
|
-
|
1678
|
-
<xsl:template match="iso:li">
|
1679
|
-
<fo:list-item id="{@id}">
|
1680
|
-
<fo:list-item-label end-indent="label-end()">
|
1681
|
-
<fo:block>
|
1682
|
-
<xsl:call-template name="getListItemFormat"/>
|
1683
|
-
</fo:block>
|
1684
|
-
</fo:list-item-label>
|
1685
|
-
<fo:list-item-body start-indent="body-start()">
|
1686
|
-
<fo:block>
|
1687
|
-
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
1688
|
-
|
1689
|
-
<xsl:for-each select="./iso:note">
|
1690
|
-
<xsl:call-template name="note"/>
|
1691
|
-
</xsl:for-each>
|
1692
|
-
</fo:block>
|
1693
|
-
</fo:list-item-body>
|
1694
|
-
</fo:list-item>
|
1695
|
-
</xsl:template>
|
1696
|
-
|
1697
|
-
|
1698
|
-
<xsl:template match="iso:preferred">
|
1699
|
-
<xsl:variable name="levelTerm">
|
1700
|
-
<xsl:call-template name="getLevelTermName"/>
|
1701
|
-
</xsl:variable>
|
1702
|
-
<fo:block line-height="1.1" role="H{$levelTerm}">
|
1703
|
-
<fo:block font-weight="bold" keep-with-next="always">
|
1704
|
-
<xsl:apply-templates select="ancestor::iso:term[1]/iso:name"/>
|
1705
|
-
</fo:block>
|
1706
|
-
<fo:block font-weight="bold" keep-with-next="always">
|
1707
|
-
<xsl:call-template name="setStyle_preferred"/>
|
1708
|
-
<xsl:apply-templates/>
|
1709
|
-
</fo:block>
|
1710
|
-
</fo:block>
|
1711
|
-
</xsl:template>
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
<xsl:template match="iso:formula/iso:stem">
|
1716
|
-
<fo:block margin-top="6pt" margin-bottom="12pt">
|
1717
|
-
<fo:table table-layout="fixed" width="100%">
|
1718
|
-
<fo:table-column column-width="95%"/>
|
1719
|
-
<fo:table-column column-width="5%"/>
|
1720
|
-
<fo:table-body>
|
1721
|
-
<fo:table-row>
|
1722
|
-
<fo:table-cell display-align="center">
|
1723
|
-
<fo:block text-align="left" margin-left="5mm">
|
1724
|
-
<xsl:apply-templates/>
|
1725
|
-
</fo:block>
|
1726
|
-
</fo:table-cell>
|
1727
|
-
<fo:table-cell display-align="center">
|
1728
|
-
<fo:block text-align="right">
|
1729
|
-
<xsl:apply-templates select="../iso:name" mode="formula_number"/>
|
1730
|
-
</fo:block>
|
1731
|
-
</fo:table-cell>
|
1732
|
-
</fo:table-row>
|
1733
|
-
</fo:table-body>
|
1734
|
-
</fo:table>
|
1735
|
-
</fo:block>
|
1736
|
-
</xsl:template>
|
1737
|
-
|
1738
1744
|
|
1739
1745
|
<!-- For express listings PDF attachments -->
|
1740
1746
|
<xsl:template match="*[local-name() = 'eref'][contains(@bibitemid, '.exp')]" priority="2">
|
@@ -1783,26 +1789,6 @@
|
|
1783
1789
|
</fo:page-sequence>
|
1784
1790
|
</xsl:template>
|
1785
1791
|
|
1786
|
-
<!-- <xsl:template match="iso:clause[@type = 'index']/iso:title" priority="4"> -->
|
1787
|
-
<xsl:template match="iso:indexsect/iso:title" priority="4">
|
1788
|
-
<fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" role="H1">
|
1789
|
-
<!-- Index -->
|
1790
|
-
<xsl:apply-templates/>
|
1791
|
-
</fo:block>
|
1792
|
-
</xsl:template>
|
1793
|
-
|
1794
|
-
<!-- <xsl:template match="iso:clause[@type = 'index']/iso:clause/iso:title" priority="4"> -->
|
1795
|
-
<xsl:template match="iso:indexsect/iso:clause/iso:title" priority="4">
|
1796
|
-
<!-- Letter A, B, C, ... -->
|
1797
|
-
<fo:block font-size="10pt" font-weight="bold" margin-bottom="3pt" keep-with-next="always">
|
1798
|
-
<xsl:apply-templates/>
|
1799
|
-
</fo:block>
|
1800
|
-
</xsl:template>
|
1801
|
-
|
1802
|
-
<xsl:template match="iso:indexsect//iso:li/text()">
|
1803
|
-
<!-- to split by '_' and other chars -->
|
1804
|
-
<xsl:call-template name="add-zero-spaces-java"/>
|
1805
|
-
</xsl:template>
|
1806
1792
|
|
1807
1793
|
<xsl:template match="iso:xref" priority="2">
|
1808
1794
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
@@ -1826,9 +1812,9 @@
|
|
1826
1812
|
<!-- End of Index processing -->
|
1827
1813
|
<!-- =================== -->
|
1828
1814
|
|
1829
|
-
<!--
|
1830
|
-
<xsl:template match="text()[contains(., $
|
1831
|
-
<xsl:value-of select="translate(., $
|
1815
|
+
<!--
|
1816
|
+
<xsl:template match="text()[contains(., $thin_space)]">
|
1817
|
+
<xsl:value-of select="translate(., $thin_space, ' ')"/>
|
1832
1818
|
</xsl:template> -->
|
1833
1819
|
|
1834
1820
|
|
@@ -1945,49 +1931,29 @@
|
|
1945
1931
|
</xsl:when>
|
1946
1932
|
</xsl:choose>
|
1947
1933
|
<xsl:variable name="title-edition">
|
1948
|
-
<xsl:call-template name="
|
1949
|
-
<xsl:with-param name="
|
1934
|
+
<xsl:call-template name="getLocalizedString">
|
1935
|
+
<xsl:with-param name="key">edition</xsl:with-param>
|
1950
1936
|
</xsl:call-template>
|
1951
1937
|
</xsl:variable>
|
1952
1938
|
<xsl:if test="$edition != ''"><xsl:text> </xsl:text><xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/></xsl:if>
|
1953
1939
|
</xsl:template>
|
1954
1940
|
|
1955
|
-
<xsl:template name="printTitlePartFr">
|
1956
|
-
<xsl:variable name="part-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-part']"/>
|
1957
|
-
<xsl:if test="normalize-space($part-fr) != ''">
|
1958
|
-
<xsl:if test="$part != ''">
|
1959
|
-
<xsl:text> — </xsl:text>
|
1960
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
1961
|
-
<!-- <xsl:value-of select="$title-part-fr"/>
|
1962
|
-
<xsl:value-of select="$part"/>
|
1963
|
-
<xsl:text>:</xsl:text> -->
|
1964
|
-
</xsl:if>
|
1965
|
-
<xsl:value-of select="$part-fr"/>
|
1966
|
-
</xsl:if>
|
1967
|
-
</xsl:template>
|
1968
|
-
|
1969
|
-
<xsl:template name="printTitlePartEn">
|
1970
|
-
<xsl:variable name="part-en" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-part']"/>
|
1971
|
-
<xsl:if test="normalize-space($part-en) != ''">
|
1972
|
-
<xsl:if test="$part != ''">
|
1973
|
-
<xsl:text> — </xsl:text>
|
1974
|
-
<fo:block font-weight="normal" margin-top="6pt">
|
1975
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
|
1976
|
-
<!-- <xsl:value-of select="$title-part-en"/>
|
1977
|
-
<xsl:value-of select="$part"/>
|
1978
|
-
<xsl:text>:</xsl:text> -->
|
1979
|
-
</fo:block>
|
1980
|
-
</xsl:if>
|
1981
|
-
<xsl:value-of select="$part-en"/>
|
1982
|
-
</xsl:if>
|
1983
|
-
</xsl:template>
|
1984
|
-
|
1985
1941
|
|
1986
|
-
<xsl:variable name="
|
1942
|
+
<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:key name="bibitems" match="*[local-name() = 'bibitem']" use="@id"/><xsl:key name="bibitems_hidden" match="*[local-name() = 'bibitem'][@hidden='true'] | *[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']" use="@id"/><xsl:variable name="lang">
|
1943
|
+
<xsl:call-template name="getLang"/>
|
1944
|
+
</xsl:variable><xsl:variable name="pageWidth_">
|
1987
1945
|
210
|
1988
1946
|
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
|
1989
1947
|
297
|
1990
|
-
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="
|
1948
|
+
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
|
1949
|
+
25
|
1950
|
+
</xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
|
1951
|
+
12.5
|
1952
|
+
</xsl:variable><xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/><xsl:variable name="marginTop_">
|
1953
|
+
27.4
|
1954
|
+
</xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
|
1955
|
+
13
|
1956
|
+
</xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
|
1991
1957
|
|
1992
1958
|
<title-edition lang="en">
|
1993
1959
|
|
@@ -1999,6 +1965,10 @@
|
|
1999
1965
|
<xsl:text>Édition </xsl:text>
|
2000
1966
|
</title-edition>
|
2001
1967
|
|
1968
|
+
<title-edition lang="ru">
|
1969
|
+
<xsl:text>Издание </xsl:text>
|
1970
|
+
</title-edition>
|
1971
|
+
|
2002
1972
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
2003
1973
|
<title-toc lang="en">
|
2004
1974
|
|
@@ -2013,7 +1983,7 @@
|
|
2013
1983
|
<xsl:text>Contents</xsl:text>
|
2014
1984
|
|
2015
1985
|
</title-toc>
|
2016
|
-
|
1986
|
+
|
2017
1987
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
2018
1988
|
|
2019
1989
|
<title-part lang="en">
|
@@ -2029,7 +1999,13 @@
|
|
2029
1999
|
|
2030
2000
|
|
2031
2001
|
|
2032
|
-
</title-part>
|
2002
|
+
</title-part>
|
2003
|
+
<title-part lang="ru">
|
2004
|
+
|
2005
|
+
<xsl:text>Часть #:</xsl:text>
|
2006
|
+
|
2007
|
+
|
2008
|
+
</title-part>
|
2033
2009
|
<title-part lang="zh">第 # 部分:</title-part>
|
2034
2010
|
|
2035
2011
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
@@ -2045,13 +2021,38 @@
|
|
2045
2021
|
|
2046
2022
|
<title-summary lang="en">Summary</title-summary>
|
2047
2023
|
|
2024
|
+
<title-continued lang="ru">(продолжение)</title-continued>
|
2048
2025
|
<title-continued lang="en">(continued)</title-continued>
|
2049
2026
|
<title-continued lang="fr">(continué)</title-continued>
|
2050
2027
|
|
2051
|
-
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="
|
2028
|
+
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="title-list-tables">
|
2029
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2030
|
+
<xsl:value-of select="$toc_table_title"/>
|
2031
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2032
|
+
<xsl:call-template name="getTitle">
|
2033
|
+
<xsl:with-param name="name" select="'title-list-tables'"/>
|
2034
|
+
</xsl:call-template>
|
2035
|
+
</xsl:if>
|
2036
|
+
</xsl:variable><xsl:variable name="title-list-figures">
|
2037
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2038
|
+
<xsl:value-of select="$toc_figure_title"/>
|
2039
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2040
|
+
<xsl:call-template name="getTitle">
|
2041
|
+
<xsl:with-param name="name" select="'title-list-figures'"/>
|
2042
|
+
</xsl:call-template>
|
2043
|
+
</xsl:if>
|
2044
|
+
</xsl:variable><xsl:variable name="title-list-recommendations">
|
2045
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2046
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
2047
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2048
|
+
<xsl:call-template name="getTitle">
|
2049
|
+
<xsl:with-param name="name" select="'title-list-recommendations'"/>
|
2050
|
+
</xsl:call-template>
|
2051
|
+
</xsl:if>
|
2052
|
+
</xsl:variable><xsl:variable name="bibdata">
|
2052
2053
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
2053
2054
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
2054
|
-
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2055
|
+
</xsl:variable><xsl:variable name="linebreak">
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space"></xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
|
2055
2056
|
<xsl:param name="name"/>
|
2056
2057
|
<xsl:param name="lang"/>
|
2057
2058
|
<xsl:variable name="lang_">
|
@@ -2074,7 +2075,7 @@
|
|
2074
2075
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2075
2076
|
</xsl:otherwise>
|
2076
2077
|
</xsl:choose>
|
2077
|
-
</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:
|
2078
|
+
</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:attribute-set name="root-style">
|
2078
2079
|
|
2079
2080
|
|
2080
2081
|
|
@@ -2245,11 +2246,12 @@
|
|
2245
2246
|
|
2246
2247
|
|
2247
2248
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
2248
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2249
2249
|
|
2250
2250
|
|
2251
2251
|
|
2252
|
-
|
2252
|
+
|
2253
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2254
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2253
2255
|
|
2254
2256
|
|
2255
2257
|
|
@@ -2648,12 +2650,11 @@
|
|
2648
2650
|
|
2649
2651
|
|
2650
2652
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2651
|
-
<xsl:attribute name="
|
2653
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
2654
|
+
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
2652
2655
|
|
2653
2656
|
|
2654
2657
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2655
|
-
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
2656
|
-
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
2657
2658
|
|
2658
2659
|
|
2659
2660
|
|
@@ -2661,10 +2662,8 @@
|
|
2661
2662
|
|
2662
2663
|
|
2663
2664
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
2665
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
2664
2666
|
|
2665
|
-
|
2666
|
-
<xsl:attribute name="text-align">right</xsl:attribute>
|
2667
|
-
|
2668
2667
|
|
2669
2668
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
2670
2669
|
|
@@ -2688,6 +2687,9 @@
|
|
2688
2687
|
|
2689
2688
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
2690
2689
|
|
2690
|
+
</xsl:attribute-set><xsl:attribute-set name="term-name-style">
|
2691
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2692
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2691
2693
|
</xsl:attribute-set><xsl:attribute-set name="figure-style">
|
2692
2694
|
|
2693
2695
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -2718,6 +2720,36 @@
|
|
2718
2720
|
|
2719
2721
|
|
2720
2722
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
2723
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2724
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2725
|
+
|
2726
|
+
|
2727
|
+
|
2728
|
+
|
2729
|
+
|
2730
|
+
|
2731
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-stem-block-style">
|
2732
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
2733
|
+
|
2734
|
+
|
2735
|
+
|
2736
|
+
|
2737
|
+
|
2738
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
2739
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
2740
|
+
|
2741
|
+
|
2742
|
+
|
2743
|
+
|
2744
|
+
|
2745
|
+
|
2746
|
+
|
2747
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
|
2748
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
2749
|
+
|
2750
|
+
|
2751
|
+
|
2752
|
+
|
2721
2753
|
|
2722
2754
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
2723
2755
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2753,6 +2785,20 @@
|
|
2753
2785
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2754
2786
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2755
2787
|
|
2788
|
+
</xsl:attribute-set><xsl:attribute-set name="preferred-block-style">
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
|
2793
|
+
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
2794
|
+
|
2795
|
+
|
2796
|
+
|
2797
|
+
</xsl:attribute-set><xsl:attribute-set name="preferred-term-style">
|
2798
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2799
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2800
|
+
|
2801
|
+
|
2756
2802
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2757
2803
|
|
2758
2804
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2771,13 +2817,19 @@
|
|
2771
2817
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2772
2818
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2773
2819
|
</xsl:variable><xsl:attribute-set name="add-style">
|
2774
|
-
|
2775
|
-
|
2776
|
-
|
2777
|
-
|
2778
|
-
|
2779
|
-
|
2780
|
-
|
2820
|
+
|
2821
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2822
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2823
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2824
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2825
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2826
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2827
|
+
|
2828
|
+
</xsl:attribute-set><xsl:variable name="add-style">
|
2829
|
+
<add-style xsl:use-attribute-sets="add-style"/>
|
2830
|
+
</xsl:variable><xsl:template name="append_add-style">
|
2831
|
+
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
2832
|
+
</xsl:template><xsl:variable name="color-deleted-text">
|
2781
2833
|
<xsl:text>red</xsl:text>
|
2782
2834
|
</xsl:variable><xsl:attribute-set name="del-style">
|
2783
2835
|
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
@@ -2790,6 +2842,36 @@
|
|
2790
2842
|
|
2791
2843
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2792
2844
|
|
2845
|
+
|
2846
|
+
|
2847
|
+
|
2848
|
+
|
2849
|
+
|
2850
|
+
|
2851
|
+
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
2852
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2853
|
+
|
2854
|
+
|
2855
|
+
|
2856
|
+
|
2857
|
+
|
2858
|
+
|
2859
|
+
|
2860
|
+
|
2861
|
+
|
2862
|
+
|
2863
|
+
|
2864
|
+
</xsl:attribute-set><xsl:attribute-set name="list-item-style">
|
2865
|
+
|
2866
|
+
|
2867
|
+
</xsl:attribute-set><xsl:attribute-set name="list-item-label-style">
|
2868
|
+
|
2869
|
+
|
2870
|
+
|
2871
|
+
</xsl:attribute-set><xsl:attribute-set name="list-item-body-style">
|
2872
|
+
|
2873
|
+
|
2874
|
+
|
2793
2875
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2794
2876
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2795
2877
|
</xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
|
@@ -3058,15 +3140,156 @@
|
|
3058
3140
|
|
3059
3141
|
|
3060
3142
|
|
3143
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-doctag">
|
3144
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3145
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-keyword">
|
3146
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3147
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-meta_hljs-keyword">
|
3148
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3149
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-template-tag">
|
3150
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3151
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-template-variable">
|
3152
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3153
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-type">
|
3154
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3155
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-variable_and_language_">
|
3156
|
+
<xsl:attribute name="color">#d73a49</xsl:attribute>
|
3157
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-title">
|
3158
|
+
<xsl:attribute name="color">#6f42c1</xsl:attribute>
|
3159
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-title_and_class_">
|
3160
|
+
<xsl:attribute name="color">#6f42c1</xsl:attribute>
|
3161
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-title_and_class__and_inherited__">
|
3162
|
+
<xsl:attribute name="color">#6f42c1</xsl:attribute>
|
3163
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-title_and_function_">
|
3164
|
+
<xsl:attribute name="color">#6f42c1</xsl:attribute>
|
3165
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-attr">
|
3166
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3167
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-attribute">
|
3168
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3169
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-literal">
|
3170
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3171
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-meta">
|
3172
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3173
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-number">
|
3174
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3175
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-operator">
|
3176
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3177
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-variable">
|
3178
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3179
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-selector-attr">
|
3180
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3181
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-selector-class">
|
3182
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3183
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-selector-id">
|
3184
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3185
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-regexp">
|
3186
|
+
<xsl:attribute name="color">#032f62</xsl:attribute>
|
3187
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-string">
|
3188
|
+
<xsl:attribute name="color">#032f62</xsl:attribute>
|
3189
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-meta_hljs-string">
|
3190
|
+
<xsl:attribute name="color">#032f62</xsl:attribute>
|
3191
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-built_in">
|
3192
|
+
<xsl:attribute name="color">#e36209</xsl:attribute>
|
3193
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-symbol">
|
3194
|
+
<xsl:attribute name="color">#e36209</xsl:attribute>
|
3195
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-comment">
|
3196
|
+
<xsl:attribute name="color">#6a737d</xsl:attribute>
|
3197
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-code">
|
3198
|
+
<xsl:attribute name="color">#6a737d</xsl:attribute>
|
3199
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-formula">
|
3200
|
+
<xsl:attribute name="color">#6a737d</xsl:attribute>
|
3201
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-name">
|
3202
|
+
<xsl:attribute name="color">#22863a</xsl:attribute>
|
3203
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-quote">
|
3204
|
+
<xsl:attribute name="color">#22863a</xsl:attribute>
|
3205
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-selector-tag">
|
3206
|
+
<xsl:attribute name="color">#22863a</xsl:attribute>
|
3207
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-selector-pseudo">
|
3208
|
+
<xsl:attribute name="color">#22863a</xsl:attribute>
|
3209
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-subst">
|
3210
|
+
<xsl:attribute name="color">#24292e</xsl:attribute>
|
3211
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-section">
|
3212
|
+
<xsl:attribute name="color">#005cc5</xsl:attribute>
|
3213
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3214
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-bullet">
|
3215
|
+
<xsl:attribute name="color">#735c0f</xsl:attribute>
|
3216
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-emphasis">
|
3217
|
+
<xsl:attribute name="color">#24292e</xsl:attribute>
|
3218
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
3219
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-strong">
|
3220
|
+
<xsl:attribute name="color">#24292e</xsl:attribute>
|
3221
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3222
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-addition">
|
3223
|
+
<xsl:attribute name="color">#22863a</xsl:attribute>
|
3224
|
+
<xsl:attribute name="background-color">#f0fff4</xsl:attribute>
|
3225
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-deletion">
|
3226
|
+
<xsl:attribute name="color">#b31d28</xsl:attribute>
|
3227
|
+
<xsl:attribute name="background-color">#ffeef0</xsl:attribute>
|
3228
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-char_and_escape_">
|
3229
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-link">
|
3230
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-params">
|
3231
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-property">
|
3232
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-punctuation">
|
3233
|
+
</xsl:attribute-set><xsl:attribute-set name="hljs-tag">
|
3234
|
+
</xsl:attribute-set><xsl:attribute-set name="indexsect-title-style">
|
3235
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
3236
|
+
|
3237
|
+
|
3238
|
+
|
3239
|
+
|
3240
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
3241
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3242
|
+
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
3243
|
+
|
3244
|
+
|
3245
|
+
</xsl:attribute-set><xsl:attribute-set name="indexsect-clause-title-style">
|
3246
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3247
|
+
|
3248
|
+
|
3249
|
+
|
3250
|
+
|
3251
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3252
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3253
|
+
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
3254
|
+
|
3255
|
+
|
3061
3256
|
</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">
|
3257
|
+
<xsl:variable name="nodes_preface_">
|
3258
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3259
|
+
<node id="{@id}"/>
|
3260
|
+
</xsl:for-each>
|
3261
|
+
</xsl:variable>
|
3262
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
3263
|
+
|
3062
3264
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3063
3265
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3266
|
+
|
3267
|
+
<!-- process Section's title -->
|
3268
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3269
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3270
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3271
|
+
</xsl:if>
|
3272
|
+
|
3064
3273
|
<xsl:apply-templates select="." mode="contents"/>
|
3065
3274
|
</xsl:for-each>
|
3066
3275
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
3067
3276
|
|
3277
|
+
<xsl:variable name="nodes_sections_">
|
3278
|
+
<xsl:for-each select="/*/*[local-name()='sections']/*">
|
3279
|
+
<node id="{@id}"/>
|
3280
|
+
</xsl:for-each>
|
3281
|
+
</xsl:variable>
|
3282
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
3283
|
+
|
3068
3284
|
<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']]">
|
3069
3285
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3286
|
+
|
3287
|
+
<!-- process Section's title -->
|
3288
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3289
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3290
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3291
|
+
</xsl:if>
|
3292
|
+
|
3070
3293
|
<xsl:apply-templates select="." mode="contents"/>
|
3071
3294
|
</xsl:for-each>
|
3072
3295
|
|
@@ -3079,6 +3302,30 @@
|
|
3079
3302
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3080
3303
|
<xsl:apply-templates select="." mode="contents"/>
|
3081
3304
|
</xsl:for-each>
|
3305
|
+
</xsl:template><xsl:template name="processTablesFigures_Contents">
|
3306
|
+
<xsl:param name="always"/>
|
3307
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3308
|
+
<xsl:call-template name="processTables_Contents"/>
|
3309
|
+
</xsl:if>
|
3310
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3311
|
+
<xsl:call-template name="processFigures_Contents"/>
|
3312
|
+
</xsl:if>
|
3313
|
+
</xsl:template><xsl:template name="processTables_Contents">
|
3314
|
+
<tables>
|
3315
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
3316
|
+
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
3317
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
3318
|
+
</table>
|
3319
|
+
</xsl:for-each>
|
3320
|
+
</tables>
|
3321
|
+
</xsl:template><xsl:template name="processFigures_Contents">
|
3322
|
+
<figures>
|
3323
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
|
3324
|
+
<figure id="{@id}" alt-text="{*[local-name() = 'name']}">
|
3325
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
3326
|
+
</figure>
|
3327
|
+
</xsl:for-each>
|
3328
|
+
</figures>
|
3082
3329
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
3083
3330
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3084
3331
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -3159,9 +3406,12 @@
|
|
3159
3406
|
|
3160
3407
|
|
3161
3408
|
</xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
|
3409
|
+
<xsl:param name="margin"/>
|
3162
3410
|
|
3163
3411
|
<!-- process in the template 'paragraph' -->
|
3164
|
-
<xsl:call-template name="paragraph"
|
3412
|
+
<xsl:call-template name="paragraph">
|
3413
|
+
<xsl:with-param name="margin" select="$margin"/>
|
3414
|
+
</xsl:call-template>
|
3165
3415
|
|
3166
3416
|
</xsl:template><xsl:template match="*[local-name()='feedback-statement']">
|
3167
3417
|
<fo:block xsl:use-attribute-sets="feedback-statement-style">
|
@@ -3173,9 +3423,12 @@
|
|
3173
3423
|
<xsl:call-template name="title"/>
|
3174
3424
|
|
3175
3425
|
</xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
|
3426
|
+
<xsl:param name="margin"/>
|
3176
3427
|
|
3177
3428
|
<!-- process in the template 'paragraph' -->
|
3178
|
-
<xsl:call-template name="paragraph"
|
3429
|
+
<xsl:call-template name="paragraph">
|
3430
|
+
<xsl:with-param name="margin" select="$margin"/>
|
3431
|
+
</xsl:call-template>
|
3179
3432
|
|
3180
3433
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
3181
3434
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
@@ -3210,7 +3463,7 @@
|
|
3210
3463
|
</xsl:call-template>
|
3211
3464
|
</xsl:if>
|
3212
3465
|
</xsl:variable>
|
3213
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3466
|
+
<!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3214
3467
|
|
3215
3468
|
|
3216
3469
|
<xsl:variable name="margin-side">
|
@@ -3480,7 +3733,7 @@
|
|
3480
3733
|
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
3481
3734
|
<!-- 2009 thinspace -->
|
3482
3735
|
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
3483
|
-
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '
|
3736
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
3484
3737
|
</xsl:call-template>
|
3485
3738
|
</xsl:variable>
|
3486
3739
|
<xsl:variable name="max_length">
|
@@ -3521,8 +3774,7 @@
|
|
3521
3774
|
</xsl:call-template>
|
3522
3775
|
</xsl:if>
|
3523
3776
|
</xsl:template><xsl:template match="text()" mode="td_text">
|
3524
|
-
<xsl:
|
3525
|
-
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
3777
|
+
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
3526
3778
|
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
|
3527
3779
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
3528
3780
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
@@ -3940,37 +4192,7 @@
|
|
3940
4192
|
|
3941
4193
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3942
4194
|
<xsl:variable name="p_fn_">
|
3943
|
-
<xsl:
|
3944
|
-
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
3945
|
-
<fn gen_id="{generate-id(.)}">
|
3946
|
-
<xsl:copy-of select="@*"/>
|
3947
|
-
<xsl:copy-of select="node()"/>
|
3948
|
-
</fn>
|
3949
|
-
</xsl:when>
|
3950
|
-
<xsl:otherwise>
|
3951
|
-
<!-- itetation for:
|
3952
|
-
footnotes in bibdata/title
|
3953
|
-
footnotes in bibliography
|
3954
|
-
footnotes in document's body (except table's head/body/foot and figure text)
|
3955
|
-
-->
|
3956
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
3957
|
-
<fn gen_id="{generate-id(.)}">
|
3958
|
-
<xsl:copy-of select="@*"/>
|
3959
|
-
<xsl:copy-of select="node()"/>
|
3960
|
-
</fn>
|
3961
|
-
</xsl:for-each>
|
3962
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
3963
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
3964
|
-
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
3965
|
-
<!-- copy unique fn -->
|
3966
|
-
<fn gen_id="{generate-id(.)}">
|
3967
|
-
<xsl:copy-of select="@*"/>
|
3968
|
-
<xsl:copy-of select="node()"/>
|
3969
|
-
</fn>
|
3970
|
-
</xsl:for-each>
|
3971
|
-
</xsl:for-each>
|
3972
|
-
</xsl:otherwise>
|
3973
|
-
</xsl:choose>
|
4195
|
+
<xsl:call-template name="get_fn_list"/>
|
3974
4196
|
</xsl:variable>
|
3975
4197
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3976
4198
|
|
@@ -4033,6 +4255,38 @@
|
|
4033
4255
|
<xsl:copy-of select="$footnote_inline"/>
|
4034
4256
|
</xsl:otherwise>
|
4035
4257
|
</xsl:choose>
|
4258
|
+
</xsl:template><xsl:template name="get_fn_list">
|
4259
|
+
<xsl:choose>
|
4260
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
4261
|
+
<fn gen_id="{generate-id(.)}">
|
4262
|
+
<xsl:copy-of select="@*"/>
|
4263
|
+
<xsl:copy-of select="node()"/>
|
4264
|
+
</fn>
|
4265
|
+
</xsl:when>
|
4266
|
+
<xsl:otherwise>
|
4267
|
+
<!-- itetation for:
|
4268
|
+
footnotes in bibdata/title
|
4269
|
+
footnotes in bibliography
|
4270
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
4271
|
+
-->
|
4272
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
4273
|
+
<fn gen_id="{generate-id(.)}">
|
4274
|
+
<xsl:copy-of select="@*"/>
|
4275
|
+
<xsl:copy-of select="node()"/>
|
4276
|
+
</fn>
|
4277
|
+
</xsl:for-each>
|
4278
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
4279
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
4280
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4281
|
+
<!-- copy unique fn -->
|
4282
|
+
<fn gen_id="{generate-id(.)}">
|
4283
|
+
<xsl:copy-of select="@*"/>
|
4284
|
+
<xsl:copy-of select="node()"/>
|
4285
|
+
</fn>
|
4286
|
+
</xsl:for-each>
|
4287
|
+
</xsl:for-each>
|
4288
|
+
</xsl:otherwise>
|
4289
|
+
</xsl:choose>
|
4036
4290
|
</xsl:template><xsl:template name="table_fn_display">
|
4037
4291
|
<xsl:variable name="references">
|
4038
4292
|
|
@@ -4209,7 +4463,7 @@
|
|
4209
4463
|
</fo:inline>
|
4210
4464
|
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
4211
4465
|
<fo:inline><xsl:value-of select="."/></fo:inline>
|
4212
|
-
</xsl:template><xsl:template match="*[local-name()='fn']
|
4466
|
+
</xsl:template><xsl:template match="*[local-name()='fn']//*[local-name()='p']">
|
4213
4467
|
<fo:inline>
|
4214
4468
|
<xsl:apply-templates/>
|
4215
4469
|
</fo:inline>
|
@@ -4586,20 +4840,44 @@
|
|
4586
4840
|
<fo:inline text-decoration="underline">
|
4587
4841
|
<xsl:apply-templates/>
|
4588
4842
|
</fo:inline>
|
4589
|
-
</xsl:template><xsl:template match="*[local-name()='add']">
|
4843
|
+
</xsl:template><xsl:template match="*[local-name()='add']" name="tag_add">
|
4590
4844
|
<xsl:param name="skip">true</xsl:param>
|
4845
|
+
<xsl:param name="block">false</xsl:param>
|
4846
|
+
<xsl:param name="type"/>
|
4847
|
+
<xsl:param name="text-align"/>
|
4591
4848
|
<xsl:choose>
|
4592
4849
|
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
4593
4850
|
<xsl:choose>
|
4594
|
-
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4851
|
+
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4595
4852
|
<xsl:otherwise>
|
4596
|
-
<
|
4853
|
+
<xsl:variable name="tag">
|
4597
4854
|
<xsl:call-template name="insertTag">
|
4598
|
-
<xsl:with-param name="type"
|
4855
|
+
<xsl:with-param name="type">
|
4856
|
+
<xsl:choose>
|
4857
|
+
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4858
|
+
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4859
|
+
</xsl:choose>
|
4860
|
+
</xsl:with-param>
|
4599
4861
|
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4600
4862
|
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4601
4863
|
</xsl:call-template>
|
4602
|
-
</
|
4864
|
+
</xsl:variable>
|
4865
|
+
<xsl:choose>
|
4866
|
+
<xsl:when test="$block = 'false'">
|
4867
|
+
<fo:inline>
|
4868
|
+
<xsl:copy-of select="$tag"/>
|
4869
|
+
</fo:inline>
|
4870
|
+
</xsl:when>
|
4871
|
+
<xsl:otherwise>
|
4872
|
+
<fo:block> <!-- for around figures -->
|
4873
|
+
<xsl:if test="$text-align != ''">
|
4874
|
+
<xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
|
4875
|
+
</xsl:if>
|
4876
|
+
<xsl:copy-of select="$tag"/>
|
4877
|
+
</fo:block>
|
4878
|
+
</xsl:otherwise>
|
4879
|
+
</xsl:choose>
|
4880
|
+
|
4603
4881
|
</xsl:otherwise>
|
4604
4882
|
</xsl:choose>
|
4605
4883
|
</xsl:when>
|
@@ -4958,17 +5236,21 @@
|
|
4958
5236
|
</xsl:apply-templates>
|
4959
5237
|
</xsl:template><xsl:template name="getLang">
|
4960
5238
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4961
|
-
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4962
5239
|
<xsl:variable name="language">
|
4963
5240
|
<xsl:choose>
|
4964
5241
|
<xsl:when test="$language_current != ''">
|
4965
5242
|
<xsl:value-of select="$language_current"/>
|
4966
5243
|
</xsl:when>
|
4967
|
-
<xsl:when test="$language_current_2 != ''">
|
4968
|
-
<xsl:value-of select="$language_current_2"/>
|
4969
|
-
</xsl:when>
|
4970
5244
|
<xsl:otherwise>
|
4971
|
-
<xsl:
|
5245
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
5246
|
+
<xsl:choose>
|
5247
|
+
<xsl:when test="$language_current_2 != ''">
|
5248
|
+
<xsl:value-of select="$language_current_2"/>
|
5249
|
+
</xsl:when>
|
5250
|
+
<xsl:otherwise>
|
5251
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
5252
|
+
</xsl:otherwise>
|
5253
|
+
</xsl:choose>
|
4972
5254
|
</xsl:otherwise>
|
4973
5255
|
</xsl:choose>
|
4974
5256
|
</xsl:variable>
|
@@ -5178,6 +5460,9 @@
|
|
5178
5460
|
</fo:inline>
|
5179
5461
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5180
5462
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5463
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
5464
|
+
<xsl:call-template name="append_add-style"/>
|
5465
|
+
</xsl:if>
|
5181
5466
|
<xsl:apply-templates/>
|
5182
5467
|
</fo:basic-link>
|
5183
5468
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -5192,8 +5477,8 @@
|
|
5192
5477
|
|
5193
5478
|
</xsl:if>
|
5194
5479
|
<fo:block-container margin-left="0mm">
|
5195
|
-
<fo:block id="{@id}"
|
5196
|
-
<xsl:apply-templates/>
|
5480
|
+
<fo:block id="{@id}">
|
5481
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
5197
5482
|
</fo:block>
|
5198
5483
|
</fo:block-container>
|
5199
5484
|
</fo:block-container>
|
@@ -5205,10 +5490,43 @@
|
|
5205
5490
|
<fo:inline>
|
5206
5491
|
<xsl:apply-templates/>
|
5207
5492
|
</fo:inline>
|
5208
|
-
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"
|
5493
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
5209
5494
|
<xsl:if test="normalize-space() != ''">
|
5210
5495
|
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
5211
5496
|
</xsl:if>
|
5497
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula'][*[local-name() = 'name']]/*[local-name() = 'stem']">
|
5498
|
+
<fo:block xsl:use-attribute-sets="formula-style">
|
5499
|
+
|
5500
|
+
|
5501
|
+
|
5502
|
+
<fo:table table-layout="fixed" width="100%">
|
5503
|
+
<fo:table-column column-width="95%"/>
|
5504
|
+
<fo:table-column column-width="5%"/>
|
5505
|
+
<fo:table-body>
|
5506
|
+
<fo:table-row>
|
5507
|
+
<fo:table-cell display-align="center">
|
5508
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
5509
|
+
|
5510
|
+
|
5511
|
+
|
5512
|
+
<xsl:apply-templates/>
|
5513
|
+
</fo:block>
|
5514
|
+
</fo:table-cell>
|
5515
|
+
<fo:table-cell display-align="center">
|
5516
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
5517
|
+
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
5518
|
+
</fo:block>
|
5519
|
+
</fo:table-cell>
|
5520
|
+
</fo:table-row>
|
5521
|
+
</fo:table-body>
|
5522
|
+
</fo:table>
|
5523
|
+
</fo:block>
|
5524
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula'][not(*[local-name() = 'name'])]/*[local-name() = 'stem']">
|
5525
|
+
<fo:block xsl:use-attribute-sets="formula-style">
|
5526
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
5527
|
+
<xsl:apply-templates/>
|
5528
|
+
</fo:block>
|
5529
|
+
</fo:block>
|
5212
5530
|
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
5213
5531
|
|
5214
5532
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
@@ -5242,6 +5560,13 @@
|
|
5242
5560
|
|
5243
5561
|
|
5244
5562
|
|
5563
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5564
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5565
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5566
|
+
<xsl:call-template name="append_add-style"/>
|
5567
|
+
</xsl:if>
|
5568
|
+
|
5569
|
+
|
5245
5570
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
5246
5571
|
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
5247
5572
|
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
@@ -5280,6 +5605,12 @@
|
|
5280
5605
|
|
5281
5606
|
|
5282
5607
|
|
5608
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5609
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5610
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5611
|
+
<xsl:call-template name="append_add-style"/>
|
5612
|
+
</xsl:if>
|
5613
|
+
|
5283
5614
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
5284
5615
|
|
5285
5616
|
</fo:inline>
|
@@ -5331,6 +5662,7 @@
|
|
5331
5662
|
</fo:block>
|
5332
5663
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
5333
5664
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5665
|
+
|
5334
5666
|
|
5335
5667
|
|
5336
5668
|
|
@@ -5769,7 +6101,11 @@
|
|
5769
6101
|
<xsl:value-of select="."/>
|
5770
6102
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5771
6103
|
<xsl:apply-templates mode="contents"/>
|
5772
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = '
|
6104
|
+
</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">
|
6105
|
+
<xsl:call-template name="contents_section-title"/>
|
6106
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
|
6107
|
+
<xsl:call-template name="contents_section-title"/>
|
6108
|
+
</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">
|
5773
6109
|
<xsl:variable name="level">
|
5774
6110
|
<xsl:call-template name="getLevel">
|
5775
6111
|
<xsl:with-param name="depth" select="@depth"/>
|
@@ -5838,13 +6174,14 @@
|
|
5838
6174
|
<xsl:apply-templates mode="bookmarks"/>
|
5839
6175
|
</xsl:template><xsl:template name="addBookmarks">
|
5840
6176
|
<xsl:param name="contents"/>
|
5841
|
-
<xsl:
|
6177
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
6178
|
+
<xsl:if test="$contents_nodes//item">
|
5842
6179
|
<fo:bookmark-tree>
|
5843
6180
|
<xsl:choose>
|
5844
|
-
<xsl:when test="
|
6181
|
+
<xsl:when test="$contents_nodes/doc">
|
5845
6182
|
<xsl:choose>
|
5846
|
-
<xsl:when test="count(
|
5847
|
-
<xsl:for-each select="
|
6183
|
+
<xsl:when test="count($contents_nodes/doc) > 1">
|
6184
|
+
<xsl:for-each select="$contents_nodes/doc">
|
5848
6185
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
5849
6186
|
<xsl:if test="@bundle = 'true'">
|
5850
6187
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
@@ -5895,7 +6232,7 @@
|
|
5895
6232
|
</xsl:for-each>
|
5896
6233
|
</xsl:when>
|
5897
6234
|
<xsl:otherwise>
|
5898
|
-
<xsl:for-each select="
|
6235
|
+
<xsl:for-each select="$contents_nodes/doc">
|
5899
6236
|
|
5900
6237
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
5901
6238
|
|
@@ -5913,25 +6250,36 @@
|
|
5913
6250
|
</xsl:choose>
|
5914
6251
|
</xsl:when>
|
5915
6252
|
<xsl:otherwise>
|
5916
|
-
<xsl:apply-templates select="
|
6253
|
+
<xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
|
6254
|
+
|
6255
|
+
<xsl:call-template name="insertFigureBookmarks">
|
6256
|
+
<xsl:with-param name="contents" select="$contents_nodes/contents"/>
|
6257
|
+
</xsl:call-template>
|
6258
|
+
|
6259
|
+
<xsl:call-template name="insertTableBookmarks">
|
6260
|
+
<xsl:with-param name="contents" select="$contents_nodes/contents"/>
|
6261
|
+
<xsl:with-param name="lang" select="@lang"/>
|
6262
|
+
</xsl:call-template>
|
6263
|
+
|
5917
6264
|
</xsl:otherwise>
|
5918
6265
|
</xsl:choose>
|
5919
6266
|
|
6267
|
+
|
5920
6268
|
|
5921
6269
|
|
5922
6270
|
|
5923
6271
|
|
5924
|
-
|
5925
|
-
|
6272
|
+
|
5926
6273
|
|
5927
6274
|
</fo:bookmark-tree>
|
5928
6275
|
</xsl:if>
|
5929
6276
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
5930
6277
|
<xsl:param name="contents"/>
|
5931
|
-
<xsl:
|
5932
|
-
|
6278
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
6279
|
+
<xsl:if test="$contents_nodes/figure">
|
6280
|
+
<fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
|
5933
6281
|
<fo:bookmark-title>Figures</fo:bookmark-title>
|
5934
|
-
<xsl:for-each select="
|
6282
|
+
<xsl:for-each select="$contents_nodes/figure">
|
5935
6283
|
<fo:bookmark internal-destination="{@id}">
|
5936
6284
|
<fo:bookmark-title>
|
5937
6285
|
<xsl:value-of select="normalize-space(title)"/>
|
@@ -5940,18 +6288,40 @@
|
|
5940
6288
|
</xsl:for-each>
|
5941
6289
|
</fo:bookmark>
|
5942
6290
|
</xsl:if>
|
6291
|
+
|
6292
|
+
|
6293
|
+
<xsl:if test="$contents_nodes//figures/figure">
|
6294
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
6295
|
+
|
6296
|
+
|
6297
|
+
|
6298
|
+
<xsl:variable name="bookmark-title">
|
6299
|
+
|
6300
|
+
<xsl:value-of select="$title-list-figures"/>
|
6301
|
+
|
6302
|
+
</xsl:variable>
|
6303
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
6304
|
+
<xsl:for-each select="$contents_nodes//figures/figure">
|
6305
|
+
<fo:bookmark internal-destination="{@id}">
|
6306
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
6307
|
+
</fo:bookmark>
|
6308
|
+
</xsl:for-each>
|
6309
|
+
</fo:bookmark>
|
6310
|
+
</xsl:if>
|
6311
|
+
|
5943
6312
|
</xsl:template><xsl:template name="insertTableBookmarks">
|
5944
6313
|
<xsl:param name="contents"/>
|
5945
6314
|
<xsl:param name="lang"/>
|
5946
|
-
<xsl:
|
5947
|
-
|
6315
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
6316
|
+
<xsl:if test="$contents_nodes/table">
|
6317
|
+
<fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
|
5948
6318
|
<fo:bookmark-title>
|
5949
6319
|
<xsl:choose>
|
5950
6320
|
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
5951
6321
|
<xsl:otherwise>Tables</xsl:otherwise>
|
5952
6322
|
</xsl:choose>
|
5953
6323
|
</fo:bookmark-title>
|
5954
|
-
<xsl:for-each select="
|
6324
|
+
<xsl:for-each select="$contents_nodes/table">
|
5955
6325
|
<fo:bookmark internal-destination="{@id}">
|
5956
6326
|
<fo:bookmark-title>
|
5957
6327
|
<xsl:value-of select="normalize-space(title)"/>
|
@@ -5960,6 +6330,29 @@
|
|
5960
6330
|
</xsl:for-each>
|
5961
6331
|
</fo:bookmark>
|
5962
6332
|
</xsl:if>
|
6333
|
+
|
6334
|
+
|
6335
|
+
<xsl:if test="$contents_nodes//tables/table">
|
6336
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
6337
|
+
|
6338
|
+
|
6339
|
+
|
6340
|
+
<xsl:variable name="bookmark-title">
|
6341
|
+
|
6342
|
+
<xsl:value-of select="$title-list-tables"/>
|
6343
|
+
|
6344
|
+
</xsl:variable>
|
6345
|
+
|
6346
|
+
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
6347
|
+
|
6348
|
+
<xsl:for-each select="$contents_nodes//tables/table">
|
6349
|
+
<fo:bookmark internal-destination="{@id}">
|
6350
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
6351
|
+
</fo:bookmark>
|
6352
|
+
</xsl:for-each>
|
6353
|
+
</fo:bookmark>
|
6354
|
+
</xsl:if>
|
6355
|
+
|
5963
6356
|
</xsl:template><xsl:template name="getLangVersion">
|
5964
6357
|
<xsl:param name="lang"/>
|
5965
6358
|
<xsl:param name="doctype" select="''"/>
|
@@ -6158,12 +6551,140 @@
|
|
6158
6551
|
</fo:block-container>
|
6159
6552
|
</fo:block-container>
|
6160
6553
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
6161
|
-
<xsl:
|
6554
|
+
<xsl:choose>
|
6555
|
+
<xsl:when test="normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
6556
|
+
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
6557
|
+
<xsl:choose>
|
6558
|
+
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
6559
|
+
<xsl:apply-templates select="xalan:nodeset($syntax)" mode="syntax_highlight"/> <!-- process span tags -->
|
6560
|
+
</xsl:when>
|
6561
|
+
<xsl:otherwise> <!-- if case of non-succesfull syntax highlight (for instance, unknown lang), process without highlighting -->
|
6562
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
6563
|
+
</xsl:otherwise>
|
6564
|
+
</xsl:choose>
|
6565
|
+
</xsl:when>
|
6566
|
+
<xsl:otherwise>
|
6567
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
6568
|
+
</xsl:otherwise>
|
6569
|
+
</xsl:choose>
|
6570
|
+
|
6571
|
+
</xsl:template><xsl:template name="add_spaces_to_sourcecode">
|
6572
|
+
<xsl:variable name="text_step1">
|
6162
6573
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
6163
6574
|
</xsl:variable>
|
6164
|
-
<xsl:
|
6165
|
-
<xsl:
|
6166
|
-
|
6575
|
+
<xsl:variable name="text_step2">
|
6576
|
+
<xsl:call-template name="add-zero-spaces-java">
|
6577
|
+
<xsl:with-param name="text" select="$text_step1"/>
|
6578
|
+
</xsl:call-template>
|
6579
|
+
</xsl:variable>
|
6580
|
+
<xsl:value-of select="$text_step2"/>
|
6581
|
+
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
6582
|
+
<xsl:apply-templates mode="syntax_highlight"/>
|
6583
|
+
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
6584
|
+
<style class="hljs-addition" xsl:use-attribute-sets="hljs-addition"/>
|
6585
|
+
<style class="hljs-attr" xsl:use-attribute-sets="hljs-attr"/>
|
6586
|
+
<style class="hljs-attribute" xsl:use-attribute-sets="hljs-attribute"/>
|
6587
|
+
<style class="hljs-built_in" xsl:use-attribute-sets="hljs-built_in"/>
|
6588
|
+
<style class="hljs-bullet" xsl:use-attribute-sets="hljs-bullet"/>
|
6589
|
+
<style class="hljs-char_and_escape_" xsl:use-attribute-sets="hljs-char_and_escape_"/>
|
6590
|
+
<style class="hljs-code" xsl:use-attribute-sets="hljs-code"/>
|
6591
|
+
<style class="hljs-comment" xsl:use-attribute-sets="hljs-comment"/>
|
6592
|
+
<style class="hljs-deletion" xsl:use-attribute-sets="hljs-deletion"/>
|
6593
|
+
<style class="hljs-doctag" xsl:use-attribute-sets="hljs-doctag"/>
|
6594
|
+
<style class="hljs-emphasis" xsl:use-attribute-sets="hljs-emphasis"/>
|
6595
|
+
<style class="hljs-formula" xsl:use-attribute-sets="hljs-formula"/>
|
6596
|
+
<style class="hljs-keyword" xsl:use-attribute-sets="hljs-keyword"/>
|
6597
|
+
<style class="hljs-link" xsl:use-attribute-sets="hljs-link"/>
|
6598
|
+
<style class="hljs-literal" xsl:use-attribute-sets="hljs-literal"/>
|
6599
|
+
<style class="hljs-meta" xsl:use-attribute-sets="hljs-meta"/>
|
6600
|
+
<style class="hljs-meta_hljs-string" xsl:use-attribute-sets="hljs-meta_hljs-string"/>
|
6601
|
+
<style class="hljs-meta_hljs-keyword" xsl:use-attribute-sets="hljs-meta_hljs-keyword"/>
|
6602
|
+
<style class="hljs-name" xsl:use-attribute-sets="hljs-name"/>
|
6603
|
+
<style class="hljs-number" xsl:use-attribute-sets="hljs-number"/>
|
6604
|
+
<style class="hljs-operator" xsl:use-attribute-sets="hljs-operator"/>
|
6605
|
+
<style class="hljs-params" xsl:use-attribute-sets="hljs-params"/>
|
6606
|
+
<style class="hljs-property" xsl:use-attribute-sets="hljs-property"/>
|
6607
|
+
<style class="hljs-punctuation" xsl:use-attribute-sets="hljs-punctuation"/>
|
6608
|
+
<style class="hljs-quote" xsl:use-attribute-sets="hljs-quote"/>
|
6609
|
+
<style class="hljs-regexp" xsl:use-attribute-sets="hljs-regexp"/>
|
6610
|
+
<style class="hljs-section" xsl:use-attribute-sets="hljs-section"/>
|
6611
|
+
<style class="hljs-selector-attr" xsl:use-attribute-sets="hljs-selector-attr"/>
|
6612
|
+
<style class="hljs-selector-class" xsl:use-attribute-sets="hljs-selector-class"/>
|
6613
|
+
<style class="hljs-selector-id" xsl:use-attribute-sets="hljs-selector-id"/>
|
6614
|
+
<style class="hljs-selector-pseudo" xsl:use-attribute-sets="hljs-selector-pseudo"/>
|
6615
|
+
<style class="hljs-selector-tag" xsl:use-attribute-sets="hljs-selector-tag"/>
|
6616
|
+
<style class="hljs-string" xsl:use-attribute-sets="hljs-string"/>
|
6617
|
+
<style class="hljs-strong" xsl:use-attribute-sets="hljs-strong"/>
|
6618
|
+
<style class="hljs-subst" xsl:use-attribute-sets="hljs-subst"/>
|
6619
|
+
<style class="hljs-symbol" xsl:use-attribute-sets="hljs-symbol"/>
|
6620
|
+
<style class="hljs-tag" xsl:use-attribute-sets="hljs-tag"/>
|
6621
|
+
<!-- <style class="hljs-tag_hljs-attr" xsl:use-attribute-sets="hljs-tag_hljs-attr"></style> -->
|
6622
|
+
<!-- <style class="hljs-tag_hljs-name" xsl:use-attribute-sets="hljs-tag_hljs-name"></style> -->
|
6623
|
+
<style class="hljs-template-tag" xsl:use-attribute-sets="hljs-template-tag"/>
|
6624
|
+
<style class="hljs-template-variable" xsl:use-attribute-sets="hljs-template-variable"/>
|
6625
|
+
<style class="hljs-title" xsl:use-attribute-sets="hljs-title"/>
|
6626
|
+
<style class="hljs-title_and_class_" xsl:use-attribute-sets="hljs-title_and_class_"/>
|
6627
|
+
<style class="hljs-title_and_class__and_inherited__" xsl:use-attribute-sets="hljs-title_and_class__and_inherited__"/>
|
6628
|
+
<style class="hljs-title_and_function_" xsl:use-attribute-sets="hljs-title_and_function_"/>
|
6629
|
+
<style class="hljs-type" xsl:use-attribute-sets="hljs-type"/>
|
6630
|
+
<style class="hljs-variable" xsl:use-attribute-sets="hljs-variable"/>
|
6631
|
+
<style class="hljs-variable_and_language_" xsl:use-attribute-sets="hljs-variable_and_language_"/>
|
6632
|
+
</xsl:variable><xsl:variable name="syntax_highlight_styles" select="xalan:nodeset($syntax_highlight_styles_)"/><xsl:template match="span" mode="syntax_highlight" priority="2">
|
6633
|
+
<!-- <fo:inline color="green" font-style="italic"><xsl:apply-templates mode="syntax_highlight"/></fo:inline> -->
|
6634
|
+
<fo:inline>
|
6635
|
+
<xsl:variable name="classes_">
|
6636
|
+
<xsl:call-template name="split">
|
6637
|
+
<xsl:with-param name="pText" select="@class"/>
|
6638
|
+
<xsl:with-param name="sep" select="' '"/>
|
6639
|
+
</xsl:call-template>
|
6640
|
+
<!-- a few classes together (_and_ suffix) -->
|
6641
|
+
<xsl:if test="contains(@class, 'hljs-char') and contains(@class, 'escape_')">
|
6642
|
+
<item>hljs-char_and_escape_</item>
|
6643
|
+
</xsl:if>
|
6644
|
+
<xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'class_')">
|
6645
|
+
<item>hljs-title_and_class_</item>
|
6646
|
+
</xsl:if>
|
6647
|
+
<xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'class_') and contains(@class, 'inherited__')">
|
6648
|
+
<item>hljs-title_and_class__and_inherited__</item>
|
6649
|
+
</xsl:if>
|
6650
|
+
<xsl:if test="contains(@class, 'hljs-title') and contains(@class, 'function_')">
|
6651
|
+
<item>hljs-title_and_function_</item>
|
6652
|
+
</xsl:if>
|
6653
|
+
<xsl:if test="contains(@class, 'hljs-variable') and contains(@class, 'language_')">
|
6654
|
+
<item>hljs-variable_and_language_</item>
|
6655
|
+
</xsl:if>
|
6656
|
+
<!-- with parent classes (_ suffix) -->
|
6657
|
+
<xsl:if test="contains(@class, 'hljs-keyword') and contains(ancestor::*/@class, 'hljs-meta')">
|
6658
|
+
<item>hljs-meta_hljs-keyword</item>
|
6659
|
+
</xsl:if>
|
6660
|
+
<xsl:if test="contains(@class, 'hljs-string') and contains(ancestor::*/@class, 'hljs-meta')">
|
6661
|
+
<item>hljs-meta_hljs-string</item>
|
6662
|
+
</xsl:if>
|
6663
|
+
</xsl:variable>
|
6664
|
+
<xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
|
6665
|
+
|
6666
|
+
<xsl:for-each select="$classes/item">
|
6667
|
+
<xsl:variable name="class_name" select="."/>
|
6668
|
+
<xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
|
6669
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
6670
|
+
</xsl:for-each>
|
6671
|
+
</xsl:for-each>
|
6672
|
+
|
6673
|
+
<!-- <xsl:variable name="class_name">
|
6674
|
+
<xsl:choose>
|
6675
|
+
<xsl:when test="@class = 'hljs-attr' and ancestor::*/@class = 'hljs-tag'">hljs-tag_hljs-attr</xsl:when>
|
6676
|
+
<xsl:when test="@class = 'hljs-name' and ancestor::*/@class = 'hljs-tag'">hljs-tag_hljs-name</xsl:when>
|
6677
|
+
<xsl:when test="@class = 'hljs-string' and ancestor::*/@class = 'hljs-meta'">hljs-meta_hljs-string</xsl:when>
|
6678
|
+
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
6679
|
+
</xsl:choose>
|
6680
|
+
</xsl:variable>
|
6681
|
+
<xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
|
6682
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
6683
|
+
</xsl:for-each> -->
|
6684
|
+
|
6685
|
+
<xsl:apply-templates mode="syntax_highlight"/></fo:inline>
|
6686
|
+
</xsl:template><xsl:template match="text()" mode="syntax_highlight" priority="2">
|
6687
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
6167
6688
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
|
6168
6689
|
<xsl:if test="normalize-space() != ''">
|
6169
6690
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
@@ -6493,6 +7014,8 @@
|
|
6493
7014
|
</xsl:otherwise>
|
6494
7015
|
</xsl:choose> -->
|
6495
7016
|
</fo:block>
|
7017
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
7018
|
+
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
6496
7019
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
6497
7020
|
<xsl:if test="normalize-space() != ''">
|
6498
7021
|
<xsl:value-of select="."/>
|
@@ -6539,11 +7062,14 @@
|
|
6539
7062
|
|
6540
7063
|
|
6541
7064
|
<fo:block-container margin-left="0mm">
|
6542
|
-
|
6543
|
-
<fo:block xsl:use-attribute-sets="quote-style">
|
7065
|
+
<fo:block-container xsl:use-attribute-sets="quote-style">
|
6544
7066
|
|
6545
|
-
<
|
6546
|
-
|
7067
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
7068
|
+
<fo:block role="BlockQuote">
|
7069
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
7070
|
+
</fo:block>
|
7071
|
+
</fo:block-container>
|
7072
|
+
</fo:block-container>
|
6547
7073
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
6548
7074
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
6549
7075
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
@@ -6564,26 +7090,11 @@
|
|
6564
7090
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
6565
7091
|
<xsl:text>— </xsl:text>
|
6566
7092
|
<xsl:apply-templates/>
|
6567
|
-
</xsl:template><xsl:
|
6568
|
-
<xsl:
|
6569
|
-
|
6570
|
-
</xsl:for-each>
|
6571
|
-
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
6572
|
-
<xsl:copy-of select="."/>
|
6573
|
-
</xsl:for-each>
|
6574
|
-
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
6575
|
-
|
6576
|
-
<xsl:variable name="bibitemid">
|
6577
|
-
<xsl:choose>
|
6578
|
-
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
6579
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
6580
|
-
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
6581
|
-
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
6582
|
-
</xsl:choose>
|
6583
|
-
</xsl:variable>
|
6584
|
-
|
7093
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
7094
|
+
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7095
|
+
<xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/>
|
6585
7096
|
<xsl:choose>
|
6586
|
-
<xsl:when test="
|
7097
|
+
<xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
6587
7098
|
<fo:inline xsl:use-attribute-sets="eref-style">
|
6588
7099
|
<xsl:if test="@type = 'footnote'">
|
6589
7100
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
@@ -6597,8 +7108,8 @@
|
|
6597
7108
|
<xsl:variable name="text" select="normalize-space()"/>
|
6598
7109
|
|
6599
7110
|
|
6600
|
-
|
6601
|
-
<fo:basic-link
|
7111
|
+
|
7112
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
6602
7113
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6603
7114
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
6604
7115
|
</xsl:if>
|
@@ -6608,14 +7119,21 @@
|
|
6608
7119
|
|
6609
7120
|
</xsl:if>
|
6610
7121
|
|
6611
|
-
|
7122
|
+
<xsl:choose>
|
7123
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
7124
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
7125
|
+
</xsl:when>
|
7126
|
+
<xsl:otherwise>
|
7127
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
7128
|
+
</xsl:otherwise>
|
7129
|
+
</xsl:choose>
|
6612
7130
|
|
6613
7131
|
<xsl:apply-templates/>
|
6614
7132
|
</fo:basic-link>
|
6615
|
-
|
7133
|
+
|
6616
7134
|
</fo:inline>
|
6617
7135
|
</xsl:when>
|
6618
|
-
<xsl:otherwise>
|
7136
|
+
<xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
|
6619
7137
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6620
7138
|
</xsl:otherwise>
|
6621
7139
|
</xsl:choose>
|
@@ -6688,6 +7206,31 @@
|
|
6688
7206
|
<xsl:with-param name="count" select="$count - 1"/>
|
6689
7207
|
</xsl:call-template>
|
6690
7208
|
</xsl:if>
|
7209
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']">
|
7210
|
+
<xsl:variable name="level">
|
7211
|
+
<xsl:call-template name="getLevel"/>
|
7212
|
+
</xsl:variable>
|
7213
|
+
<xsl:variable name="font-size">
|
7214
|
+
inherit
|
7215
|
+
</xsl:variable>
|
7216
|
+
<xsl:variable name="levelTerm">
|
7217
|
+
<xsl:call-template name="getLevelTermName"/>
|
7218
|
+
</xsl:variable>
|
7219
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
7220
|
+
|
7221
|
+
|
7222
|
+
|
7223
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
7224
|
+
<fo:block xsl:use-attribute-sets="term-name-style">
|
7225
|
+
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
7226
|
+
</fo:block>
|
7227
|
+
</xsl:if>
|
7228
|
+
|
7229
|
+
<fo:block xsl:use-attribute-sets="preferred-term-style">
|
7230
|
+
<xsl:call-template name="setStyle_preferred"/>
|
7231
|
+
<xsl:apply-templates/>
|
7232
|
+
</fo:block>
|
7233
|
+
</fo:block>
|
6691
7234
|
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
6692
7235
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
6693
7236
|
<xsl:text> </xsl:text>
|
@@ -6776,24 +7319,8 @@
|
|
6776
7319
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
6777
7320
|
</xsl:template><xsl:variable name="ul_labels_">
|
6778
7321
|
|
6779
|
-
|
6780
|
-
|
6781
|
-
|
6782
|
-
|
6783
|
-
|
6784
|
-
|
6785
|
-
<label>—</label> <!-- em dash -->
|
6786
|
-
|
6787
|
-
|
6788
|
-
|
6789
|
-
|
6790
|
-
|
6791
|
-
|
6792
|
-
|
6793
|
-
|
6794
|
-
|
6795
|
-
|
6796
|
-
|
7322
|
+
<label>—</label> <!-- em dash -->
|
7323
|
+
|
6797
7324
|
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
6798
7325
|
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
6799
7326
|
<xsl:variable name="list_level">
|
@@ -6819,6 +7346,91 @@
|
|
6819
7346
|
</xsl:template><xsl:template match="label" mode="ul_labels">
|
6820
7347
|
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
6821
7348
|
<xsl:value-of select="."/>
|
7349
|
+
</xsl:template><xsl:template name="getListItemFormat">
|
7350
|
+
<!-- Example: for BSI <?list-type loweralpha?> -->
|
7351
|
+
<xsl:variable name="processing_instruction_type" select="normalize-space(../preceding-sibling::*[1]/processing-instruction('list-type'))"/>
|
7352
|
+
<xsl:choose>
|
7353
|
+
<xsl:when test="local-name(..) = 'ul'">
|
7354
|
+
<xsl:choose>
|
7355
|
+
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
7356
|
+
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
7357
|
+
</xsl:choose>
|
7358
|
+
</xsl:when>
|
7359
|
+
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
7360
|
+
|
7361
|
+
<!-- Example: for BSI <?list-start 2?> -->
|
7362
|
+
<xsl:variable name="processing_instruction_start" select="normalize-space(../preceding-sibling::*[1]/processing-instruction('list-start'))"/>
|
7363
|
+
|
7364
|
+
<xsl:variable name="start_value">
|
7365
|
+
<xsl:choose>
|
7366
|
+
<xsl:when test="normalize-space($processing_instruction_start) != ''">
|
7367
|
+
<xsl:value-of select="number($processing_instruction_start) - 1"/><!-- if start="3" then start_value=2 + xsl:number(1) = 3 -->
|
7368
|
+
</xsl:when>
|
7369
|
+
<xsl:when test="normalize-space(../@start) != ''">
|
7370
|
+
<xsl:value-of select="number(../@start) - 1"/><!-- if start="3" then start_value=2 + xsl:number(1) = 3 -->
|
7371
|
+
</xsl:when>
|
7372
|
+
<xsl:otherwise>0</xsl:otherwise>
|
7373
|
+
</xsl:choose>
|
7374
|
+
</xsl:variable>
|
7375
|
+
|
7376
|
+
<xsl:variable name="curr_value"><xsl:number/></xsl:variable>
|
7377
|
+
|
7378
|
+
<xsl:variable name="type">
|
7379
|
+
<xsl:choose>
|
7380
|
+
<xsl:when test="normalize-space($processing_instruction_type) != ''"><xsl:value-of select="$processing_instruction_type"/></xsl:when>
|
7381
|
+
<xsl:when test="normalize-space(../@type) != ''"><xsl:value-of select="../@type"/></xsl:when>
|
7382
|
+
|
7383
|
+
<xsl:otherwise> <!-- if no @type or @class = 'steps' -->
|
7384
|
+
|
7385
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
7386
|
+
<xsl:variable name="list_level">
|
7387
|
+
<xsl:choose>
|
7388
|
+
<xsl:when test="$list_level_ <= 5"><xsl:value-of select="$list_level_"/></xsl:when>
|
7389
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 5"/></xsl:otherwise>
|
7390
|
+
</xsl:choose>
|
7391
|
+
</xsl:variable>
|
7392
|
+
|
7393
|
+
<xsl:choose>
|
7394
|
+
<xsl:when test="$list_level mod 5 = 0">roman_upper</xsl:when> <!-- level 5 -->
|
7395
|
+
<xsl:when test="$list_level mod 4 = 0">alphabet_upper</xsl:when> <!-- level 4 -->
|
7396
|
+
<xsl:when test="$list_level mod 3 = 0">roman</xsl:when> <!-- level 3 -->
|
7397
|
+
<xsl:when test="$list_level mod 2 = 0 and ancestor::*/@class = 'steps'">alphabet</xsl:when> <!-- level 2 and @class = 'steps'-->
|
7398
|
+
<xsl:when test="$list_level mod 2 = 0">arabic</xsl:when> <!-- level 2 -->
|
7399
|
+
<xsl:otherwise> <!-- level 1 -->
|
7400
|
+
<xsl:choose>
|
7401
|
+
<xsl:when test="ancestor::*/@class = 'steps'">arabic</xsl:when>
|
7402
|
+
<xsl:otherwise>alphabet</xsl:otherwise>
|
7403
|
+
</xsl:choose>
|
7404
|
+
</xsl:otherwise>
|
7405
|
+
</xsl:choose>
|
7406
|
+
|
7407
|
+
</xsl:otherwise>
|
7408
|
+
</xsl:choose>
|
7409
|
+
</xsl:variable>
|
7410
|
+
|
7411
|
+
<xsl:variable name="format">
|
7412
|
+
<xsl:choose>
|
7413
|
+
<xsl:when test="$type = 'arabic'">
|
7414
|
+
1.
|
7415
|
+
</xsl:when>
|
7416
|
+
<xsl:when test="$type = 'alphabet'">
|
7417
|
+
a)
|
7418
|
+
</xsl:when>
|
7419
|
+
<xsl:when test="$type = 'alphabet_upper'">
|
7420
|
+
A.
|
7421
|
+
</xsl:when>
|
7422
|
+
<xsl:when test="$type = 'roman'">
|
7423
|
+
i)
|
7424
|
+
</xsl:when>
|
7425
|
+
<xsl:when test="$type = 'roman_upper'">I.</xsl:when>
|
7426
|
+
<xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
|
7427
|
+
</xsl:choose>
|
7428
|
+
</xsl:variable>
|
7429
|
+
|
7430
|
+
<xsl:number value="$start_value + $curr_value" format="{normalize-space($format)}" lang="en"/>
|
7431
|
+
|
7432
|
+
</xsl:otherwise>
|
7433
|
+
</xsl:choose>
|
6822
7434
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
6823
7435
|
<xsl:choose>
|
6824
7436
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -6834,18 +7446,71 @@
|
|
6834
7446
|
|
6835
7447
|
<fo:block-container margin-left="0mm">
|
6836
7448
|
<fo:block>
|
6837
|
-
<xsl:apply-templates select="." mode="
|
7449
|
+
<xsl:apply-templates select="." mode="list"/>
|
6838
7450
|
</fo:block>
|
6839
7451
|
</fo:block-container>
|
6840
7452
|
</fo:block-container>
|
6841
7453
|
</xsl:when>
|
6842
7454
|
<xsl:otherwise>
|
6843
7455
|
<fo:block>
|
6844
|
-
<xsl:apply-templates select="." mode="
|
7456
|
+
<xsl:apply-templates select="." mode="list"/>
|
6845
7457
|
</fo:block>
|
6846
7458
|
</xsl:otherwise>
|
6847
7459
|
</xsl:choose>
|
6848
|
-
</xsl:template><xsl:
|
7460
|
+
</xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
7461
|
+
<fo:list-block xsl:use-attribute-sets="list-style">
|
7462
|
+
|
7463
|
+
|
7464
|
+
|
7465
|
+
|
7466
|
+
|
7467
|
+
|
7468
|
+
|
7469
|
+
|
7470
|
+
|
7471
|
+
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
7472
|
+
</fo:list-block>
|
7473
|
+
<!-- <xsl:for-each select="./iho:note">
|
7474
|
+
<xsl:call-template name="note"/>
|
7475
|
+
</xsl:for-each> -->
|
7476
|
+
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
7477
|
+
</xsl:template><xsl:template match="*[local-name()='li']">
|
7478
|
+
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
7479
|
+
<xsl:copy-of select="@id"/>
|
7480
|
+
|
7481
|
+
|
7482
|
+
|
7483
|
+
<fo:list-item-label end-indent="label-end()">
|
7484
|
+
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
7485
|
+
|
7486
|
+
|
7487
|
+
|
7488
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7489
|
+
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7490
|
+
<xsl:call-template name="append_add-style"/>
|
7491
|
+
</xsl:if>
|
7492
|
+
|
7493
|
+
<xsl:call-template name="getListItemFormat"/>
|
7494
|
+
</fo:block>
|
7495
|
+
</fo:list-item-label>
|
7496
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
7497
|
+
<fo:block>
|
7498
|
+
|
7499
|
+
|
7500
|
+
|
7501
|
+
|
7502
|
+
|
7503
|
+
<xsl:apply-templates/>
|
7504
|
+
|
7505
|
+
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
7506
|
+
|
7507
|
+
<xsl:for-each select="./bsi:note">
|
7508
|
+
<xsl:call-template name="note"/>
|
7509
|
+
</xsl:for-each> -->
|
7510
|
+
</fo:block>
|
7511
|
+
</fo:list-item-body>
|
7512
|
+
</fo:list-item>
|
7513
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="bookmark_in_fn">
|
6849
7514
|
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
6850
7515
|
<bookmark><xsl:value-of select="@id"/></bookmark>
|
6851
7516
|
</xsl:for-each>
|
@@ -6867,7 +7532,7 @@
|
|
6867
7532
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
6868
7533
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
6869
7534
|
<xsl:if test="@to">
|
6870
|
-
<xsl:value-of select="$
|
7535
|
+
<xsl:value-of select="$en_dash"/>
|
6871
7536
|
<xsl:copy>
|
6872
7537
|
<xsl:copy-of select="@*"/>
|
6873
7538
|
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
@@ -6892,7 +7557,7 @@
|
|
6892
7557
|
<xsl:param name="target"/>
|
6893
7558
|
<!-- <node></node> -->
|
6894
7559
|
<xsl:choose>
|
6895
|
-
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $
|
7560
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $en_dash) and $remove = 'true'">
|
6896
7561
|
<!-- skip text (i.e. remove it) and process next element -->
|
6897
7562
|
<!-- [removed_<xsl:value-of select="."/>] -->
|
6898
7563
|
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
@@ -6976,12 +7641,22 @@
|
|
6976
7641
|
</xsl:variable>
|
6977
7642
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
6978
7643
|
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
7644
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
7645
|
+
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
7646
|
+
<!-- Index -->
|
7647
|
+
<xsl:apply-templates/>
|
7648
|
+
</fo:block>
|
7649
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']/*[local-name() = 'title']" priority="4">
|
7650
|
+
<!-- Letter A, B, C, ... -->
|
7651
|
+
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
7652
|
+
<xsl:apply-templates/>
|
7653
|
+
</fo:block>
|
6979
7654
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
6980
7655
|
<xsl:apply-templates/>
|
6981
7656
|
<fo:block>
|
6982
|
-
|
6983
|
-
|
6984
|
-
|
7657
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
7658
|
+
<fo:block> </fo:block>
|
7659
|
+
</xsl:if>
|
6985
7660
|
</fo:block>
|
6986
7661
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
6987
7662
|
<xsl:apply-templates/>
|
@@ -6991,6 +7666,9 @@
|
|
6991
7666
|
|
6992
7667
|
<xsl:apply-templates/>
|
6993
7668
|
</fo:block>
|
7669
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/text()">
|
7670
|
+
<!-- to split by '_' and other chars -->
|
7671
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
6994
7672
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
6995
7673
|
<fo:inline id="{@id}" font-size="1pt"/>
|
6996
7674
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
@@ -7181,27 +7859,47 @@
|
|
7181
7859
|
<xsl:apply-templates/>
|
7182
7860
|
</fo:inline>
|
7183
7861
|
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
7862
|
+
|
7863
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
7864
|
+
<xsl:variable name="p_fn_">
|
7865
|
+
<xsl:call-template name="get_fn_list"/>
|
7866
|
+
</xsl:variable>
|
7867
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
7868
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
7869
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
7870
|
+
<!-- fn sequence number in document -->
|
7871
|
+
<xsl:variable name="current_fn_number">
|
7872
|
+
<xsl:choose>
|
7873
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
7874
|
+
<xsl:otherwise>
|
7875
|
+
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
7876
|
+
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
7877
|
+
</xsl:otherwise>
|
7878
|
+
</xsl:choose>
|
7879
|
+
</xsl:variable>
|
7184
7880
|
<fo:footnote>
|
7185
7881
|
<xsl:variable name="number">
|
7186
7882
|
|
7187
|
-
<xsl:
|
7883
|
+
<xsl:value-of select="$current_fn_number"/>
|
7188
7884
|
|
7189
7885
|
</xsl:variable>
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
|
7886
|
+
|
7887
|
+
<xsl:variable name="current_fn_number_text">
|
7888
|
+
<xsl:value-of select="$number"/>
|
7889
|
+
|
7194
7890
|
<xsl:text>)</xsl:text>
|
7195
7891
|
|
7892
|
+
</xsl:variable>
|
7893
|
+
|
7894
|
+
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
7895
|
+
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
7896
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
7196
7897
|
</fo:basic-link>
|
7197
7898
|
</fo:inline>
|
7198
7899
|
<fo:footnote-body>
|
7199
7900
|
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
7200
|
-
<fo:inline id="{
|
7201
|
-
<xsl:value-of select="$
|
7202
|
-
|
7203
|
-
<xsl:text>)</xsl:text>
|
7204
|
-
|
7901
|
+
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
7902
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
7205
7903
|
</fo:inline>
|
7206
7904
|
<xsl:apply-templates/>
|
7207
7905
|
</fo:block>
|
@@ -7327,7 +8025,7 @@
|
|
7327
8025
|
</fo:table-body>
|
7328
8026
|
</fo:table>
|
7329
8027
|
</fo:block>
|
7330
|
-
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
8028
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']" priority="2">
|
7331
8029
|
<fo:table-row min-height="5mm">
|
7332
8030
|
<xsl:apply-templates/>
|
7333
8031
|
</fo:table-row>
|
@@ -7436,7 +8134,140 @@
|
|
7436
8134
|
<!-- processing for admonition/p found in the template for 'p' -->
|
7437
8135
|
<xsl:call-template name="paragraph"/>
|
7438
8136
|
|
7439
|
-
</xsl:template><xsl:template
|
8137
|
+
</xsl:template><xsl:template match="@*|node()" mode="update_xml_step1">
|
8138
|
+
<xsl:copy>
|
8139
|
+
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
8140
|
+
</xsl:copy>
|
8141
|
+
</xsl:template><xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
|
8142
|
+
<xsl:copy>
|
8143
|
+
<xsl:copy-of select="@*"/>
|
8144
|
+
|
8145
|
+
<xsl:variable name="nodes_preface_">
|
8146
|
+
<xsl:for-each select="*">
|
8147
|
+
<node id="{@id}"/>
|
8148
|
+
</xsl:for-each>
|
8149
|
+
</xsl:variable>
|
8150
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
8151
|
+
|
8152
|
+
<xsl:for-each select="*">
|
8153
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
8154
|
+
|
8155
|
+
<!-- process Section's title -->
|
8156
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
8157
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
8158
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
|
8159
|
+
</xsl:if>
|
8160
|
+
|
8161
|
+
<xsl:choose>
|
8162
|
+
<xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
|
8163
|
+
<xsl:otherwise>
|
8164
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
8165
|
+
</xsl:otherwise>
|
8166
|
+
</xsl:choose>
|
8167
|
+
|
8168
|
+
</xsl:for-each>
|
8169
|
+
</xsl:copy>
|
8170
|
+
</xsl:template><xsl:template match="*[local-name() = 'sections']" mode="update_xml_step1">
|
8171
|
+
<xsl:copy>
|
8172
|
+
<xsl:copy-of select="@*"/>
|
8173
|
+
|
8174
|
+
<xsl:variable name="nodes_sections_">
|
8175
|
+
<xsl:for-each select="*">
|
8176
|
+
<node id="{@id}"/>
|
8177
|
+
</xsl:for-each>
|
8178
|
+
</xsl:variable>
|
8179
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
8180
|
+
|
8181
|
+
<!-- move section 'Normative references' inside 'sections' -->
|
8182
|
+
<xsl:for-each select="* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
8183
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
8184
|
+
|
8185
|
+
<!-- process Section's title -->
|
8186
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
8187
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
8188
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
|
8189
|
+
</xsl:if>
|
8190
|
+
|
8191
|
+
<xsl:choose>
|
8192
|
+
<xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
|
8193
|
+
<xsl:otherwise>
|
8194
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
8195
|
+
</xsl:otherwise>
|
8196
|
+
</xsl:choose>
|
8197
|
+
|
8198
|
+
</xsl:for-each>
|
8199
|
+
</xsl:copy>
|
8200
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibliography']" mode="update_xml_step1">
|
8201
|
+
<xsl:copy>
|
8202
|
+
<xsl:copy-of select="@*"/>
|
8203
|
+
<!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
|
8204
|
+
<xsl:for-each select="*[not(@normative='true') and not(*[*[@normative='true']])]">
|
8205
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
8206
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
8207
|
+
</xsl:for-each>
|
8208
|
+
</xsl:copy>
|
8209
|
+
</xsl:template>
|
8210
|
+
<!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
|
8211
|
+
<xsl:template match="@*|node()" mode="update_xml_step2">
|
8212
|
+
<xsl:copy>
|
8213
|
+
<xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
|
8214
|
+
</xsl:copy>
|
8215
|
+
</xsl:template>
|
8216
|
+
|
8217
|
+
<xsl:variable name="localized_string_withdrawn">
|
8218
|
+
<xsl:call-template name="getLocalizedString">
|
8219
|
+
<xsl:with-param name="key">withdrawn</xsl:with-param>
|
8220
|
+
</xsl:call-template>
|
8221
|
+
</xsl:variable>
|
8222
|
+
<xsl:variable name="localized_string_cancelled_and_replaced">
|
8223
|
+
<xsl:variable name="str">
|
8224
|
+
<xsl:call-template name="getLocalizedString">
|
8225
|
+
<xsl:with-param name="key">cancelled_and_replaced</xsl:with-param>
|
8226
|
+
</xsl:call-template>
|
8227
|
+
</xsl:variable>
|
8228
|
+
<xsl:choose>
|
8229
|
+
<xsl:when test="contains($str, '%')"><xsl:value-of select="substring-before($str, '%')"/></xsl:when>
|
8230
|
+
<xsl:otherwise><xsl:value-of select="$str"/></xsl:otherwise>
|
8231
|
+
</xsl:choose>
|
8232
|
+
</xsl:variable>
|
8233
|
+
|
8234
|
+
<!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
|
8235
|
+
<xsl:template match="*[local-name() = 'eref'] | *[local-name() = 'origin']" mode="update_xml_step2">
|
8236
|
+
<xsl:copy-of select="."/>
|
8237
|
+
|
8238
|
+
<xsl:variable name="bibitemid" select="@bibitemid"/>
|
8239
|
+
<xsl:variable name="local_name" select="local-name()"/>
|
8240
|
+
<xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
|
8241
|
+
<xsl:if test="normalize-space($position) = '1'">
|
8242
|
+
<xsl:variable name="fn_text">
|
8243
|
+
<xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
|
8244
|
+
</xsl:variable>
|
8245
|
+
<xsl:if test="normalize-space($fn_text) != ''">
|
8246
|
+
<xsl:element name="fn" namespace="{$namespace_full}">
|
8247
|
+
<xsl:attribute name="reference">bibitem_<xsl:value-of select="$bibitemid"/></xsl:attribute>
|
8248
|
+
<xsl:element name="p" namespace="{$namespace_full}">
|
8249
|
+
<xsl:copy-of select="$fn_text"/>
|
8250
|
+
</xsl:element>
|
8251
|
+
</xsl:element>
|
8252
|
+
</xsl:if>
|
8253
|
+
</xsl:if>
|
8254
|
+
</xsl:template>
|
8255
|
+
|
8256
|
+
<!-- add @reference for bibitem/note, similar to fn/reference -->
|
8257
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
|
8258
|
+
<xsl:copy>
|
8259
|
+
<xsl:apply-templates select="@*" mode="update_xml_step2"/>
|
8260
|
+
|
8261
|
+
<xsl:attribute name="reference">
|
8262
|
+
<xsl:value-of select="concat('bibitem_', ../@id, '_', count(preceding-sibling::*[local-name() = 'note']))"/>
|
8263
|
+
</xsl:attribute>
|
8264
|
+
|
8265
|
+
<xsl:apply-templates select="node()" mode="update_xml_step2"/>
|
8266
|
+
</xsl:copy>
|
8267
|
+
</xsl:template>
|
8268
|
+
|
8269
|
+
<!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
|
8270
|
+
<xsl:template name="convertDate">
|
7440
8271
|
<xsl:param name="date"/>
|
7441
8272
|
<xsl:param name="format" select="'short'"/>
|
7442
8273
|
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
@@ -7549,9 +8380,6 @@
|
|
7549
8380
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
7550
8381
|
</xsl:choose>
|
7551
8382
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
7552
|
-
<xsl:variable name="lang">
|
7553
|
-
<xsl:call-template name="getLang"/>
|
7554
|
-
</xsl:variable>
|
7555
8383
|
<pdf:catalog>
|
7556
8384
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
7557
8385
|
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
@@ -7779,10 +8607,12 @@
|
|
7779
8607
|
<xsl:param name="key"/>
|
7780
8608
|
<xsl:param name="formatted">false</xsl:param>
|
7781
8609
|
<xsl:param name="lang"/>
|
8610
|
+
<xsl:param name="returnEmptyIfNotFound">false</xsl:param>
|
7782
8611
|
|
7783
8612
|
<xsl:variable name="curr_lang">
|
7784
8613
|
<xsl:choose>
|
7785
8614
|
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
8615
|
+
<xsl:when test="$returnEmptyIfNotFound = 'true'"/>
|
7786
8616
|
<xsl:otherwise>
|
7787
8617
|
<xsl:call-template name="getLang"/>
|
7788
8618
|
</xsl:otherwise>
|
@@ -7817,6 +8647,7 @@
|
|
7817
8647
|
</xsl:otherwise>
|
7818
8648
|
</xsl:choose>
|
7819
8649
|
</xsl:when>
|
8650
|
+
<xsl:when test="$returnEmptyIfNotFound = 'true'"/>
|
7820
8651
|
<xsl:otherwise>
|
7821
8652
|
<xsl:variable name="key_">
|
7822
8653
|
<xsl:call-template name="capitalize">
|
@@ -7886,53 +8717,153 @@
|
|
7886
8717
|
<xsl:param name="first"/>
|
7887
8718
|
<xsl:if test="$number != ''">
|
7888
8719
|
<xsl:variable name="words">
|
7889
|
-
|
7890
|
-
<
|
7891
|
-
|
7892
|
-
|
7893
|
-
|
7894
|
-
|
7895
|
-
|
7896
|
-
|
7897
|
-
|
7898
|
-
|
7899
|
-
|
7900
|
-
|
7901
|
-
|
7902
|
-
|
7903
|
-
|
7904
|
-
|
7905
|
-
|
7906
|
-
|
7907
|
-
|
7908
|
-
|
7909
|
-
|
7910
|
-
|
7911
|
-
|
7912
|
-
|
7913
|
-
|
7914
|
-
|
7915
|
-
|
7916
|
-
|
7917
|
-
|
7918
|
-
|
7919
|
-
|
7920
|
-
|
7921
|
-
|
7922
|
-
|
7923
|
-
|
7924
|
-
|
7925
|
-
|
7926
|
-
|
7927
|
-
|
7928
|
-
|
7929
|
-
|
7930
|
-
|
7931
|
-
|
7932
|
-
|
7933
|
-
|
7934
|
-
|
7935
|
-
|
8720
|
+
<words>
|
8721
|
+
<xsl:choose>
|
8722
|
+
<xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
|
8723
|
+
<word cardinal="1">Une-</word>
|
8724
|
+
<word ordinal="1">Première </word>
|
8725
|
+
<word cardinal="2">Deux-</word>
|
8726
|
+
<word ordinal="2">Seconde </word>
|
8727
|
+
<word cardinal="3">Trois-</word>
|
8728
|
+
<word ordinal="3">Tierce </word>
|
8729
|
+
<word cardinal="4">Quatre-</word>
|
8730
|
+
<word ordinal="4">Quatrième </word>
|
8731
|
+
<word cardinal="5">Cinq-</word>
|
8732
|
+
<word ordinal="5">Cinquième </word>
|
8733
|
+
<word cardinal="6">Six-</word>
|
8734
|
+
<word ordinal="6">Sixième </word>
|
8735
|
+
<word cardinal="7">Sept-</word>
|
8736
|
+
<word ordinal="7">Septième </word>
|
8737
|
+
<word cardinal="8">Huit-</word>
|
8738
|
+
<word ordinal="8">Huitième </word>
|
8739
|
+
<word cardinal="9">Neuf-</word>
|
8740
|
+
<word ordinal="9">Neuvième </word>
|
8741
|
+
<word ordinal="10">Dixième </word>
|
8742
|
+
<word ordinal="11">Onzième </word>
|
8743
|
+
<word ordinal="12">Douzième </word>
|
8744
|
+
<word ordinal="13">Treizième </word>
|
8745
|
+
<word ordinal="14">Quatorzième </word>
|
8746
|
+
<word ordinal="15">Quinzième </word>
|
8747
|
+
<word ordinal="16">Seizième </word>
|
8748
|
+
<word ordinal="17">Dix-septième </word>
|
8749
|
+
<word ordinal="18">Dix-huitième </word>
|
8750
|
+
<word ordinal="19">Dix-neuvième </word>
|
8751
|
+
<word cardinal="20">Vingt-</word>
|
8752
|
+
<word ordinal="20">Vingtième </word>
|
8753
|
+
<word cardinal="30">Trente-</word>
|
8754
|
+
<word ordinal="30">Trentième </word>
|
8755
|
+
<word cardinal="40">Quarante-</word>
|
8756
|
+
<word ordinal="40">Quarantième </word>
|
8757
|
+
<word cardinal="50">Cinquante-</word>
|
8758
|
+
<word ordinal="50">Cinquantième </word>
|
8759
|
+
<word cardinal="60">Soixante-</word>
|
8760
|
+
<word ordinal="60">Soixantième </word>
|
8761
|
+
<word cardinal="70">Septante-</word>
|
8762
|
+
<word ordinal="70">Septantième </word>
|
8763
|
+
<word cardinal="80">Huitante-</word>
|
8764
|
+
<word ordinal="80">Huitantième </word>
|
8765
|
+
<word cardinal="90">Nonante-</word>
|
8766
|
+
<word ordinal="90">Nonantième </word>
|
8767
|
+
<word cardinal="100">Cent-</word>
|
8768
|
+
<word ordinal="100">Centième </word>
|
8769
|
+
</xsl:when>
|
8770
|
+
<xsl:when test="$lang = 'ru'">
|
8771
|
+
<word cardinal="1">Одна-</word>
|
8772
|
+
<word ordinal="1">Первое </word>
|
8773
|
+
<word cardinal="2">Две-</word>
|
8774
|
+
<word ordinal="2">Второе </word>
|
8775
|
+
<word cardinal="3">Три-</word>
|
8776
|
+
<word ordinal="3">Третье </word>
|
8777
|
+
<word cardinal="4">Четыре-</word>
|
8778
|
+
<word ordinal="4">Четвертое </word>
|
8779
|
+
<word cardinal="5">Пять-</word>
|
8780
|
+
<word ordinal="5">Пятое </word>
|
8781
|
+
<word cardinal="6">Шесть-</word>
|
8782
|
+
<word ordinal="6">Шестое </word>
|
8783
|
+
<word cardinal="7">Семь-</word>
|
8784
|
+
<word ordinal="7">Седьмое </word>
|
8785
|
+
<word cardinal="8">Восемь-</word>
|
8786
|
+
<word ordinal="8">Восьмое </word>
|
8787
|
+
<word cardinal="9">Девять-</word>
|
8788
|
+
<word ordinal="9">Девятое </word>
|
8789
|
+
<word ordinal="10">Десятое </word>
|
8790
|
+
<word ordinal="11">Одиннадцатое </word>
|
8791
|
+
<word ordinal="12">Двенадцатое </word>
|
8792
|
+
<word ordinal="13">Тринадцатое </word>
|
8793
|
+
<word ordinal="14">Четырнадцатое </word>
|
8794
|
+
<word ordinal="15">Пятнадцатое </word>
|
8795
|
+
<word ordinal="16">Шестнадцатое </word>
|
8796
|
+
<word ordinal="17">Семнадцатое </word>
|
8797
|
+
<word ordinal="18">Восемнадцатое </word>
|
8798
|
+
<word ordinal="19">Девятнадцатое </word>
|
8799
|
+
<word cardinal="20">Двадцать-</word>
|
8800
|
+
<word ordinal="20">Двадцатое </word>
|
8801
|
+
<word cardinal="30">Тридцать-</word>
|
8802
|
+
<word ordinal="30">Тридцатое </word>
|
8803
|
+
<word cardinal="40">Сорок-</word>
|
8804
|
+
<word ordinal="40">Сороковое </word>
|
8805
|
+
<word cardinal="50">Пятьдесят-</word>
|
8806
|
+
<word ordinal="50">Пятидесятое </word>
|
8807
|
+
<word cardinal="60">Шестьдесят-</word>
|
8808
|
+
<word ordinal="60">Шестидесятое </word>
|
8809
|
+
<word cardinal="70">Семьдесят-</word>
|
8810
|
+
<word ordinal="70">Семидесятое </word>
|
8811
|
+
<word cardinal="80">Восемьдесят-</word>
|
8812
|
+
<word ordinal="80">Восьмидесятое </word>
|
8813
|
+
<word cardinal="90">Девяносто-</word>
|
8814
|
+
<word ordinal="90">Девяностое </word>
|
8815
|
+
<word cardinal="100">Сто-</word>
|
8816
|
+
<word ordinal="100">Сотое </word>
|
8817
|
+
</xsl:when>
|
8818
|
+
<xsl:otherwise> <!-- default english -->
|
8819
|
+
<word cardinal="1">One-</word>
|
8820
|
+
<word ordinal="1">First </word>
|
8821
|
+
<word cardinal="2">Two-</word>
|
8822
|
+
<word ordinal="2">Second </word>
|
8823
|
+
<word cardinal="3">Three-</word>
|
8824
|
+
<word ordinal="3">Third </word>
|
8825
|
+
<word cardinal="4">Four-</word>
|
8826
|
+
<word ordinal="4">Fourth </word>
|
8827
|
+
<word cardinal="5">Five-</word>
|
8828
|
+
<word ordinal="5">Fifth </word>
|
8829
|
+
<word cardinal="6">Six-</word>
|
8830
|
+
<word ordinal="6">Sixth </word>
|
8831
|
+
<word cardinal="7">Seven-</word>
|
8832
|
+
<word ordinal="7">Seventh </word>
|
8833
|
+
<word cardinal="8">Eight-</word>
|
8834
|
+
<word ordinal="8">Eighth </word>
|
8835
|
+
<word cardinal="9">Nine-</word>
|
8836
|
+
<word ordinal="9">Ninth </word>
|
8837
|
+
<word ordinal="10">Tenth </word>
|
8838
|
+
<word ordinal="11">Eleventh </word>
|
8839
|
+
<word ordinal="12">Twelfth </word>
|
8840
|
+
<word ordinal="13">Thirteenth </word>
|
8841
|
+
<word ordinal="14">Fourteenth </word>
|
8842
|
+
<word ordinal="15">Fifteenth </word>
|
8843
|
+
<word ordinal="16">Sixteenth </word>
|
8844
|
+
<word ordinal="17">Seventeenth </word>
|
8845
|
+
<word ordinal="18">Eighteenth </word>
|
8846
|
+
<word ordinal="19">Nineteenth </word>
|
8847
|
+
<word cardinal="20">Twenty-</word>
|
8848
|
+
<word ordinal="20">Twentieth </word>
|
8849
|
+
<word cardinal="30">Thirty-</word>
|
8850
|
+
<word ordinal="30">Thirtieth </word>
|
8851
|
+
<word cardinal="40">Forty-</word>
|
8852
|
+
<word ordinal="40">Fortieth </word>
|
8853
|
+
<word cardinal="50">Fifty-</word>
|
8854
|
+
<word ordinal="50">Fiftieth </word>
|
8855
|
+
<word cardinal="60">Sixty-</word>
|
8856
|
+
<word ordinal="60">Sixtieth </word>
|
8857
|
+
<word cardinal="70">Seventy-</word>
|
8858
|
+
<word ordinal="70">Seventieth </word>
|
8859
|
+
<word cardinal="80">Eighty-</word>
|
8860
|
+
<word ordinal="80">Eightieth </word>
|
8861
|
+
<word cardinal="90">Ninety-</word>
|
8862
|
+
<word ordinal="90">Ninetieth </word>
|
8863
|
+
<word cardinal="100">Hundred-</word>
|
8864
|
+
<word ordinal="100">Hundredth </word>
|
8865
|
+
</xsl:otherwise>
|
8866
|
+
</xsl:choose>
|
7936
8867
|
</words>
|
7937
8868
|
</xsl:variable>
|
7938
8869
|
|
@@ -8006,4 +8937,18 @@
|
|
8006
8937
|
<xsl:otherwise>_</xsl:otherwise>
|
8007
8938
|
</xsl:choose>
|
8008
8939
|
</xsl:attribute>
|
8940
|
+
</xsl:template><xsl:template name="substring-after-last">
|
8941
|
+
<xsl:param name="value"/>
|
8942
|
+
<xsl:param name="delimiter"/>
|
8943
|
+
<xsl:choose>
|
8944
|
+
<xsl:when test="contains($value, $delimiter)">
|
8945
|
+
<xsl:call-template name="substring-after-last">
|
8946
|
+
<xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
|
8947
|
+
<xsl:with-param name="delimiter" select="$delimiter"/>
|
8948
|
+
</xsl:call-template>
|
8949
|
+
</xsl:when>
|
8950
|
+
<xsl:otherwise>
|
8951
|
+
<xsl:value-of select="$value"/>
|
8952
|
+
</xsl:otherwise>
|
8953
|
+
</xsl:choose>
|
8009
8954
|
</xsl:template></xsl:stylesheet>
|