metanorma-iso 2.2.1 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/header-dis.html +111 -29
- data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
- data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
- data/lib/isodoc/iso/html/style-human.css +2 -3
- data/lib/isodoc/iso/html/style-human.scss +0 -1
- data/lib/isodoc/iso/html/style-iso.css +2 -3
- data/lib/isodoc/iso/html/style-iso.scss +0 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +10 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +10 -4
- data/lib/isodoc/iso/i18n-en.yaml +13 -8
- data/lib/isodoc/iso/i18n-fr.yaml +9 -3
- data/lib/isodoc/iso/i18n-ru.yaml +9 -2
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -2
- data/lib/isodoc/iso/iso.amendment.xsl +226 -40
- data/lib/isodoc/iso/iso.international-standard.xsl +226 -40
- data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/presentation_xref.rb +10 -7
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +6 -4
- data/lib/isodoc/iso/word_dis_cleanup.rb +24 -3
- data/lib/isodoc/iso/word_dis_convert.rb +4 -1
- data/lib/metanorma/iso/base.rb +2 -1
- data/lib/metanorma/iso/basicdoc.rng +0 -27
- data/lib/metanorma/iso/biblio-standoc.rng +164 -0
- data/lib/metanorma/iso/biblio.rng +50 -18
- data/lib/metanorma/iso/isodoc.rng +68 -206
- data/lib/metanorma/iso/isostandard-amd.rng +3 -54
- data/lib/metanorma/iso/isostandard-compile.rng +7 -0
- data/lib/metanorma/iso/isostandard.rng +1 -195
- data/lib/metanorma/iso/relaton-iso.rng +225 -0
- data/lib/metanorma/iso/validate.rb +6 -6
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma/requirements/modspec.rb +22 -38
- data/metanorma-iso.gemspec +5 -2
- metadata +7 -86
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/ubuntu.yml +0 -41
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.css +0 -2
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -2
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -71
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -45
- data/spec/examples/iso_123_all_parts.xml +0 -45
- data/spec/examples/iso_123_no_year_note.xml +0 -46
- data/spec/examples/iso_124_.xml +0 -41
- data/spec/examples/iso_216_.xml +0 -47
- data/spec/examples/iso_iec_12382_.xml +0 -48
- data/spec/examples/rice.adoc +0 -714
- data/spec/examples/rice.preview.html +0 -1870
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
- data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/ISO_1213_1.png +0 -0
- data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/amd_spec.rb +0 -986
- data/spec/isodoc/blocks_spec.rb +0 -1174
- data/spec/isodoc/i18n_spec.rb +0 -1579
- data/spec/isodoc/inline_spec.rb +0 -1060
- data/spec/isodoc/iso_spec.rb +0 -255
- data/spec/isodoc/metadata_spec.rb +0 -701
- data/spec/isodoc/postproc_spec.rb +0 -1089
- data/spec/isodoc/ref_spec.rb +0 -439
- data/spec/isodoc/section_spec.rb +0 -998
- data/spec/isodoc/table_spec.rb +0 -420
- data/spec/isodoc/terms_spec.rb +0 -314
- data/spec/isodoc/word_dis_spec.rb +0 -2064
- data/spec/isodoc/xref_spec.rb +0 -1747
- data/spec/metanorma/amd_spec.rb +0 -724
- data/spec/metanorma/base_spec.rb +0 -1384
- data/spec/metanorma/blank_spec.rb +0 -38
- data/spec/metanorma/blocks_spec.rb +0 -624
- data/spec/metanorma/cleanup_spec.rb +0 -1645
- data/spec/metanorma/inline_spec.rb +0 -203
- data/spec/metanorma/lists_spec.rb +0 -197
- data/spec/metanorma/macros_spec.rb +0 -99
- data/spec/metanorma/processor_spec.rb +0 -161
- data/spec/metanorma/refs_spec.rb +0 -672
- data/spec/metanorma/section_spec.rb +0 -492
- data/spec/metanorma/table_spec.rb +0 -329
- data/spec/metanorma/validate_spec.rb +0 -2153
- data/spec/relaton/render_spec.rb +0 -568
- data/spec/requirements/requirement_components_spec.rb +0 -622
- data/spec/requirements/requirements_spec.rb +0 -1681
- data/spec/requirements/xref_spec.rb +0 -1211
- data/spec/spec_helper.rb +0 -313
- data/spec/vcr_cassettes/docrels.yml +0 -385
- data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
data/lib/isodoc/iso/i18n-en.yaml
CHANGED
@@ -3,11 +3,11 @@ term_def_boilerplate: |
|
|
3
3
|
standardization at the following addresses:</p>
|
4
4
|
|
5
5
|
<ul>
|
6
|
-
<li
|
6
|
+
<li><p>ISO Online browsing platform: available at
|
7
7
|
<link target="https://www.iso.org/obp"/></p></li>
|
8
|
-
<li
|
9
|
-
<link target="https://www.electropedia.org"
|
10
|
-
</
|
8
|
+
<li><p>IEC Electropedia: available at
|
9
|
+
<link target="https://www.electropedia.org"/></p></li>
|
10
|
+
</ul>
|
11
11
|
all_rights_reserved: All rights reserved
|
12
12
|
reference_number: Reference number
|
13
13
|
price_based_on: Price based on % pages
|
@@ -76,7 +76,12 @@ locality:
|
|
76
76
|
appendix: Appendix
|
77
77
|
requirements:
|
78
78
|
modspec:
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
provision: Provision
|
80
|
+
conformancetest: Conformance test
|
81
|
+
inflection:
|
82
|
+
Provision:
|
83
|
+
sg: Provision
|
84
|
+
pl: Provisions
|
85
|
+
Statement:
|
86
|
+
sg: Statement
|
87
|
+
pl: Statements
|
data/lib/isodoc/iso/i18n-fr.yaml
CHANGED
@@ -70,6 +70,12 @@ locality:
|
|
70
70
|
appendix: Appendice
|
71
71
|
requirements:
|
72
72
|
modspec:
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
provision: Disposition
|
74
|
+
conformancetest: Test de conformité
|
75
|
+
inflection:
|
76
|
+
Disposition:
|
77
|
+
sg: Disposition
|
78
|
+
pl: Dispositions
|
79
|
+
Déclaration:
|
80
|
+
sg: Déclaration
|
81
|
+
pl: Déclarations
|
data/lib/isodoc/iso/i18n-ru.yaml
CHANGED
@@ -74,5 +74,12 @@ locality:
|
|
74
74
|
appendix: Приложение
|
75
75
|
requirements:
|
76
76
|
modspec:
|
77
|
-
|
78
|
-
|
77
|
+
provision: Условие
|
78
|
+
conformancetest: Тест на соответствие
|
79
|
+
inflection:
|
80
|
+
Условие:
|
81
|
+
sg: Условие
|
82
|
+
pl: Условия
|
83
|
+
Утверждение:
|
84
|
+
sg: Утверждение
|
85
|
+
pl: Утверждения
|
@@ -121,8 +121,8 @@
|
|
121
121
|
|
122
122
|
<xsl:variable name="stagename-header-coverpage">
|
123
123
|
<xsl:choose>
|
124
|
-
<xsl:when test="$stage-abbreviation = 'DIS' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">DRAFT</xsl:when>
|
125
|
-
<xsl:when test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM'">FINAL DRAFT</xsl:when>
|
124
|
+
<xsl:when test="$stage-abbreviation = 'DIS' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM' or starts-with($stage-abbreviation, 'DTS') or starts-with($stage-abbreviation, 'DTR')">DRAFT</xsl:when>
|
125
|
+
<xsl:when test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or starts-with($stage-abbreviation, 'FDTS') or starts-with($stage-abbreviation, 'FDTR')">FINAL DRAFT</xsl:when>
|
126
126
|
<xsl:when test="$stage-abbreviation = 'PRF'"/>
|
127
127
|
<xsl:when test="$stage-abbreviation = 'IS'"/>
|
128
128
|
<xsl:otherwise>
|
@@ -980,9 +980,14 @@
|
|
980
980
|
</fo:table>
|
981
981
|
</fo:block-container>
|
982
982
|
<fo:block-container position="absolute" left="60mm" top="222mm" height="25mm" display-align="after">
|
983
|
-
<fo:block>
|
983
|
+
<fo:block margin-bottom="2mm">
|
984
984
|
<xsl:if test="$stage-abbreviation = 'PRF'">
|
985
|
-
<fo:block font-size="
|
985
|
+
<fo:block font-size="36pt" font-weight="bold" margin-left="1mm">
|
986
|
+
<xsl:call-template name="add-letter-spacing">
|
987
|
+
<xsl:with-param name="text" select="$proof-text"/>
|
988
|
+
<xsl:with-param name="letter-spacing" select="0.65"/>
|
989
|
+
</xsl:call-template>
|
990
|
+
</fo:block>
|
986
991
|
</xsl:if>
|
987
992
|
</fo:block>
|
988
993
|
</fo:block-container>
|
@@ -1456,7 +1461,7 @@
|
|
1456
1461
|
<fo:block font-size="9pt"><xsl:value-of select="$copyrightText"/></fo:block>
|
1457
1462
|
</fo:table-cell>
|
1458
1463
|
<fo:table-cell>
|
1459
|
-
<fo:block font-size="
|
1464
|
+
<fo:block font-size="10pt" font-weight="bold" text-align="center">
|
1460
1465
|
<xsl:if test="$stage-abbreviation = 'PRF'">
|
1461
1466
|
<xsl:value-of select="$proof-text"/>
|
1462
1467
|
</xsl:if>
|
@@ -1676,6 +1681,7 @@
|
|
1676
1681
|
<xsl:variable name="display">
|
1677
1682
|
<xsl:choose>
|
1678
1683
|
<xsl:when test="ancestor-or-self::iso:annex and $level >= 2">false</xsl:when>
|
1684
|
+
<xsl:when test="ancestor-or-self::iso:introduction and $level >= 2">false</xsl:when>
|
1679
1685
|
<xsl:when test="$section = '' and $type = 'clause'">false</xsl:when>
|
1680
1686
|
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
1681
1687
|
<xsl:otherwise>false</xsl:otherwise>
|
@@ -1796,6 +1802,7 @@
|
|
1796
1802
|
<xsl:choose>
|
1797
1803
|
<xsl:when test="ancestor::iso:annex and $level = 2">13pt</xsl:when>
|
1798
1804
|
<xsl:when test="ancestor::iso:annex and $level = 3">12pt</xsl:when>
|
1805
|
+
<xsl:when test="ancestor::iso:introduction and $level >= 2">11pt</xsl:when>
|
1799
1806
|
<xsl:when test="ancestor::iso:preface">16pt</xsl:when>
|
1800
1807
|
<xsl:when test="$level = 2">12pt</xsl:when>
|
1801
1808
|
<xsl:when test="$level >= 3">11pt</xsl:when>
|
@@ -1822,19 +1829,30 @@
|
|
1822
1829
|
<xsl:element name="{$element-name}">
|
1823
1830
|
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
1824
1831
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1825
|
-
<xsl:
|
1832
|
+
<xsl:variable name="attribute-name-before">
|
1826
1833
|
<xsl:choose>
|
1834
|
+
<xsl:when test="ancestor::iso:preface and $level = 1">margin-top</xsl:when> <!-- for Foreword and Introduction titles -->
|
1835
|
+
<xsl:otherwise>space-before</xsl:otherwise>
|
1836
|
+
</xsl:choose>
|
1837
|
+
</xsl:variable>
|
1838
|
+
<xsl:attribute name="{$attribute-name-before}"> <!-- space-before or margin-top -->
|
1839
|
+
<xsl:choose>
|
1840
|
+
<xsl:when test="ancestor::iso:introduction and $level >= 2 and ../preceding-sibling::iso:clause">30pt</xsl:when>
|
1827
1841
|
<xsl:when test="ancestor::iso:preface">8pt</xsl:when>
|
1828
1842
|
<xsl:when test="$level = 2 and ancestor::iso:annex">18pt</xsl:when>
|
1829
1843
|
<xsl:when test="$level = 1">18pt</xsl:when>
|
1830
|
-
<xsl:when test="$level
|
1831
|
-
<xsl:when test="$level =
|
1844
|
+
<xsl:when test="($level = 2 or $level = 3) and not(../preceding-sibling::iso:clause)">14pt</xsl:when> <!-- first title in 3rd level clause -->
|
1845
|
+
<xsl:when test="$level = 3">14pt</xsl:when>
|
1846
|
+
<xsl:when test="$level > 3">3pt</xsl:when>
|
1847
|
+
<xsl:when test="$level = ''">6pt</xsl:when>
|
1832
1848
|
<xsl:otherwise>12pt</xsl:otherwise>
|
1833
1849
|
</xsl:choose>
|
1834
1850
|
</xsl:attribute>
|
1835
|
-
<xsl:attribute name="margin-bottom
|
1851
|
+
<xsl:attribute name="space-after"> <!-- margin-bottom -->
|
1836
1852
|
<xsl:choose>
|
1853
|
+
<xsl:when test="ancestor::iso:introduction and $level >= 2">8pt</xsl:when>
|
1837
1854
|
<xsl:when test="ancestor::iso:preface">18pt</xsl:when>
|
1855
|
+
<xsl:when test="$level = 3">9pt</xsl:when>
|
1838
1856
|
<!-- <xsl:otherwise>12pt</xsl:otherwise> -->
|
1839
1857
|
<xsl:otherwise>8pt</xsl:otherwise>
|
1840
1858
|
</xsl:choose>
|
@@ -1900,6 +1918,26 @@
|
|
1900
1918
|
</xsl:choose>
|
1901
1919
|
</xsl:attribute>
|
1902
1920
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1921
|
+
<xsl:if test="count(ancestor::iso:li) = 1 and not(ancestor::iso:li[1]/following-sibling::iso:li) and not(following-sibling::iso:p)">
|
1922
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1923
|
+
</xsl:if>
|
1924
|
+
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and not(following-sibling::*[local-name() = 'p'])">
|
1925
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1926
|
+
</xsl:if>
|
1927
|
+
<xsl:if test="parent::*[local-name() = 'td' or local-name() = 'th']">
|
1928
|
+
<xsl:choose>
|
1929
|
+
<xsl:when test="not(following-sibling::*)"> <!-- last paragraph in table cell -->
|
1930
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
1931
|
+
</xsl:when>
|
1932
|
+
<xsl:otherwise>
|
1933
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
1934
|
+
</xsl:otherwise>
|
1935
|
+
</xsl:choose>
|
1936
|
+
<!-- Special case: if paragraph in 'strong', i.e. it's sub-header, then keeps with next -->
|
1937
|
+
<xsl:if test="count(node()) = count(*[local-name() = 'strong']) and following-sibling::*">
|
1938
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1939
|
+
</xsl:if>
|
1940
|
+
</xsl:if>
|
1903
1941
|
<xsl:if test="@id">
|
1904
1942
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
1905
1943
|
</xsl:if>
|
@@ -2058,7 +2096,7 @@
|
|
2058
2096
|
<fo:block><fo:page-number/></fo:block>
|
2059
2097
|
</fo:table-cell>
|
2060
2098
|
<fo:table-cell display-align="center">
|
2061
|
-
<fo:block font-size="
|
2099
|
+
<fo:block font-size="10pt" font-weight="bold" text-align="center">
|
2062
2100
|
<xsl:if test="$stage-abbreviation = 'PRF'">
|
2063
2101
|
<xsl:value-of select="$proof-text"/>
|
2064
2102
|
</xsl:if>
|
@@ -2111,7 +2149,7 @@
|
|
2111
2149
|
<fo:block><xsl:value-of select="$copyrightText"/></fo:block>
|
2112
2150
|
</fo:table-cell>
|
2113
2151
|
<fo:table-cell display-align="center">
|
2114
|
-
<fo:block font-size="
|
2152
|
+
<fo:block font-size="10pt" font-weight="bold" text-align="center">
|
2115
2153
|
<xsl:if test="$stage-abbreviation = 'PRF'">
|
2116
2154
|
<xsl:value-of select="$proof-text"/>
|
2117
2155
|
</xsl:if>
|
@@ -2586,6 +2624,14 @@
|
|
2586
2624
|
|
2587
2625
|
</xsl:attribute-set>
|
2588
2626
|
|
2627
|
+
<xsl:attribute-set name="pre-style">
|
2628
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2629
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2630
|
+
|
2631
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2632
|
+
|
2633
|
+
</xsl:attribute-set>
|
2634
|
+
|
2589
2635
|
<xsl:attribute-set name="permission-style">
|
2590
2636
|
|
2591
2637
|
</xsl:attribute-set>
|
@@ -2707,9 +2753,15 @@
|
|
2707
2753
|
<!-- ========================== -->
|
2708
2754
|
<xsl:variable name="table-border_">
|
2709
2755
|
|
2756
|
+
1pt solid black
|
2710
2757
|
</xsl:variable>
|
2711
2758
|
<xsl:variable name="table-border" select="normalize-space($table-border_)"/>
|
2712
2759
|
|
2760
|
+
<xsl:variable name="table-cell-border_">
|
2761
|
+
0.5pt solid black
|
2762
|
+
</xsl:variable>
|
2763
|
+
<xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
|
2764
|
+
|
2713
2765
|
<xsl:attribute-set name="table-container-style">
|
2714
2766
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2715
2767
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -2723,10 +2775,8 @@
|
|
2723
2775
|
<xsl:attribute-set name="table-style">
|
2724
2776
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
2725
2777
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
2726
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2727
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2728
2778
|
|
2729
|
-
<xsl:attribute name="border"
|
2779
|
+
<xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2730
2780
|
|
2731
2781
|
</xsl:attribute-set><!-- table-style -->
|
2732
2782
|
|
@@ -2748,16 +2798,16 @@
|
|
2748
2798
|
<xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
|
2749
2799
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2750
2800
|
|
2751
|
-
<xsl:attribute name="border-top"
|
2752
|
-
<xsl:attribute name="border-bottom"
|
2801
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2802
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2753
2803
|
|
2754
2804
|
</xsl:attribute-set>
|
2755
2805
|
|
2756
2806
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
2757
2807
|
|
2758
2808
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2759
|
-
<xsl:attribute name="border-left"
|
2760
|
-
<xsl:attribute name="border-right"
|
2809
|
+
<xsl:attribute name="border-left"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2810
|
+
<xsl:attribute name="border-right"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2761
2811
|
|
2762
2812
|
</xsl:attribute-set>
|
2763
2813
|
|
@@ -2773,6 +2823,8 @@
|
|
2773
2823
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2774
2824
|
|
2775
2825
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2826
|
+
<xsl:attribute name="border-left"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
2827
|
+
<xsl:attribute name="border-right"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
2776
2828
|
|
2777
2829
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
2778
2830
|
|
@@ -2783,6 +2835,7 @@
|
|
2783
2835
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2784
2836
|
|
2785
2837
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2838
|
+
<xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
2786
2839
|
|
2787
2840
|
</xsl:attribute-set> <!-- table-cell-style -->
|
2788
2841
|
|
@@ -2792,6 +2845,7 @@
|
|
2792
2845
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2793
2846
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2794
2847
|
|
2848
|
+
<xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
|
2795
2849
|
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
2796
2850
|
|
2797
2851
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
@@ -3848,14 +3902,20 @@
|
|
3848
3902
|
<xsl:variable name="table_attributes">
|
3849
3903
|
|
3850
3904
|
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
3905
|
+
|
3906
|
+
<xsl:if test="$margin-side != 0">
|
3907
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3908
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3909
|
+
</xsl:if>
|
3910
|
+
|
3851
3911
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3852
3912
|
|
3853
3913
|
<xsl:if test="*[local-name()='thead']">
|
3854
|
-
<xsl:attribute name="border-top"
|
3914
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
3855
3915
|
</xsl:if>
|
3856
3916
|
<xsl:if test="ancestor::*[local-name() = 'table']">
|
3857
3917
|
<!-- for internal table in table cell -->
|
3858
|
-
<xsl:attribute name="border"
|
3918
|
+
<xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
3859
3919
|
</xsl:if>
|
3860
3920
|
|
3861
3921
|
</xsl:element>
|
@@ -4390,6 +4450,12 @@
|
|
4390
4450
|
<fo:table-row>
|
4391
4451
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
4392
4452
|
|
4453
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
4454
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
4455
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
4456
|
+
<!-- <xsl:attribute name="border-bottom">0.5pt solid white</xsl:attribute> -->
|
4457
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
4458
|
+
|
4393
4459
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
4394
4460
|
<xsl:with-param name="continued">true</xsl:with-param>
|
4395
4461
|
</xsl:apply-templates>
|
@@ -4651,12 +4717,12 @@
|
|
4651
4717
|
|
4652
4718
|
<xsl:choose>
|
4653
4719
|
<xsl:when test="position() = 1">
|
4654
|
-
<xsl:attribute name="border-top"
|
4655
|
-
<xsl:attribute name="border-bottom"
|
4720
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4721
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4656
4722
|
</xsl:when>
|
4657
4723
|
<xsl:when test="position() = last()">
|
4658
|
-
<xsl:attribute name="border-top"
|
4659
|
-
<xsl:attribute name="border-bottom"
|
4724
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4725
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4660
4726
|
</xsl:when>
|
4661
4727
|
</xsl:choose>
|
4662
4728
|
|
@@ -4679,6 +4745,14 @@
|
|
4679
4745
|
<xsl:template match="*[local-name()='tr']">
|
4680
4746
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
4681
4747
|
|
4748
|
+
<xsl:if test="*[local-name() = 'th']">
|
4749
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4750
|
+
</xsl:if>
|
4751
|
+
|
4752
|
+
<xsl:if test="position() = 1 and not(ancestor::*[local-name() = 'table']/*[local-name() = 'thead'])">
|
4753
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4754
|
+
</xsl:if>
|
4755
|
+
|
4682
4756
|
<xsl:call-template name="setTableRowAttributes"/>
|
4683
4757
|
<xsl:apply-templates/>
|
4684
4758
|
</fo:table-row>
|
@@ -4698,6 +4772,11 @@
|
|
4698
4772
|
<xsl:with-param name="default">center</xsl:with-param>
|
4699
4773
|
</xsl:call-template>
|
4700
4774
|
|
4775
|
+
<xsl:if test="../parent::*[local-name() = 'tbody'] and (following-sibling::*[local-name() = 'td'] or preceding-sibling::*[local-name() = 'td'])">
|
4776
|
+
<xsl:attribute name="border-top"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4777
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4778
|
+
</xsl:if>
|
4779
|
+
|
4701
4780
|
<xsl:if test="$lang = 'ar'">
|
4702
4781
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4703
4782
|
</xsl:if>
|
@@ -4753,6 +4832,13 @@
|
|
4753
4832
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
4754
4833
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
4755
4834
|
</xsl:if>
|
4835
|
+
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend')">
|
4836
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
4837
|
+
</xsl:if>
|
4838
|
+
<xsl:if test="ancestor::*[local-name() = 'tbody'] and not(../preceding-sibling::*[local-name() = 'tr']) and ancestor::*[local-name() = 'table'][1]/*[local-name() = 'thead']"> <!-- cells in 1st row in the table body, and if thead exists -->
|
4839
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
4840
|
+
</xsl:if>
|
4841
|
+
<!-- <xsl:attribute name="page-break-inside">avoid</xsl:attribute> -->
|
4756
4842
|
|
4757
4843
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4758
4844
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -5743,8 +5829,17 @@
|
|
5743
5829
|
</fo:inline>
|
5744
5830
|
</xsl:template> <!-- tt -->
|
5745
5831
|
|
5832
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
5746
5833
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
5747
|
-
<xsl:
|
5834
|
+
<xsl:choose>
|
5835
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
5836
|
+
<!-- url -->
|
5837
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
5838
|
+
</xsl:when>
|
5839
|
+
<xsl:otherwise>
|
5840
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
5841
|
+
</xsl:otherwise>
|
5842
|
+
</xsl:choose>
|
5748
5843
|
</xsl:template>
|
5749
5844
|
|
5750
5845
|
<xsl:template match="*[local-name()='underline']">
|
@@ -6100,8 +6195,11 @@
|
|
6100
6195
|
|
6101
6196
|
<xsl:template name="add-zero-spaces-link-java">
|
6102
6197
|
<xsl:param name="text" select="."/>
|
6198
|
+
|
6199
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
6200
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
6103
6201
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
6104
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
6202
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
6105
6203
|
</xsl:template>
|
6106
6204
|
|
6107
6205
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -6658,6 +6756,9 @@
|
|
6658
6756
|
<xsl:value-of select="substring($str, 2)"/>
|
6659
6757
|
</xsl:template>
|
6660
6758
|
|
6759
|
+
<!-- ======================================= -->
|
6760
|
+
<!-- math -->
|
6761
|
+
<!-- ======================================= -->
|
6661
6762
|
<xsl:template match="mathml:math">
|
6662
6763
|
<xsl:variable name="isAdded" select="@added"/>
|
6663
6764
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -6708,14 +6809,57 @@
|
|
6708
6809
|
<xsl:value-of select="$comment_text"/>
|
6709
6810
|
</xsl:template>
|
6710
6811
|
|
6812
|
+
<xsl:template match="*[local-name() = 'asciimath']">
|
6813
|
+
<xsl:param name="process" select="'false'"/>
|
6814
|
+
<xsl:if test="$process = 'true'">
|
6815
|
+
<xsl:apply-templates/>
|
6816
|
+
</xsl:if>
|
6817
|
+
</xsl:template>
|
6818
|
+
|
6819
|
+
<xsl:template match="*[local-name() = 'latexmath']"/>
|
6820
|
+
|
6821
|
+
<xsl:template name="getMathml_asciimath_text">
|
6822
|
+
<xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
|
6823
|
+
<xsl:variable name="latexmath">
|
6824
|
+
|
6825
|
+
</xsl:variable>
|
6826
|
+
<xsl:variable name="asciimath_text_following">
|
6827
|
+
<xsl:choose>
|
6828
|
+
<xsl:when test="normalize-space($latexmath) != ''">
|
6829
|
+
<xsl:value-of select="$latexmath"/>
|
6830
|
+
</xsl:when>
|
6831
|
+
<xsl:when test="normalize-space($asciimath) != ''">
|
6832
|
+
<xsl:value-of select="$asciimath"/>
|
6833
|
+
</xsl:when>
|
6834
|
+
<xsl:otherwise>
|
6835
|
+
<xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
|
6836
|
+
</xsl:otherwise>
|
6837
|
+
</xsl:choose>
|
6838
|
+
</xsl:variable>
|
6839
|
+
<xsl:variable name="asciimath_text_">
|
6840
|
+
<xsl:choose>
|
6841
|
+
<xsl:when test="normalize-space($asciimath_text_following) != ''">
|
6842
|
+
<xsl:value-of select="$asciimath_text_following"/>
|
6843
|
+
</xsl:when>
|
6844
|
+
<xsl:otherwise>
|
6845
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
6846
|
+
</xsl:otherwise>
|
6847
|
+
</xsl:choose>
|
6848
|
+
</xsl:variable>
|
6849
|
+
<xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
|
6850
|
+
<xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
|
6851
|
+
<xsl:value-of select="$asciimath_text"/>
|
6852
|
+
</xsl:template>
|
6853
|
+
|
6711
6854
|
<xsl:template name="mathml_instream_object">
|
6712
|
-
<xsl:param name="
|
6855
|
+
<xsl:param name="asciimath_text"/>
|
6713
6856
|
<xsl:param name="mathml_content"/>
|
6714
6857
|
|
6715
|
-
<xsl:variable name="
|
6858
|
+
<xsl:variable name="asciimath_text_">
|
6716
6859
|
<xsl:choose>
|
6717
|
-
<xsl:when test="normalize-space($
|
6718
|
-
<xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
|
6860
|
+
<xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
|
6861
|
+
<!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
|
6862
|
+
<xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
|
6719
6863
|
</xsl:choose>
|
6720
6864
|
</xsl:variable>
|
6721
6865
|
|
@@ -6739,10 +6883,10 @@
|
|
6739
6883
|
</xsl:attribute>
|
6740
6884
|
|
6741
6885
|
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
6742
|
-
<xsl:if test="normalize-space($
|
6886
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
6743
6887
|
<!-- put Mathin Alternate Text -->
|
6744
6888
|
<xsl:attribute name="fox:alt-text">
|
6745
|
-
<xsl:value-of select="$
|
6889
|
+
<xsl:value-of select="$asciimath_text_"/>
|
6746
6890
|
</xsl:attribute>
|
6747
6891
|
</xsl:if>
|
6748
6892
|
<!-- </xsl:if> -->
|
@@ -6815,6 +6959,29 @@
|
|
6815
6959
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
6816
6960
|
</xsl:template>
|
6817
6961
|
|
6962
|
+
<!-- Examples:
|
6963
|
+
<stem type="AsciiMath">x = 1</stem>
|
6964
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
6965
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
6966
|
+
-->
|
6967
|
+
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
6968
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6969
|
+
|
6970
|
+
<xsl:choose>
|
6971
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6972
|
+
<xsl:otherwise>
|
6973
|
+
<xsl:apply-templates>
|
6974
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
6975
|
+
</xsl:apply-templates>
|
6976
|
+
</xsl:otherwise>
|
6977
|
+
</xsl:choose>
|
6978
|
+
|
6979
|
+
</fo:inline>
|
6980
|
+
</xsl:template>
|
6981
|
+
<!-- ======================================= -->
|
6982
|
+
<!-- END: math -->
|
6983
|
+
<!-- ======================================= -->
|
6984
|
+
|
6818
6985
|
<xsl:template match="*[local-name()='localityStack']"/>
|
6819
6986
|
|
6820
6987
|
<xsl:template match="*[local-name()='link']" name="link">
|
@@ -8163,9 +8330,9 @@
|
|
8163
8330
|
<xsl:apply-templates mode="contents_item"/>
|
8164
8331
|
</xsl:template>
|
8165
8332
|
|
8166
|
-
<!--
|
8167
|
-
<!-- sourcecode
|
8168
|
-
<!--
|
8333
|
+
<!-- =============== -->
|
8334
|
+
<!-- sourcecode -->
|
8335
|
+
<!-- =============== -->
|
8169
8336
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8170
8337
|
|
8171
8338
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
@@ -8462,8 +8629,22 @@
|
|
8462
8629
|
</fo:block>
|
8463
8630
|
</xsl:if>
|
8464
8631
|
</xsl:template>
|
8465
|
-
<!--
|
8466
|
-
<!--
|
8632
|
+
<!-- =============== -->
|
8633
|
+
<!-- END sourcecode -->
|
8634
|
+
<!-- =============== -->
|
8635
|
+
|
8636
|
+
<!-- =============== -->
|
8637
|
+
<!-- pre -->
|
8638
|
+
<!-- =============== -->
|
8639
|
+
<xsl:template match="*[local-name()='pre']" name="pre">
|
8640
|
+
<fo:block xsl:use-attribute-sets="pre-style">
|
8641
|
+
<xsl:copy-of select="@id"/>
|
8642
|
+
<xsl:apply-templates/>
|
8643
|
+
</fo:block>
|
8644
|
+
</xsl:template>
|
8645
|
+
<!-- =============== -->
|
8646
|
+
<!-- pre -->
|
8647
|
+
<!-- =============== -->
|
8467
8648
|
|
8468
8649
|
<!-- ========== -->
|
8469
8650
|
<!-- permission -->
|
@@ -9507,6 +9688,10 @@
|
|
9507
9688
|
|
9508
9689
|
<fo:list-block xsl:use-attribute-sets="list-style">
|
9509
9690
|
|
9691
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ul' or local-name() = 'ol'])">
|
9692
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
9693
|
+
</xsl:if>
|
9694
|
+
|
9510
9695
|
<xsl:if test="*[local-name() = 'name']">
|
9511
9696
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9512
9697
|
</xsl:if>
|
@@ -10641,7 +10826,7 @@
|
|
10641
10826
|
|
10642
10827
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
10643
10828
|
|
10644
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
10829
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
10645
10830
|
|
10646
10831
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
10647
10832
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -11125,13 +11310,14 @@
|
|
11125
11310
|
</xsl:template>
|
11126
11311
|
|
11127
11312
|
<xsl:template name="setId">
|
11313
|
+
<xsl:param name="prefix"/>
|
11128
11314
|
<xsl:attribute name="id">
|
11129
11315
|
<xsl:choose>
|
11130
11316
|
<xsl:when test="@id">
|
11131
|
-
<xsl:value-of select="@id"/>
|
11317
|
+
<xsl:value-of select="concat($prefix, @id)"/>
|
11132
11318
|
</xsl:when>
|
11133
11319
|
<xsl:otherwise>
|
11134
|
-
<xsl:value-of select="generate-id()"/>
|
11320
|
+
<xsl:value-of select="concat($prefix, generate-id())"/>
|
11135
11321
|
</xsl:otherwise>
|
11136
11322
|
</xsl:choose>
|
11137
11323
|
</xsl:attribute>
|