isodoc 1.0.22 → 1.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 889ed14c0177867afde418d7d947a4f5963dc533c3c61c0b2d4bd320a1bb02a3
4
- data.tar.gz: 8f9a41c95de57470b68cba90e890d8753c49a36ea7f33658a72877177b5a8aa2
3
+ metadata.gz: 709ee937cab542be14ef994074c62d60df2e26ad5d858fbfd9dc9966f100a9be
4
+ data.tar.gz: 809faa2a70a8d982909f15794928b19981f5e3aee33da0afdc9fc81d8a4d030b
5
5
  SHA512:
6
- metadata.gz: aee9f7048977dabef0312c23c94e7d41b242e7623f7ec5daa252db232250ff9bd150e7d4750ac0000aa8463f79a8a716910b0e7a6929a3949353bbfe268b7327
7
- data.tar.gz: 0be841a473792658efd1221ee01a9011e1744cbe3e9fd4e2d0657ac057f41c057aba67f52d0f712326af915b5df802fc2d352338255fd688b31c1867d6ffac36
6
+ metadata.gz: 3b3a2e409e96f3f4e79723b06ebce456559280855c384ede05cbc15d5f9e217b7673228190190f1df84cc298ed5c89dd08e22a4eb89df5f1ff95fc978bba91e6
7
+ data.tar.gz: 9d26571df295d108788bd45d527e2a9ac8ef4d8f6cc6b7ec1aabc18c508d505e88a09c909f96b1d252274f293dac1950fba9b52359c30625a4c185658a9536a2
@@ -1,12 +1,11 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
3
  name: macos
4
4
 
5
5
  on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
- branches: [ '**' ]
10
9
 
11
10
  jobs:
12
11
  test-macos:
@@ -1,12 +1,11 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
3
  name: ubuntu
4
4
 
5
5
  on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
- branches: [ '**' ]
10
9
 
11
10
  jobs:
12
11
  test-linux:
@@ -25,7 +24,7 @@ jobs:
25
24
  architecture: 'x64'
26
25
  - name: Update gems
27
26
  run: |
28
- gem install bundler
27
+ gem install bundler
29
28
  bundle install --jobs 4 --retry 3
30
29
  - name: Use Node
31
30
  uses: actions/setup-node@v1
@@ -37,3 +36,15 @@ jobs:
37
36
  - name: Run specs
38
37
  run: |
39
38
  bundle exec rake
