metanorma-iso 1.10.2 → 1.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/iso/basicdoc.rng +1 -11
  3. data/lib/asciidoctor/iso/biblio.rng +0 -2
  4. data/lib/asciidoctor/iso/front.rb +2 -2
  5. data/lib/asciidoctor/iso/isodoc.rng +42 -18
  6. data/lib/asciidoctor/iso/isostandard-amd.rng +1 -1
  7. data/lib/asciidoctor/iso/isostandard.rng +1 -3
  8. data/lib/asciidoctor/iso/reqt.rng +1 -1
  9. data/lib/asciidoctor/iso/section.rb +1 -1
  10. data/lib/asciidoctor/iso/validate.rb +1 -1
  11. data/lib/asciidoctor/iso/validate_section.rb +1 -1
  12. data/lib/isodoc/iso/html/isodoc.css +0 -1
  13. data/lib/isodoc/iso/html/isodoc.scss +0 -1
  14. data/lib/isodoc/iso/html/style-human.css +0 -1
  15. data/lib/isodoc/iso/html/style-human.scss +0 -1
  16. data/lib/isodoc/iso/html/style-iso.css +0 -1
  17. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  18. data/lib/isodoc/iso/iso.amendment.xsl +20 -7
  19. data/lib/isodoc/iso/iso.international-standard.xsl +20 -7
  20. data/lib/isodoc/iso/isosts_convert.rb +6 -2
  21. data/lib/isodoc/iso/presentation_xml_convert.rb +19 -9
  22. data/lib/isodoc/iso/sts_convert.rb +5 -2
  23. data/lib/metanorma/iso/processor.rb +2 -2
  24. data/lib/metanorma/iso/version.rb +1 -1
  25. data/metanorma-iso.gemspec +3 -3
  26. data/spec/asciidoctor/blocks_spec.rb +4 -4
  27. data/spec/asciidoctor/cleanup_spec.rb +15 -12
  28. data/spec/asciidoctor/refs_spec.rb +87 -84
  29. data/spec/isodoc/i18n_spec.rb +7 -7
  30. data/spec/isodoc/inline_spec.rb +4 -4
  31. data/spec/isodoc/section_spec.rb +3 -3
  32. data/spec/isodoc/terms_spec.rb +18 -18
  33. data/spec/isodoc/xref_spec.rb +3 -3
  34. data/spec/metanorma/processor_spec.rb +110 -14
  35. data/spec/vcr_cassettes/docrels.yml +68 -68
  36. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 697a2f88d09f6183604f8ead7682575df682e59c09c211b3482404bbb5b7c5bf
4
- data.tar.gz: 452e1127517360903e4406ab81d443903f2490350b4a1df7b2dd114221c454a1
3
+ metadata.gz: 496766841b7e48e3e2f8f879f5e9c485b0874212ea6316a926558ba434f1636a
4
+ data.tar.gz: 24bc39c4fdf29b8dfeaba19a972d8a2d2610d940b6b9afb93da58975c8bd6ac3
5
5
  SHA512:
6
- metadata.gz: '09ac021eb3cd2c87f722f3b4c2033e0c5188f814609ff389018b7f65026a61f4f9c51f15650904b742a540a0c719f7742afedab5d0b89770c6913f02d38dfa44'
7
- data.tar.gz: d04e4234d13815cdb41168a18887610a2700611519cf3c9748cc492181ce28bafbfc95cfc094ca478d5dac461487992b822ebcec50bf385f9a998a28003fe34e
6
+ metadata.gz: 2a780fb001362017bf69e8b64ca78eb9c877d20c7bed50670d69fbf9f7a71c40756725e272e3baa0cc9d026c4809cbb222a466f0f9b77b30fe35afbdc9038d60
7
+ data.tar.gz: 9db3e3c657f3d5525e2407cc27c498bffbda194dcf06199e49def7a540af8a70755e1f6ff2b4465af09ea9440ffae9a106a965ba2e6696363774faf3bbab7004
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <include href="biblio.rng">
4
4
  <start>
5
5
  <ref name="document"/>
@@ -19,7 +19,6 @@
19
19
  </define>
20
20
  <define name="bibdata">
21
21
  <element name="bibdata">
22
- <a:documentation>Document attributes</a:documentation>
23
22
  <ref name="BibData"/>
24
23
  </element>
25
24
  </define>