39
+ - name: Trigger dependent repositories
40
+ if: github.ref == 'refs/heads/master'
41
+ env:
42
+ GH_USERNAME: ${{ secrets.PAT_USERNAME }}
43
+ GH_ACCESS_TOKEN: ${{ secrets.PAT_TOKEN }}
44
+ run: |
45
+ curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
46
+ [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
47
+ for repo in $DEPENDENT_REPOS
48
+ do
49
+ sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY
50
+ done
@@ -1,12 +1,11 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
3
  name: windows
4
4
 
5
5
  on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
- branches: [ '**' ]
10
9
 
11
10
  jobs:
12
11
  test-windows:
@@ -26,9 +25,8 @@ jobs:
26
25
  - name: Update gems
27
26
  shell: pwsh
28
27
  run: |
29
- gem install bundler
28
+ gem install bundler
30
29
  bundle config --local path vendor/bundle
31
- bundle update
32
30
  bundle install --jobs 4 --retry 3
33
31
  - name: Use Node
34
32
  uses: actions/setup-node@v1
data/README.adoc CHANGED
@@ -1,8 +1,9 @@
1
1
  = isodoc: Processor to generate HTML/Word from Metanorma XML
2
2
 
3
3
  image:https://img.shields.io/gem/v/isodoc.svg["Gem Version", link="https://rubygems.org/gems/isodoc"]
4
- image:https://travis-ci.com/metanorma/isodoc.svg["Build Status", link="https://travis-ci.com/metanorma/isodoc"]
5
- image:https://ci.appveyor.com/api/projects/status/f93bvu6qfwxij07x?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/metanorma/isodoc"]
4
+ image:https://github.com/metanorma/isodoc/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/isodoc/actions?query=workflow%3Aubuntu"]
5
+ image:https://github.com/metanorma/isodoc/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/isodoc/actions?query=workflow%3Amacos"]
6
+ image:https://github.com/metanorma/isodoc/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/isodoc/actions?query=workflow%3Awindows"]
6
7
  image:https://codeclimate.com/github/metanorma/isodoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/isodoc"]
7
8
  image:https://img.shields.io/github/issues-pr-raw/metanorma/isodoc.svg["Pull Requests", link="https://github.com/metanorma/isodoc/pulls"]
8
9
  image:https://img.shields.io/github/commits-since/metanorma/isodoc/latest.svg["Commits since latest",link="https://github.com/metanorma/isodoc/releases"]
@@ -55,6 +55,21 @@ deprecated: DEPRECATED
55
55
  source: SOURCE
56
56
  and: and
57
57
  all_parts: All Parts
58
+ month_january: January
59
+ month_february: February
60
+ month_march: March
61
+ month_april: April
62
+ month_may: May
63
+ month_june: June
64
+ month_july: July
65
+ month_august: August
66
+ month_september: September
67
+ month_october: October
68
+ month_november: November
69
+ month_december: December
70
+ obligation: Obligation
71
+ subject: Subject
72
+ inherits: Inherits
58
73
  admonition: {
59
74
  danger: Danger,
60
75
  warning: Warning,
@@ -48,6 +48,21 @@ deprecated: DÉCONSEILLÉ
48
48
  source: SOURCE
49
49
  and: et
50
50
  all_parts: toutes les parties
51
+ month_january: Janvier
52
+ month_february: Février
53
+ month_march: Mars
54
+ month_april: Avril
55
+ month_may: Mai
56
+ month_june: Juin
57
+ month_july: Juillet
58
+ month_august: Août
59
+ month_september: Septembre
60
+ month_october: Octobre
61
+ month_november: Novembre
62
+ month_december: Décembre
63
+ obligation: Obligation
64
+ subject: Sujet
65
+ inherits: Hérite
51
66
  admonition: {
52
67
  danger: Danger,
53
68
  warning: Avertissement,
@@ -50,6 +50,21 @@ deprecated: 被取代
50
50
  source: 定义
51
51
  and: 和
52
52
  all_parts: 所有部分
53
+ month_january: 一月
54
+ month_february: 二月
55
+ month_march: 三月
56
+ month_april: 四月
57
+ month_may: 五月
58
+ month_june: 六月
59
+ month_july: 七月
60
+ month_august: 八月
61
+ month_september: 九月
62
+ month_october: 十月
63
+ month_november: 十一月
64
+ month_december: 十二月
65
+ obligation: 义务
66
+ subject: 主体
67
+ inherits: 继承自
53
68
  admonition: {
54
69
  danger: 危险,
55
70
  warning: 警告,
@@ -7,7 +7,10 @@
7
7
  }
8
8
 
9
9
  font-weight: $fontWeight;
10
- height: $length;
10
+
11
+ @if $length {
12
+ height: $length;
13
+ }
11
14
 
12
15
  color: $color;
13
16
  text-transform: uppercase;
@@ -28,9 +31,9 @@
28
31
 
29
32
  @mixin docBand(
30
33
  $order,
31
- $textLength,
34
+ $textLength: null,
32
35
  $offset: 0,
33
- $color: white,
36
+ $color: white,
34
37
  $fontWeight: 400,
35
38
  $fontFamily: null) {
36
39
 
@@ -125,5 +125,5 @@ b, strong {
125
125
  }
126
126
 
127
127
  div.document-stage-band, div.document-type-band {
128
- background-color: #FFFFFF;
128
+ background-color: #000000;
129
129
  }
@@ -23,7 +23,8 @@ module IsoDoc::Function
23
23
  docxml.xpath("//td | //th").each do |d|
24
24
  d.traverse do |n|
25
25
  next unless n.text?
26
- n.replace(break_up_long_strings(n.text))
26
+ n.replace(HTMLEntities.new.encode(
27
+ break_up_long_strings(n.text)))
27
28
  end
28
29
  end
29
30
  end
@@ -55,12 +55,12 @@ module IsoDoc::Function
55
55
  end
56
56
 
57
57
  def get_linkend(node)
58
- link = anchor_linkend(node, docid_l10n(node["target"] || node["citeas"]))
59
- link += eref_localities(node.xpath(ns("./locality")), link)
60
58
  contents = node.children.select { |c| c.name != "locality" }.
61
59
  select { |c| !c.text? || /\S/.match(c) }
62
- return link if contents.nil? || contents.empty?
63
- Nokogiri::XML::NodeSet.new(node.document, contents).to_xml
60
+ !contents.empty? and
61
+ return Nokogiri::XML::NodeSet.new(node.document, contents).to_xml
62
+ link = anchor_linkend(node, docid_l10n(node["target"] || node["citeas"]))
63
+ link + eref_localities(node.xpath(ns("./locality")), link)
64
64
  # so not <origin bibitemid="ISO7301" citeas="ISO 7301">
65
65
  # <locality type="section"><reference>3.1</reference></locality></origin>
66
66
  end
@@ -15,6 +15,7 @@ module IsoDoc::Function
15
15
  identifier = render_identifier(id)
16
16
  if bibliography then ref_entry_code(r, ordinal, identifier, id)
17
17
  else
18
+ identifier = "[#{identifier}]" if id["type"] == "metanorma"
18
19
  r << "#{identifier}, "
19
20
  end
20
21
  reference_format(b, r)
@@ -26,6 +27,7 @@ module IsoDoc::Function
26
27
  prefix_bracketed_ref(ref, ordinal) if biblio
27
28
  id = bibitem_ref_code(b)
28
29
  identifier = render_identifier(id)
30
+ identifier = "[#{identifier}]" if id["type"] == "metanorma" && !biblio
29
31
  ref << identifier
30
32
  date_note_process(b, ref)
31
33
  ref << ", "
@@ -20,17 +20,32 @@ module IsoDoc::Function
20
20
 
21
21
  def recommendation_attributes1(node)
22
22
  out = []
23
- oblig = node["obligation"] and out << "Obligation: #{oblig}"
24
- subj = node&.at(ns("./subject"))&.text and out << "Subject: #{subj}"
25
- node.xpath(ns("./inherit")).each { |i| out << "Inherit: #{i.text}" }
23
+ oblig = node["obligation"] and
24
+ out << l10n("#{@labels['obligation']}: #{oblig}")
25
+ subj = node&.at(ns("./subject"))&.text and
26
+ out << l10n("#{@labels['subject']}: #{subj}")
27
+ node.xpath(ns("./inherit")).each do |i|
28
+ out << recommendation_attr_parse(i, @labels["inherits"])
29
+ end
26
30
  node.xpath(ns("./classification")).each do |c|
27
- tag = c.at(ns("./tag")) or next
28
- value = c.at(ns("./value")) or next
29
- out << "#{tag.text.capitalize}: #{value.text}"
31
+ line = recommendation_attr_keyvalue(c, "tag", "value") and out << line
30
32
  end
31
33
  out
32
34
  end
33
35
 
36
+ def recommendation_attr_parse(node, label)
37
+ noko do |xml|
38
+ xml << "#{label}: "
39
+ node.children.each { |n| parse(n, xml) }
40
+ end.join
41
+ end
42
+
43
+ def recommendation_attr_keyvalue(node, key, value)
44
+ tag = node.at(ns("./#{key}")) or return nil
45
+ value = node.at(ns("./#{value}")) or return nil
46
+ "#{tag.text.capitalize}: #{value.text}"
47
+ end
48
+
34
49
  def recommendation_attributes(node, out)
35
50
  ret = recommendation_attributes1(node)
36
51
  return if ret.empty?
@@ -1,3 +1,5 @@
1
+ require_relative "./metadata_date"
2
+
1
3
  module IsoDoc
2
4
  class Metadata
3
5
  DATETYPES = %w{published accessed created implemented obsoleted confirmed
@@ -7,6 +9,10 @@ module IsoDoc
7
9
  Common::ns(xpath)
8
10
  end
9
11
 
12
+ def l10n(a, b, c)
13
+ IsoDoc::Function::I18n::l10n(a, b, c)
14
+ end
15
+
10
16
  def initialize(lang, script, labels)
11
17
  @metadata = {}
12
18
  DATETYPES.each { |w| @metadata["#{w}date".to_sym] = "XXX" }
@@ -20,6 +26,10 @@ module IsoDoc
20
26
  @metadata
21
27
  end
22
28
 
29
+ def labels
30
+ @labels
31
+ end
32
+
23
33
  def set(key, value)
24
34
  @metadata[key] = value
25
35
  end
@@ -93,14 +103,24 @@ module IsoDoc
93
103
 
94
104
  def agency(xml)
95
105
  agency = ""
106
+ publisher = []
96
107
  xml.xpath(ns("//bibdata/contributor[xmlns:role/@type = 'publisher']/"\
97
108
  "organization")).each do |org|
98
109
  name = org&.at(ns("./name"))&.text
99
- abbrev = org&.at(ns("./abbreviation"))&.text
100
- agency1 = abbrev || name
110
+ agency1 = org&.at(ns("./abbreviation"))&.text || name
111
+ publisher << name if name
101
112
  agency = iso?(org) ? "ISO/#{agency}" : "#{agency}#{agency1}/"
102
113
  end
103
114
  set(:agency, agency.sub(%r{/$}, ""))
115
+ set(:publisher, multiple_and(publisher, @labels["and"]))
116
+ end
117
+
118
+ def multiple_and(names, andword)
119
+ return "" if names.length == 0
120
+ return names[0] if names.length == 1
121
+ names.length == 2 and
122
+ return l10n("#{names[0]} #{andword} #{names[1]}", @lang, @script)
123
+ l10n(names[0..-2].join(", ") + " #{andword} #{names[-1]}", @lang, @script)
104
124
  end
105
125
 
106
126
  def docstatus(isoxml, _out)
@@ -148,14 +168,16 @@ module IsoDoc
148
168
  draftinfo += ", #{revdate}" if revdate
149
169
  draftinfo += ")"
150
170
  end
151
- IsoDoc::Function::I18n::l10n(draftinfo, @lang, @script)
171
+ l10n(draftinfo, @lang, @script)
152
172
  end
153
173
 
154
174
  def version(isoxml, _out)
155
175
  set(:edition, isoxml&.at(ns("//bibdata/edition"))&.text)
156
176
  set(:docyear, isoxml&.at(ns("//bibdata/copyright/from"))&.text)
157
177
  set(:draft, isoxml&.at(ns("//version/draft"))&.text)
158
- set(:revdate, isoxml&.at(ns("//version/revision-date"))&.text)
178
+ revdate = isoxml&.at(ns("//version/revision-date"))&.text
179
+ set(:revdate, revdate)
180
+ set(:revdate_monthyear, monthyr(revdate))
159
181
  set(:draftinfo,
160
182
  draftinfo(get[:draft], get[:revdate]))
161
183
  end
@@ -0,0 +1,27 @@
1
+ module IsoDoc
2
+ class Metadata
3
+ def months
4
+ {
5
+ "01": @labels["month_january"],
6
+ "02": @labels["month_february"],
7
+ "03": @labels["month_march"],
8
+ "04": @labels["month_april"],
9
+ "05": @labels["month_may"],
10
+ "06": @labels["month_june"],
11
+ "07": @labels["month_july"],
12
+ "08": @labels["month_august"],
13
+ "09": @labels["month_september"],
14
+ "10": @labels["month_october"],
15
+ "11": @labels["month_november"],
16
+ "12": @labels["month_december"],
17
+ }
18
+ end
19
+
20
+ def monthyr(isodate)
21
+ m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
22
+ return isodate unless m && m[:yr] && m[:mo]
23
+ IsoDoc::Function::I18n::l10n("#{months[m[:mo].to_sym]} #{m[:yr]}",
24
+ @lang, @script)
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.0.22".freeze
2
+ VERSION = "1.0.23".freeze
3
3
  end
@@ -37,9 +37,7 @@ module IsoDoc::WordFunction
37
37
  super.merge(attr_code({
38
38
  summary: node["summary"],
39
39
  width: node["width"],
40
- style: "mso-table-lspace:15.0cm;margin-left:423.0pt;"\
41
- "mso-table-rspace:15.0cm;margin-right:423.0pt;"\
42
- "mso-table-anchor-horizontal:column;"\
40
+ style: "mso-table-anchor-horizontal:column;"\
43
41
  "mso-table-overlap:never;border-spacing:0;border-width:1px;"
44
42
  }))
45
43
  end
@@ -987,7 +987,7 @@ World</p>
987
987
  <permission id="_">
988
988
  <label>/ogc/recommendation/wfs/2</label>
989
989
  <inherit>/ss/584/2015/level/1</inherit>
990
- <inherit>/ss/584/2015/level/2</inherit>
990
+ <inherit><eref type="inline" bibitemid="rfc2616" citeas="RFC 2616">RFC 2616 (HTTP/1.1)</eref></inherit>
991
991
  <subject>user</subject>
992
992
  <classification> <tag>control-class</tag> <value>Technical</value> </classification><classification> <tag>priority</tag> <value>P0</value> </classification><classification> <tag>family</tag> <value>System and Communications Protection</value> </classification><classification> <tag>family</tag> <value>System and Communications Protocols</value> </classification>
993
993
  <description>
@@ -1030,6 +1030,12 @@ World</p>
1030
1030
  </import>
1031
1031
  </permission>
1032
1032
  </foreword></preface>
1033
+ <bibliography><references id="_bibliography" obligation="informative">
1034
+ <title>Bibliography</title>
1035
+ <bibitem id="rfc2616" type="standard"> <fetched>2020-03-27</fetched> <title format="text/plain" language="en" script="Latn">Hypertext Transfer Protocol — HTTP/1.1</title> <uri type="xml">https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml</uri> <uri type="src">https://www.rfc-editor.org/info/rfc2616</uri> <docidentifier type="IETF">RFC 2616</docidentifier> <docidentifier type="rfc-anchor">RFC2616</docidentifier> <docidentifier type="DOI">10.17487/RFC2616</docidentifier> <date type="published"> <on>1999-06</on> </date> <contributor> <role type="author"/> <person> <name> <completename language="en">R. Fielding</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Gettys</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Mogul</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">H. Frystyk</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">L. Masinter</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">P. Leach</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">T. Berners-Lee</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <language>en</language> <script>Latn</script> <abstract format="text/plain" language="en" script="Latn">HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068. [STANDARDS-TRACK]</abstract> <series type="main"> <title format="text/plain" language="en" script="Latn">RFC</title> <number>2616</number> </series> <place>Fremont, CA</place></bibitem>
1036
+
1037
+
1038
+ </references></bibliography>
1033
1039
  </iso-standard>
1034
1040
  INPUT
1035
1041
  #{HTML_HDR}
@@ -1038,9 +1044,9 @@ World</p>
1038
1044
  <h1 class="ForewordTitle">Foreword</h1>
1039
1045
  <div class="permission"><p class="RecommendationTitle">Permission 1:<br/>/ogc/recommendation/wfs/2</p>
1040
1046
  <p><i>Subject: user<br/>
1041
- Inherit: /ss/584/2015/level/1
1047
+ Inherits: /ss/584/2015/level/1
1042
1048
  <br/>
1043
- Inherit: /ss/584/2015/level/2
1049
+ Inherits: <a href='#rfc2616'>RFC 2616 (HTTP/1.1)</a>
1044
1050
  <br/>Control-class: Technical<br/>Priority: P0<br/>Family: System and Communications Protection<br/>Family: System and Communications Protocols</i></p>
1045
1051
 
1046
1052
  <div class="requirement-description">
@@ -1064,6 +1070,14 @@ Inherit: /ss/584/2015/level/2
1064
1070
  </div>
1065
1071
  </div>
1066
1072
  <p class="zzSTDTitle1"/>
1073
+ <br/>
1074
+ <div>
1075
+ <h1 class='Section3'>Bibliography</h1>
1076
+ <p id='rfc2616' class='Biblio'>
1077
+ [1]&#160; IETF RFC 2616,
1078
+ <i>Hypertext Transfer Protocol&#8201;&#8212;&#8201;HTTP/1.1</i>
1079
+ </p>
1080
+ </div>
1067
1081
  </div>
1068
1082
  </body>
1069
1083
  </html>
@@ -1125,7 +1139,7 @@ Inherit: /ss/584/2015/level/2
1125
1139
  <br/>
1126
1140
  <div>
1127
1141
  <h1 class="ForewordTitle">Foreword</h1>
1128
- <div class="require"><p class="RecommendationTitle">Requirement:<br/>/ogc/recommendation/wfs/2. A New Requirement</p><p><i>Subject: user<br/>Inherit: /ss/584/2015/level/1</i></p>
1142
+ <div class="require"><p class="RecommendationTitle">Requirement:<br/>/ogc/recommendation/wfs/2. A New Requirement</p><p><i>Subject: user<br/>Inherits: /ss/584/2015/level/1</i></p>
1129
1143
 
1130
1144
  <div class="requirement-description">
1131
1145
  <p id="_">I recommend <i>this</i>.</p>
@@ -1154,6 +1168,121 @@ Inherit: /ss/584/2015/level/2
1154
1168
  OUTPUT
1155
1169
  end
1156
1170
 
1171
+ it "processes requirements in French" do
1172
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1173
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1174
+ <bibdata>
1175
+ <language>fr</language>
1176
+ <script>Latn</script>
1177
+ </bibdata>
1178
+ <preface><foreword>
1179
+ <requirement id="A" unnumbered="true">
1180
+ <title>A New Requirement</title>
1181
+ <label>/ogc/recommendation/wfs/2</label>
1182
+ <inherit>/ss/584/2015/level/1</inherit>
1183
+ <subject>user</subject>
1184
+ <description>
1185
+ <p id="_">I recommend <em>this</em>.</p>
1186
+ </description>
1187
+ <specification exclude="true" type="tabular">
1188
+ <p id="_">This is the object of the recommendation:</p>
1189
+ <table id="_">
1190
+ <tbody>
1191
+ <tr>
1192
+ <td style="text-align:left;">Object</td>
1193
+ <td style="text-align:left;">Value</td>
1194
+ </tr>
1195
+ <tr>
1196
+ <td style="text-align:left;">Mission</td>
1197
+ <td style="text-align:left;">Accomplished</td>
1198
+ </tr>
1199
+ </tbody>
1200
+ </table>
1201
+ </specification>
1202
+ <description>
1203
+ <p id="_">As for the measurement targets,</p>
1204
+ </description>
1205
+ <measurement-target exclude="false">
1206
+ <p id="_">The measurement target shall be measured as:</p>
1207
+ <formula id="B">
1208
+ <stem type="AsciiMath">r/1 = 0</stem>
1209
+ </formula>
1210
+ </measurement-target>
1211
+ <verification exclude="false">
1212
+ <p id="_">The following code will be run for verification:</p>
1213
+ <sourcecode id="_">CoreRoot(success): HttpResponse
1214
+ if (success)
1215
+ recommendation(label: success-response)
1216
+ end
1217
+ </sourcecode>
1218
+ </verification>
1219
+ <import exclude="true">
1220
+ <sourcecode id="_">success-response()</sourcecode>
1221
+ </import>
1222
+ </requirement>
1223
+ </foreword></preface>
1224
+ </iso-standard>
1225
+ INPUT
1226
+ #{HTML_HDR.gsub(/"en"/, '"fr"')}
1227
+ <br/>
1228
+ <div>
1229
+ <h1 class='ForewordTitle'>Avant-propos</h1>
1230
+ <div class='require'>
1231
+ <p class='RecommendationTitle'>
1232
+ Exigence:
1233
+ <br/>
1234
+ /ogc/recommendation/wfs/2. A New Requirement
1235
+ </p>
1236
+ <p>
1237
+ <i>
1238
+ Sujet: user
1239
+ <br/>
1240
+ H&#233;rite: /ss/584/2015/level/1
1241
+ </i>
1242
+ </p>
1243
+ <div class='requirement-description'>
1244
+ <p id='_'>
1245
+ I recommend
1246
+ <i>this</i>
1247
+ .
1248
+ </p>
1249
+ </div>
1250
+ <div class='requirement-description'>
1251
+ <p id='_'>As for the measurement targets,</p>
1252
+ </div>
1253
+ <div class='requirement-measurement-target'>
1254
+ <p id='_'>The measurement target shall be measured as:</p>
1255
+ <div id='B' class='formula'>
1256
+ <p>
1257
+ <span class='stem'>(#(r/1 = 0)#)</span>
1258
+ &#160; (1)
1259
+ </p>
1260
+ </div>
1261
+ </div>
1262
+ <div class='requirement-verification'>
1263
+ <p id='_'>The following code will be run for verification:</p>
1264
+ <pre id='_' class='prettyprint '>
1265
+ CoreRoot(success): HttpResponse
1266
+ <br/>
1267
+ &#160;&#160;&#160;&#160;&#160; if (success)
1268
+ <br/>
1269
+ &#160;&#160;&#160;&#160;&#160; recommendation(label:
1270
+ success-response)
1271
+ <br/>
1272
+ &#160;&#160;&#160;&#160;&#160; end
1273
+ <br/>
1274
+ &#160;&#160;&#160;
1275
+ </pre>
1276
+ </div>
1277
+ </div>
1278
+ </div>
1279
+ <p class='zzSTDTitle1'/>
1280
+ </div>
1281
+ </body>
1282
+ </html>
1283
+ OUTPUT
1284
+ end
1285
+
1157
1286
  it "processes recommendation" do
1158
1287
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1159
1288
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -1210,7 +1339,7 @@ Inherit: /ss/584/2015/level/2
1210
1339
  <br/>
1211
1340
  <div>
1212
1341
  <h1 class="ForewordTitle">Foreword</h1>
1213
- <div class="recommend"><p class="RecommendationTitle">Recommendation 1:<br/>/ogc/recommendation/wfs/2</p><p><i>Obligation: shall,could<br/>Subject: user<br/>Inherit: /ss/584/2015/level/1<br/>Type: text<br/>Language: BASIC</i></p>
1342
+ <div class="recommend"><p class="RecommendationTitle">Recommendation 1:<br/>/ogc/recommendation/wfs/2</p><p><i>Obligation: shall,could<br/>Subject: user<br/>Inherits: /ss/584/2015/level/1<br/>Type: text<br/>Language: BASIC</i></p>
1214
1343
  <div class="requirement-description">
1215
1344
  <p id="_">I recommend <i>this</i>.</p>
1216
1345
  </div>
@@ -831,7 +831,7 @@ ABBBBBBBBBBBBBBBBBBBBBBBBBBBB
831
831
  <tbody>
832
832
  <tr>
833
833
  <td align='left' style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;'>
834
- http://www.example.com/ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAA/ BBBBBBBBBBBBBBBBBBBBBBBBBBBB
834
+ http://www.example.com/ &amp;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAA/ BBBBBBBBBBBBBBBBBBBBBBBBBBBB
835
835
  </td>
836
836
  <td align='left' style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;'>
837
837
  http://www.example.com/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAABBBBBBBBBBBBBBBBBBBBBB BBBBBB
@@ -873,7 +873,7 @@ ABBBBBBBBBBBBBBBBBBBBBBBBBBBB
873
873
  <tbody>
874
874
  <tr>
875
875
  <td align='left' style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;'>
876
- http://www.example.com/ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAA/ BBBBBBBBBBBBBBBBBBBBBBBBBBBB
876
+ http://www.example.com/ &amp;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAA/ BBBBBBBBBBBBBBBBBBBBBBBBBBBB
877
877
  </td>
878
878
  <td align='left' style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;'>
879
879
  http://www.example.com/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAABBBBBBBBBBBBBBBBBBBBBB BBBBBB
@@ -92,7 +92,7 @@ RSpec.describe IsoDoc do
92
92
  </bibdata>
93
93
  </iso-standard>
94
94
  INPUT
95
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>["Barney Rubble", "Fred Flintstone"], :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]}, :circulateddate=>"2015", :confirmeddate=>"2017", :copieddate=>"2016", :createddate=>"2010&ndash;2011", :doc=>"URL E", :docnumber=>"17301-1", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :html=>"URL B", :implementeddate=>"XXX", :issueddate=>"XXX", :iteration=>"2", :obsoleteddate=>"2014", :pdf=>"URL D", :publisheddate=>"2011", :receiveddate=>"XXX", :revdate=>"2016-05-01", :stage=>"Committee draft", :stageabbr=>"CD", :substage=>"Withdrawn", :transmitteddate=>"2020", :unchangeddate=>"2019", :unpublished=>true, :updateddate=>"2018", :url=>"URL A", :xml=>"URL C"}
95
+ {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>["Barney Rubble", "Fred Flintstone"], :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]}, :circulateddate=>"2015", :confirmeddate=>"2017", :copieddate=>"2016", :createddate=>"2010&ndash;2011", :doc=>"URL E", :docnumber=>"17301-1", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :html=>"URL B", :implementeddate=>"XXX", :issueddate=>"XXX", :iteration=>"2", :obsoleteddate=>"2014", :pdf=>"URL D", :publisheddate=>"2011", :publisher=>"", :receiveddate=>"XXX", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :stage=>"Committee draft", :stageabbr=>"CD", :substage=>"Withdrawn", :transmitteddate=>"2020", :unchangeddate=>"2019", :unpublished=>true, :updateddate=>"2018", :url=>"URL A", :xml=>"URL C"}
96
96
  OUTPUT