@@ -105,12 +104,10 @@
105
104
  </define>
106
105
  <define name="paragraph">
107
106
  <element name="p">
108
- <a:documentation>Paragraph</a:documentation>
109
107
  <ref name="ParagraphType"/>
110
108
  </element>
111
109
  </define>
112
110
  <define name="Alignments">
113
- <a:documentation>Text alignment</a:documentation>
114
111
  <choice>
115
112
  <value>left</value>
116
113
  <value>right</value>
@@ -218,7 +215,6 @@
218
215
  </define>
219
216
  <define name="quote">
220
217
  <element name="quote">
221
- <a:documentation>Block quotes</a:documentation>
222
218
  <attribute name="id">
223
219
  <data type="ID"/>
224
220
  </attribute>
@@ -253,7 +249,6 @@
253
249
  </define>
254
250
  <define name="sourcecode">
255
251
  <element name="sourcecode">
256
- <a:documentation>Source code, a pre-formatted source snippet to be rendered in monospace font, and with spaces preserved</a:documentation>
257
252
  <attribute name="id">
258
253
  <data type="ID"/>
259
254
  </attribute>
@@ -1052,7 +1047,6 @@
1052
1047
  </define>
1053
1048
  <define name="ul">
1054
1049
  <element name="ul">
1055
- <a:documentation>Unordered list</a:documentation>
1056
1050
  <attribute name="id">
1057
1051
  <data type="ID"/>
1058
1052
  </attribute>
@@ -1066,7 +1060,6 @@
1066
1060
  </define>
1067
1061
  <define name="li">
1068
1062
  <element name="li">
1069
- <a:documentation>List item</a:documentation>
1070
1063
  <optional>
1071
1064
  <attribute name="id">
1072
1065
  <data type="ID"/>
@@ -1104,7 +1097,6 @@
1104
1097
  </define>
1105
1098
  <define name="dl">
1106
1099
  <element name="dl">
1107
- <a:documentation>Definition list</a:documentation>
1108
1100
  <attribute name="id">
1109
1101
  <data type="ID"/>
1110
1102
  </attribute>
@@ -1119,7 +1111,6 @@
1119
1111
  </define>
1120
1112
  <define name="dt">
1121
1113
  <element name="dt">
1122
- <a:documentation>Definition term</a:documentation>
1123
1114
  <zeroOrMore>
1124
1115
  <ref name="TextElement"/>
1125
1116
  </zeroOrMore>
@@ -1127,7 +1118,6 @@
1127
1118
  </define>
1128
1119
  <define name="dd">
1129
1120
  <element name="dd">
1130
- <a:documentation>Definition description</a:documentation>
1131
1121
  <zeroOrMore>
1132
1122
  <ref name="paragraph-with-footnote"/>
1133
1123
  </zeroOrMore>
@@ -76,14 +76,12 @@
76
76
  <define name="script">
77
77
  <a:documentation>ISO-639</a:documentation>
78
78
  <element name="script">
79
- <a:documentation>ISO-639</a:documentation>
80
79
  <text/>
81
80
  </element>
82
81
  </define>
83
82
  <define name="edition">
84
83
  <a:documentation>ISO-15924: Latn</a:documentation>
85
84
  <element name="edition">
86
- <a:documentation>ISO-15924: Latn</a:documentation>
87
85
  <optional>
88
86
  <attribute name="number"/>
89
87
  </optional>
@@ -18,8 +18,8 @@ module Asciidoctor
18
18
  xml.updates_document_type a
19
19
  end
20
20
 
21
- def metadata_doctype(node, xml)
22
- xml.doctype doctype(node)
21
+ def metadata_subdoctype(node, xml)
22
+ super
23
23
  a = node.attr("horizontal") and xml.horizontal a
24
24
  end
25
25
 
@@ -58,7 +58,7 @@
58
58
  <attribute name="alt"/>
59
59
  </optional>
60
60
  <optional>
61
- <attribute name="updatetype">
61
+ <attribute name="update-type">
62
62
  <data type="boolean"/>
63
63
  </attribute>
64
64
  </optional>
@@ -194,7 +194,6 @@
194
194
  </optional>
195
195
  <optional>
196
196
  <attribute name="type">
197
- <a:documentation>allow specifying labels of an ordered list</a:documentation>
198
197
  <choice>