97
97
  end
98
98
 
@@ -108,6 +108,10 @@ OUTPUT
108
108
  <title language="en" format="text/plain">Cereals and pulses</title>
109
109
  <docidentifier>17301-1-3</docidentifier>
110
110
  <docnumber>17301</docnumber>
111
+ <date type="published"><on>2011-01</on></date>
112
+ <version>
113
+ <revision-date>2016-05</revision-date>
114
+ </version>
111
115
  <contributor>
112
116
  <role type="author"/>
113
117
  <organization>
@@ -117,14 +121,23 @@ OUTPUT
117
121
  <contributor>
118
122
  <role type="publisher"/>
119
123
  <organization>
124
+ <name>International Organization for Standardization</name>
120
125
  <abbreviation>ISO</abbreviation>
121
126
  </organization>
122
127
  </contributor>
123
128
  <contributor>
124
129
  <role type="publisher"/>
125
130
  <organization>
131
+ <name>International Electrotechnical Commission</name>
126
132
  <abbreviation>IEC</abbreviation>
127
133
  </organization>
134
+ </contributor>
135
+ <contributor>
136
+ <role type="publisher"/>
137
+ <organization>
138
+ <name>Institute of Electrical and Electronics Engineers</name>
139
+ <abbreviation>IEEE</abbreviation>
140
+ </organization>
128
141
  </contributor>
129
142
  <language>en</language>
130
143
  <script>Latn</script>
@@ -153,8 +166,68 @@ OUTPUT
153
166
  </version>
154
167
  </iso-standard>
155
168
  INPUT
156
- {:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05-01)", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :partof=>"IEC 8122", :publisheddate=>"XXX", :receiveddate=>"XXX", :revdate=>"2016-05-01", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX"}
169
+ {:accesseddate=>"XXX", :agency=>"ISO/IEC/IEEE", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05)", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :partof=>"IEC 8122", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization, International Electrotechnical Commission and Institute of Electrical and Electronics Engineers", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"May 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX"}
157
170
  OUTPUT
158
171
  end
159
172
 
173
+ it "processes IsoXML metadata in French" do
174
+ c = IsoDoc::Convert.new({})
175
+ arr = c.convert_init(<<~"INPUT", "test", false)
176
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
177
+ <bibdata type="standard">
178
+ <language>fr</language>
179
+ <script>Latn</script>
180
+ </bibdata>
181
+ </iso-standard>
182
+ INPUT
183
+ expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
184
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
185
+ <bibdata type="standard">
186
+ <title language="fr" format="text/plain">Céréales et légumineuses</ti>
187
+ <title language="en" format="text/plain">Cereals and pulses</title>
188
+ <docidentifier>17301-1-3</docidentifier>
189
+ <docnumber>17301</docnumber>
190
+ <date type="published"><on>2011-01</on></date>
191
+ <version>
192
+ <revision-date>2016-05</revision-date>
193
+ </version>
194
+ <contributor>
195
+ <role type="author"/>
196
+ <organization>
197
+ <name>ISO</name>
198
+ </organization>
199
+ </contributor>
200
+ <contributor>
201
+ <role type="publisher"/>
202
+ <organization>
203
+ <name>International Organization for Standardization</name>
204
+ <abbreviation>ISO</abbreviation>
205
+ </organization>
206
+ </contributor>
207
+ <contributor>
208
+ <role type="publisher"/>
209
+ <organization>
210
+ <name>International Electrotechnical Commission</name>
211
+ <abbreviation>IEC</abbreviation>
212
+ </organization>
213
+ </contributor>
214
+ <language>fr</language>
215
+ <script>Latn</script>
216
+ <status><stage>Published</stage></status>
217
+ <copyright>
218
+ <from>2016</from>
219
+ <owner>
220
+ <organization>
221
+ <name>International Organization for Standardization</name>
222
+ </organization>
223
+ </owner>
224
+ </copyright>
225
+ </bibdata>
226
+ </iso-standard>
227
+ INPUT
228
+ {:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization et International Electrotechnical Commission", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"Mai 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX"}
229
+ OUTPUT
230
+ end
231
+
232
+
160
233
  end
@@ -1095,7 +1095,7 @@ word = File.read("test.doc").sub(/^.*<div class="WordSection2">/m, '<div class="
1095
1095
  <div>
1096
1096
  <h1 class="ForewordTitle">Foreword</h1>
1097
1097
  <div align="center" class="table_container">
1098
- <table class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1098
+ <table class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1099
1099
  <thead>
1100
1100
  <tr>
1101
1101
  <td rowspan="2" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;">
@@ -1149,7 +1149,7 @@ word = File.read("test.doc").sub(/^.*<div class="WordSection2">/m, '<div class="
1149
1149
  <div>
1150
1150
  <h1 class='ForewordTitle'>Foreword</h1>
1151
1151
  <div align='center' class="table_container">
1152
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1152
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1153
1153
  <a name='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7' id='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7'/>
1154
1154
  <thead>
1155
1155
  <tr>
@@ -1351,7 +1351,7 @@ expect(xmlpp(html.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).
1351
1351
  </div>
1352
1352
  <div class='WordSection2_1'>
1353
1353
  <div align='center' class='table_container'>
1354
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1354
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1355
1355
  <tbody>
1356
1356
  <tr>
1357
1357
  <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</td>
@@ -1399,7 +1399,7 @@ expect(xmlpp(html.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).
1399
1399
  <div class='WordSection3_1'>
1400
1400
  <p class='TableTitle' style='text-align:center;'>Table 1</p>
1401
1401
  <div align='center' class='table_container'>
1402
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1402
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1403
1403
  <a name='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249' id='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249'/>
1404
1404
  <thead>
1405
1405
  <tr>
@@ -16,6 +16,7 @@ RSpec.describe IsoDoc do
16
16
  <eref bibitemid="ref1"/>
17
17
  <eref bibitemid="ref10"/>
18
18
  <eref bibitemid="ref12"/>
19
+ <eref bibitemid="zip_ffs"/>
19
20
  </p>
20
21
  </foreword></preface>
21
22
  <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
@@ -24,6 +25,7 @@ RSpec.describe IsoDoc do
24
25
  <title format="text/plain">Cereals or cereal products</title>
25
26
  <title type="main" format="text/plain">Cereals and cereal products</title>
26
27
  <docidentifier type="ISO">ISO 712</docidentifier>
28
+ <docidentifier type="metanorma">[110]</docidentifier>
27
29
  <contributor>
28
30
  <role type="publisher"/>
29
31
  <organization>
@@ -64,6 +66,8 @@ RSpec.describe IsoDoc do
64
66
  <docidentifier type="ICC">167</docidentifier>
65
67
  </bibitem>
66
68
  <note><p>This is an annotation of ISO 20483:2013-2014</p></note>
69
+ <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
70
+
67
71
 
68
72
  </references><references id="_bibliography" obligation="informative">
69
73
  <title>Bibliography</title>
@@ -125,26 +129,28 @@ RSpec.describe IsoDoc do
125
129
  <div>
126
130
  <h1 class="ForewordTitle">Foreword</h1>
127
131
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
128
- <a href="#ISO712">ISO 712</a>
132
+ <a href="#ISO712">[110]</a>
129
133
  <a href="#ISBN">[1]</a>
130
134
  <a href="#ISSN">[2]</a>
131
135
  <a href="#ISO16634">ISO 16634:-- (all parts)</a>
132
136
  <a href="#ref1">ICC 167</a>
133
137
  <a href="#ref10">[10]</a>
134
138
  <a href="#ref12">[Citn]</a>
139
+ <a href='#zip_ffs'>[5]</a>
135
140
  </p>
136
141
  </div>
137
142
  <p class="zzSTDTitle1"/>
138
143
  <div>
139
144
  <h1>1.&#160; Normative references</h1>
140
145
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
141
- <p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
146
+ <p id="ISO712" class="NormRef">[110], <i>Cereals and cereal products</i></p>
142
147
  <p id="ISO16634" class="NormRef">ISO 16634:-- (all parts)<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>1</sup></a>, <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i></p>
143
148
  <p id="ISO20483" class="NormRef">ISO 20483:2013-2014, <i>Cereals and pulses</i></p>
144
149
  <p id="ref1" class="NormRef">ICC 167, <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
145
150
  <div id="" class="Note">
146
151
  <p><span class="note_label">NOTE</span>&#160; This is an annotation of ISO 20483:2013-2014</p>
147
152
  </div>
153
+ <p id='zip_ffs' class='NormRef'>[5], Title 5</p>
148
154
  </div>
149
155
  <br/>
150
156
  <div>
@@ -217,7 +217,7 @@ RSpec.describe IsoDoc do
217
217
  <h1 class="ForewordTitle">Foreword</h1>
218
218
  <p class="TableTitle" style="text-align:center;">Table 1</p>
219
219
  <div align="center" class="table_container">
220
- <table id="tableD-0" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;">
220
+ <table id="tableD-0" class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;">
221
221
  <tbody>
222
222
  <tr>
223
223
  <td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">A</td>
@@ -233,7 +233,7 @@ RSpec.describe IsoDoc do
233
233
  </span>
234
234
  </p>
235
235
  <div align="center" class="table_container">
236
- <table id="tableD-1" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc" width="70%">
236
+ <table id="tableD-1" class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc" width="70%">
237
237
  <thead>
238
238
  <tr>
239
239
  <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Description</td>
@@ -63,6 +63,17 @@ RSpec.describe IsoDoc do
63
63
  INPUT
64
64
  end
65
65
 
66
+ it "does not warn of missing crossreference if text is supplied" do
67
+ expect { IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true) }.not_to output(/No label has been processed for ID N1/).to_stderr
68
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
69
+ <preface>
70
+ <foreword>
71
+ <p>
72
+ <xref target="N1">abc</xref>
73
+ </preface>
74
+ </iso-standard>
75
+ INPUT
76
+ end
66
77
 
67
78
  it "cross-references notes" do
68
79
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.22
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2020-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -345,6 +345,7 @@ files:
345
345
  - lib/isodoc/html_function/html.rb
346
346
  - lib/isodoc/html_function/postprocess.rb
347
347
  - lib/isodoc/metadata.rb
348
+ - lib/isodoc/metadata_date.rb
348
349
  - lib/isodoc/pdf_convert.rb
349
350
  - lib/isodoc/version.rb
350
351
  - lib/isodoc/word_convert.rb