199
198
  <value>roman</value>
200
199
  <value>alphabet</value>
@@ -1815,9 +1814,6 @@
1815
1814
  <optional>
1816
1815
  <ref name="termsubject"/>
1817
1816
  </optional>
1818
- <optional>
1819
- <ref name="termusage"/>
1820
- </optional>
1821
1817
  <oneOrMore>
1822
1818
  <ref name="termdefinition"/>
1823
1819
  </oneOrMore>
@@ -1881,17 +1877,37 @@
1881
1877
  </attribute>
1882
1878
  </optional>
1883
1879
  <optional>
1884
- <attribute name="geographicArea"/>
1880
+ <attribute name="geographic-area"/>
1885
1881
  </optional>
1886
1882
  <choice>
1887
1883
  <ref name="expression_designation"/>
1888
1884
  <ref name="letter_symbol_designation"/>
1889
1885
  <ref name="graphical_symbol_designation"/>
1890
1886
  </choice>
1887
+ <optional>
1888
+ <ref name="fieldofapplication"/>
1889
+ </optional>
1890
+ <optional>
1891
+ <ref name="usageinfo"/>
1892
+ </optional>
1891
1893
  <zeroOrMore>
1892
1894
  <ref name="termsource"/>
1893
1895
  </zeroOrMore>
1894
1896
  </define>
1897
+ <define name="fieldofapplication">
1898
+ <element name="field-of-application">
1899
+ <oneOrMore>
1900
+ <ref name="PureTextElement"/>
1901
+ </oneOrMore>
1902
+ </element>
1903
+ </define>
1904
+ <define name="usageinfo">
1905
+ <element name="usage-info">
1906
+ <oneOrMore>
1907
+ <ref name="PureTextElement"/>
1908
+ </oneOrMore>
1909
+ </element>
1910
+ </define>
1895
1911
  <define name="letter_symbol_designation">
1896
1912
  <element name="letter-symbol">
1897
1913
  <optional>
@@ -1947,7 +1963,7 @@
1947
1963
  </zeroOrMore>
1948
1964
  </element>
1949
1965
  <optional>
1950
- <element name="abbreviationType">
1966
+ <element name="abbreviation-type">
1951
1967
  <ref name="AbbreviationType"/>
1952
1968
  </element>
1953
1969
  </optional>
@@ -1957,7 +1973,7 @@
1957
1973
  </element>
1958
1974
  </optional>
1959
1975
  <optional>
1960
- <element name="grammarInfo">
1976
+ <element name="grammar-info">
1961
1977
  <ref name="Grammar"/>
1962
1978
  </element>
1963
1979
  </optional>
@@ -1984,6 +2000,11 @@
1984
2000
  <ref name="GrammarGender"/>
1985
2001
  </element>
1986
2002
  </zeroOrMore>
2003
+ <zeroOrMore>
2004
+ <element name="number">
2005
+ <ref name="GrammarNumber"/>
2006
+ </element>
2007
+ </zeroOrMore>
1987
2008
  <optional>
1988
2009
  <element name="isPreposition">
1989
2010
  <data type="boolean"/>
@@ -2015,7 +2036,7 @@
2015
2036
  </element>
2016
2037
  </optional>
2017
2038
  <zeroOrMore>
2018
- <element name="grammarvalue">
2039
+ <element name="grammar-value">
2019
2040
  <text/>
2020
2041
  </element>
2021
2042
  </zeroOrMore>
@@ -2028,6 +2049,13 @@
2028
2049
  <value>common</value>
2029
2050
  </choice>
2030
2051
  </define>
2052
+ <define name="GrammarNumber">
2053
+ <choice>
2054
+ <value>singular</value>
2055
+ <value>dual</value>
2056
+ <value>plural</value>
2057
+ </choice>
2058
+ </define>
2031
2059
  <define name="termdomain">
2032
2060
  <element name="domain">
2033
2061
  <oneOrMore>
@@ -2042,13 +2070,6 @@
2042
2070
  </oneOrMore>
2043
2071
  </element>
2044
2072
  </define>
2045
- <define name="termusage">
2046
- <element name="usageinfo">
2047
- <oneOrMore>
2048
- <ref name="BasicBlock"/>
2049
- </oneOrMore>
2050
- </element>
2051
- </define>
2052
2073
  <define name="termdefinition">
2053
2074
  <element name="definition">
2054
2075
  <choice>
@@ -2062,13 +2083,16 @@
2062
2083
  </element>
2063
2084
  </define>
2064
2085
  <define name="verbaldefinition">
2065
- <element name="verbaldefinition">
2086
+ <element name="verbal-definition">
2066
2087
  <oneOrMore>
2067
2088
  <choice>
2068
2089
  <ref name="paragraph"/>
2069
2090
  <ref name="dl"/>
2070
2091
  <ref name="ol"/>
2071
2092
  <ref name="ul"/>
2093
+ <ref name="table"/>
2094
+ <ref name="figure"/>
2095
+ <ref name="formula"/>
2072
2096
  </choice>
2073
2097
  </oneOrMore>
2074
2098
  <zeroOrMore>
@@ -2077,7 +2101,7 @@
2077
2101
  </element>
2078
2102
  </define>
2079
2103
  <define name="nonverbalrep">
2080
- <element name="nonverbalrepresentation">
2104
+ <element name="non-verbal-representation">
2081
2105
  <oneOrMore>
2082
2106
  <choice>
2083
2107
  <ref name="table"/>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
4
4
  <include href="isostandard.rng">
5
5
  <start>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
4
4
  <include href="isodoc.rng">
5
5
  <start>
@@ -359,7 +359,6 @@
359
359
  -->
360
360
  <define name="iso-standard">
361
361
  <element name="iso-standard">
362
- <a:documentation>Root element for xml document</a:documentation>
363
362
  <attribute name="version"/>
364
363
  <attribute name="type">
365
364
  <choice>
@@ -470,7 +469,6 @@
470
469
  </define>
471
470
  <define name="annex-appendix">
472
471
  <element name="appendix">
473
- <a:documentation>Appendix</a:documentation>
474
472
  <ref name="Clause-Section"/>
475
473
  </element>
476
474
  </define>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!--
4
4
  Presupposes isodoc.rnc, is included in it
5
5
  include "isodoc.rnc" { }
@@ -1,5 +1,5 @@
1
1
  require "htmlentities"
2
- require "uri"
2
+ require "uri" if /^2\./.match?(RUBY_VERSION)
3
3
 
4
4
  module Asciidoctor
5
5
  module ISO
@@ -78,7 +78,7 @@ module Asciidoctor
78
78
  # ISO/IEC DIR 2, 16.5.6
79
79
  def termdef_style(xmldoc)
80
80
  xmldoc.xpath("//term").each do |t|
81
- para = t.at("./definition/verbaldefinition") || return
81
+ para = t.at("./definition/verbal-definition") || return
82
82
  term = t.at("./preferred//name").text
83
83
  termdef_warn(para.text, /\A(the|a)\b/i, t, term,
84
84
  "term definition starts with article")
@@ -216,7 +216,7 @@ module Asciidoctor
216
216
 
217
217
  def asset_style(root)
218
218
  root.xpath("//example | //termexample").each { |e| example_style(e) }
219
- root.xpath("//definition/verbaldefinition").each { |e| definition_style(e) }
219
+ root.xpath("//definition/verbal-definition").each { |e| definition_style(e) }
220
220
  root.xpath("//note").each { |e| note_style(e) }
221
221
  root.xpath("//fn").each { |e| footnote_style(e) }
222
222
  root.xpath(ASSETS_TO_STYLE).each { |e| style(e, extract_text(e)) }
@@ -689,7 +689,6 @@ p.Terms, li.Terms, div.Terms {
689
689
  mso-fareast-font-family: "SimHei",serif;
690
690
  mso-bidi-font-family: {{headerfont}};
691
691
  mso-ansi-language: EN-GB;
692
- font-weight: bold;
693
692
  mso-bidi-font-weight: normal; }
694
693
 
695
694
  p.AltTerms, li.AltTerms, div.AltTerms {
@@ -658,7 +658,6 @@ p.Terms, li.Terms, div.Terms
658
658
  mso-fareast-font-family:"SimHei",serif;
659
659
  mso-bidi-font-family:$headerfont;
660
660
  mso-ansi-language:EN-GB;
661
- font-weight:bold;
662
661
  mso-bidi-font-weight:normal;}
663
662
  p.AltTerms, li.AltTerms, div.AltTerms
664
663
  {mso-style-name:"AltTerm\(s\)";
@@ -429,7 +429,6 @@ p.AltTerms {
429
429
  margin-left: 2em; }
430
430
 
431
431
  p.Terms {
432
- font-weight: bold;
433
432
  margin-top: 0em; }
434
433
 
435
434
  /* Navigation*/
@@ -252,7 +252,6 @@ p.AltTerms {
252
252
  }
253
253
 
254
254
  p.Terms {
255
- font-weight: bold;
256
255
  margin-top: 0em;
257
256
  }
258
257
 
@@ -378,7 +378,6 @@ p.AltTerms {
378
378
  margin-left: 2em; }
379
379
 
380
380
  p.Terms {
381
- font-weight: bold;
382
381
  margin-top: 0em; }
383
382
 
384
383
  /* Navigation*/
@@ -193,7 +193,6 @@ p.AltTerms {
193
193
  }
194
194
 
195
195
  p.Terms {
196
- font-weight: bold;
197
196
  margin-top: 0em;
198
197
  }
199
198
 
@@ -1801,6 +1801,7 @@
1801
1801
  <xsl:apply-templates select="ancestor::iso:term[1]/iso:name" mode="presentation"/>
1802
1802
  </fo:block>
1803
1803
  <fo:block font-weight="bold" keep-with-next="always">
1804
+ <xsl:call-template name="setStyle_preferred"/>
1804
1805
  <xsl:apply-templates/>
1805
1806
  </fo:block>
1806
1807
  </fo:block>
@@ -2765,7 +2766,8 @@
2765
2766
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2766
2767
 
2767
2768
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2768
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2769
+
2770
+ <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']]">
2769
2771
  <xsl:sort select="@displayorder" data-type="number"/>
2770
2772
  <xsl:apply-templates select="." mode="contents"/>
2771
2773
  </xsl:for-each>
@@ -2775,7 +2777,7 @@
2775
2777
  <xsl:apply-templates select="." mode="contents"/>
2776
2778
  </xsl:for-each>
2777
2779
 
2778
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2780
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2779
2781
  <xsl:sort select="@displayorder" data-type="number"/>
2780
2782
  <xsl:apply-templates select="." mode="contents"/>
2781
2783
  </xsl:for-each>
@@ -5579,12 +5581,12 @@
5579
5581
  </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5580
5582
  <xsl:apply-templates mode="contents"/>
5581
5583
  <xsl:text> </xsl:text>
5582
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
5584
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
5583
5585
  <xsl:apply-templates mode="bookmarks"/>
5584
5586
  <xsl:text> </xsl:text>
5585
5587
  </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
5586
5588
  <xsl:value-of select="."/>
5587
- </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5589
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5588
5590
  <xsl:value-of select="."/>
5589
5591
  </xsl:template><xsl:template match="node()" mode="contents">
5590
5592
  <xsl:apply-templates mode="contents"/>
@@ -5854,6 +5856,8 @@
5854
5856
 
5855
5857
 
5856
5858
 
5859
+
5860
+
5857
5861
  <fo:block xsl:use-attribute-sets="sourcecode-style">
5858
5862
  <xsl:variable name="_font-size">
5859
5863
 
@@ -5887,13 +5891,17 @@
5887
5891
 
5888
5892
 
5889
5893
 
5894
+
5895
+
5890
5896
  <xsl:apply-templates/>
5891
5897
  </fo:block>
5892
-
5898
+
5893
5899
 
5894
5900
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5895
5901
 
5896
5902
 
5903
+
5904
+
5897
5905
  </fo:block-container>
5898
5906
  </fo:block-container>
5899
5907
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -6489,15 +6497,20 @@
6489
6497
  <fo:block xsl:use-attribute-sets="deprecates-style">
6490
6498
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
6491
6499
  </fo:block>
6500
+ </xsl:template><xsl:template name="setStyle_preferred">
6501
+ <xsl:if test="*[local-name() = 'strong']">
6502
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
6503
+ </xsl:if>
6492
6504
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
6493
6505
  <fo:block xsl:use-attribute-sets="definition-style">
6494
6506
  <xsl:apply-templates/>
6495
6507
  </fo:block>
6496
6508
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
6497
6509
  <xsl:apply-templates/>
6498
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
6510
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
6499
6511
  <fo:inline> <xsl:apply-templates/></fo:inline>
6500
- <fo:block> </fo:block>
6512
+ <!-- <fo:block>&#xA0;</fo:block> -->
6513
+ <fo:block/>
6501
6514
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
6502
6515
 
6503
6516
  <fo:block>
@@ -1801,6 +1801,7 @@
1801
1801
  <xsl:apply-templates select="ancestor::iso:term[1]/iso:name" mode="presentation"/>
1802
1802
  </fo:block>
1803
1803
  <fo:block font-weight="bold" keep-with-next="always">
1804
+ <xsl:call-template name="setStyle_preferred"/>
1804
1805
  <xsl:apply-templates/>
1805
1806
  </fo:block>
1806
1807
  </fo:block>
@@ -2765,7 +2766,8 @@
2765
2766
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2766
2767
 
2767
2768
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2768
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2769
+
2770
+ <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']]">
2769
2771
  <xsl:sort select="@displayorder" data-type="number"/>
2770
2772
  <xsl:apply-templates select="." mode="contents"/>
2771
2773
  </xsl:for-each>
@@ -2775,7 +2777,7 @@
2775
2777
  <xsl:apply-templates select="." mode="contents"/>
2776
2778
  </xsl:for-each>
2777
2779
 
2778
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2780
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2779
2781
  <xsl:sort select="@displayorder" data-type="number"/>
2780
2782
  <xsl:apply-templates select="." mode="contents"/>
2781
2783
  </xsl:for-each>
@@ -5579,12 +5581,12 @@
5579
5581
  </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
5580
5582
  <xsl:apply-templates mode="contents"/>
5581
5583
  <xsl:text> </xsl:text>
5582
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
5584
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
5583
5585
  <xsl:apply-templates mode="bookmarks"/>
5584
5586
  <xsl:text> </xsl:text>
5585
5587
  </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
5586
5588
  <xsl:value-of select="."/>
5587
- </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5589
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
5588
5590
  <xsl:value-of select="."/>
5589
5591
  </xsl:template><xsl:template match="node()" mode="contents">
5590
5592
  <xsl:apply-templates mode="contents"/>
@@ -5854,6 +5856,8 @@
5854
5856
 
5855
5857
 
5856
5858
 
5859
+
5860
+
5857
5861
  <fo:block xsl:use-attribute-sets="sourcecode-style">
5858
5862
  <xsl:variable name="_font-size">
5859
5863
 
@@ -5887,13 +5891,17 @@
5887
5891
 
5888
5892
 
5889
5893
 
5894
+
5895
+
5890
5896
  <xsl:apply-templates/>
5891
5897
  </fo:block>
5892
-
5898
+
5893
5899
 
5894
5900
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5895
5901
 
5896
5902
 
5903
+
5904
+
5897
5905
  </fo:block-container>
5898
5906
  </fo:block-container>
5899
5907
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -6489,15 +6497,20 @@
6489
6497
  <fo:block xsl:use-attribute-sets="deprecates-style">
6490
6498
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
6491
6499
  </fo:block>
6500
+ </xsl:template><xsl:template name="setStyle_preferred">
6501
+ <xsl:if test="*[local-name() = 'strong']">
6502
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
6503
+ </xsl:if>
6492
6504
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
6493
6505
  <fo:block xsl:use-attribute-sets="definition-style">
6494
6506
  <xsl:apply-templates/>
6495
6507
  </fo:block>
6496
6508
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
6497
6509
  <xsl:apply-templates/>
6498
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
6510
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
6499
6511
  <fo:inline> <xsl:apply-templates/></fo:inline>
6500
- <fo:block> </fo:block>
6512
+ <!-- <fo:block>&#xA0;</fo:block> -->
6513
+ <fo:block/>
6501
6514
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
6502
6515
 
6503
6516
  <fo:block>
@@ -22,8 +22,12 @@ module IsoDoc
22
22
  f.path
23
23
  end
24
24
  FileUtils.rm_rf dir
25
- MnConvert.convert(input_fname, output_fname || "#{fname}.#{@suffix}",
26
- MnConvert::InputFormat::MN, { output_format: :iso })
25
+ MnConvert.convert(input_fname,
26
+ {
27
+ input_format: MnConvert::InputFormat::MN,
28
+ output_file: output_fname || "#{fname}.#{@suffix}",
29
+ output_format: :iso,
30
+ })
27
31
  end
28
32
  end
29
33
  end