metanorma-standoc 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/standoc/base.rb +0 -1
  3. data/lib/asciidoctor/standoc/blocks.rb +1 -1
  4. data/lib/asciidoctor/standoc/cleanup.rb +1 -2
  5. data/lib/asciidoctor/standoc/cleanup_block.rb +0 -1
  6. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +2 -2
  7. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +0 -1
  8. data/lib/asciidoctor/standoc/cleanup_maths.rb +0 -1
  9. data/lib/asciidoctor/standoc/cleanup_section.rb +0 -1
  10. data/lib/asciidoctor/standoc/converter.rb +1 -0
  11. data/lib/asciidoctor/standoc/front.rb +0 -1
  12. data/lib/asciidoctor/standoc/front_contributor.rb +0 -1
  13. data/lib/asciidoctor/standoc/isodoc.rng +32 -7
  14. data/lib/asciidoctor/standoc/macros.rb +7 -5
  15. data/lib/asciidoctor/standoc/macros_plantuml.rb +3 -3
  16. data/lib/asciidoctor/standoc/macros_terms.rb +34 -7
  17. data/lib/asciidoctor/standoc/section.rb +19 -12
  18. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +58 -17
  19. data/lib/asciidoctor/standoc/utils.rb +0 -1
  20. data/lib/asciidoctor/standoc/validate.rb +4 -3
  21. data/lib/isodoc/html/html_titlepage.html +81 -0
  22. data/lib/isodoc/html/htmlstyle.css +983 -0
  23. data/lib/isodoc/html/htmlstyle.scss +714 -0
  24. data/lib/isodoc/html/scripts.html +71 -0
  25. data/lib/metanorma/standoc/processor.rb +16 -7
  26. data/lib/metanorma/standoc/version.rb +1 -1
  27. data/spec/asciidoctor/cleanup_spec.rb +12 -12
  28. data/spec/asciidoctor/macros_json2text_spec.rb +1 -1
  29. data/spec/asciidoctor/macros_spec.rb +228 -75
  30. data/spec/asciidoctor/validate_spec.rb +12 -2
  31. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +50 -50
  32. data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
  33. data/spec/vcr_cassettes/isobib_get_123_1.yml +23 -23
  34. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +34 -34
  35. data/spec/vcr_cassettes/isobib_get_123_2001.yml +13 -13
  36. data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
  37. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  38. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
  39. metadata +6 -2
@@ -0,0 +1,71 @@
1
+ <script>
2
+ $("#toc").on('click', 'li', function(e) {
3
+ $(this).parent().find('li.toc-active').removeClass('toc-active');
4
+ $(this).addClass('toc-active');
5
+ });
6
+ </script>
7
+
8
+ <script>
9
+ //TOC toggle animation
10
+ $('#toggle').on('click', function(){
11
+ if( $('nav').is(':visible') ) {
12
+ $('nav').animate({ 'left': '-353px' }, 'slow', function(){
13
+ $('nav').hide();
14
+ });
15
+ $('.container').animate({ 'padding-left': '31px' }, 'slow');
16
+ }
17
+ else {
18
+ $('nav').show();
19
+ $('nav').animate({ 'left': '0px' }, 'slow');
20
+ $('.container').animate({ 'padding-left': '360px' }, 'slow');
21
+ }
22
+ });
23
+ </script>
24
+
25
+ <script>
26
+ // Scroll to top button
27
+ window.onscroll = function() {scrollFunction()};
28
+
29
+ function scrollFunction() {
30
+ if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
31
+ document.getElementById("myBtn").style.display = "block";
32
+ } else {
33
+ document.getElementById("myBtn").style.display = "none";
34
+ }
35
+ }
36
+
37
+ // When the user clicks on the button, scroll to the top of the document
38
+ function topFunction() {
39
+ document.body.scrollTop = 0;
40
+ document.documentElement.scrollTop = 0;
41
+ }
42
+ </script>
43
+
44
+ <script>
45
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
46
+ //
47
+ // AnchorJS - v4.2.2 - 2020-04-20
48
+ // https://www.bryanbraun.com/anchorjs/
49
+ // Copyright (c) 2020 Bryan Braun; Licensed MIT
50
+ //
51
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
52
+ !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
53
+ // @license-end
54
+ </script>
55
+ <script>
56
+ /*
57
+ $(document).ready(function() {
58
+ $('[id^=toc]').each(function ()
59
+ {
60
+ var currentToc = $(this);
61
+ var url = window.location.href;
62
+ currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
63
+ });
64
+ });
65
+ */
66
+ anchors.options = {
67
+ placement: 'left'
68
+ };
69
+ anchors.add('h1, h2, h3, h4');
70
+ </script>
71
+
@@ -3,8 +3,7 @@ require "metanorma/processor"
3
3
  module Metanorma
4
4
  module Standoc
5
5
  class Processor < Metanorma::Processor
6
-
7
- def initialize
6
+ def initialize # rubocop:disable Lint/MissingSuper
8
7
  @short = :standoc
9
8
  @input_format = :asciidoc
10
9
  @asciidoctor_backend = :standoc
@@ -13,7 +12,7 @@ module Metanorma
13
12
  def output_formats
14
13
  super.merge(
15
14
  html: "html",
16
- doc: "doc"
15
+ doc: "doc",
17
16
  )
18
17
  end
19
18
 
@@ -21,14 +20,24 @@ module Metanorma
21
20
  "Metanorma::Standoc #{Metanorma::Standoc::VERSION}/IsoDoc #{IsoDoc::VERSION}"
22
21
  end
23
22
 
24
- def output(isodoc_node, inname, outname, format, options={})
23
+ def html_path(file)
24
+ File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file)
25
+ end
26
+
27
+ def output(isodoc_node, inname, outname, format, options = {})
25
28
  case format
26
29
  when :html
27
- IsoDoc::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
30
+ options = options
31
+ .merge(htmlstylesheet: html_path("htmlstyle.scss"),
32
+ htmlcoverpage: html_path("html_titlepage.html"))
33
+ IsoDoc::HtmlConvert.new(options)
34
+ .convert(inname, isodoc_node, nil, outname)
28
35
  when :doc
29
- IsoDoc::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
36
+ IsoDoc::WordConvert.new(options)
37
+ .convert(inname, isodoc_node, nil, outname)
30
38
  when :presentation
31
- IsoDoc::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
39
+ IsoDoc::PresentationXMLConvert.new(options)
40
+ .convert(inname, isodoc_node, nil, outname)
32
41
  else
33
42
  super
34
43
  end
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.10.0".freeze
22
+ VERSION = "1.10.1".freeze
23
23
  end
24
24
  end
@@ -1931,11 +1931,11 @@ RSpec.describe Asciidoctor::Standoc do
1931
1931
  <definitions id='L' obligation="normative">
1932
1932
  <title>Symbols and abbreviated terms</title>
1933
1933
  <dl id='_'>
1934
- <dt>m</dt>
1934
+ <dt id="symbol-m">m</dt>
1935
1935
  <dd>
1936
1936
  <p id='_'>Definition 7</p>
1937
1937
  </dd>
1938
- <dt>
1938
+ <dt id="symbol--n-">
1939
1939
  <stem type='MathML'>
1940
1940
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
1941
1941
  <mi>n</mi>
@@ -1945,23 +1945,23 @@ RSpec.describe Asciidoctor::Standoc do
1945
1945
  <dd>
1946
1946
  <p id='_'>Definition 6</p>
1947
1947
  </dd>
1948
- <dt>x</dt>
1948
+ <dt id="symbol-x">x</dt>
1949
1949
  <dd>
1950
1950
  <p id='_'>Definition 5</p>
1951
1951
  </dd>
1952
- <dt>x_m_</dt>
1952
+ <dt id='symbol-x_m_'>x_m_</dt>
1953
1953
  <dd>
1954
1954
  <p id='_'>Definition 4</p>
1955
1955
  </dd>
1956
- <dt>x_1_</dt>
1956
+ <dt id='symbol-x_1_'>x_1_</dt>
1957
1957
  <dd>
1958
1958
  <p id='_'>Definition 3</p>
1959
1959
  </dd>
1960
- <dt>Xa</dt>
1960
+ <dt id='symbol-xa'>Xa</dt>
1961
1961
  <dd>
1962
1962
  <p id='_'>Definition 2</p>
1963
1963
  </dd>
1964
- <dt>α</dt>
1964
+ <dt id='symbol-&#945;'>α</dt>
1965
1965
  <dd>
1966
1966
  <p id='_'>Definition 1</p>
1967
1967
  </dd>
@@ -1993,11 +1993,11 @@ RSpec.describe Asciidoctor::Standoc do
1993
1993
  <definitions id='L' obligation="normative">
1994
1994
  <title>Symbols and abbreviated terms</title>
1995
1995
  <dl id='_'>
1996
- <dt>x</dt>
1996
+ <dt id='symbol-x'>x</dt>
1997
1997
  <dd>
1998
1998
  <p id='_'>Definition 5</p>
1999
1999
  </dd>
2000
- <dt><stem type='MathML'>
2000
+ <dt id='symbol--xm-'><stem type='MathML'>
2001
2001
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
2002
2002
  <msub>
2003
2003
  <mrow>
@@ -2012,7 +2012,7 @@ RSpec.describe Asciidoctor::Standoc do
2012
2012
  <dd>
2013
2013
  <p id='_'>Definition 4</p>
2014
2014
  </dd>
2015
- <dt><stem type='MathML'>
2015
+ <dt id='symbol--x1-'><stem type='MathML'>
2016
2016
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
2017
2017
  <msub>
2018
2018
  <mrow>
@@ -2027,11 +2027,11 @@ RSpec.describe Asciidoctor::Standoc do
2027
2027
  <dd>
2028
2028
  <p id='_'>Definition 3</p>
2029
2029
  </dd>
2030
- <dt>xa</dt>
2030
+ <dt id='symbol-xa'>xa</dt>
2031
2031
  <dd>
2032
2032
  <p id='_'>Definition 2</p>
2033
2033
  </dd>
2034
- <dt>
2034
+ <dt id='symbol--&#945;-'>
2035
2035
  <stem type='MathML'>
2036
2036
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
2037
2037
  <mi>α</mi>
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe 'Json2Text macros' do
3
+ RSpec.describe "Json2Text macros" do
4
4
  it_behaves_like "structured data 2 text preprocessor" do
5
5
  let(:extention) { "json" }
6
6
  def transform_to_type(data)
@@ -174,6 +174,8 @@ RSpec.describe Asciidoctor::Standoc do
174
174
  {{blah,word}}
175
175
  term:[blah,word]
176
176
  {{blah,term,word}}
177
+ {{blah,term,word,xref}}
178
+ {{blah,term,word,xref,option="noital,noref"}}
177
179
 
178
180
  [[clause1]]
179
181
  == Clause
@@ -271,6 +273,26 @@ RSpec.describe Asciidoctor::Standoc do
271
273
  <tt>blah</tt>
272
274
  </strong>
273
275
  </concept>
276
+ <concept>
277
+ <strong>
278
+ term
279
+ <tt>blah</tt>
280
+ , display
281
+ <tt>term</tt>
282
+ not resolved via ID
283
+ <tt>blah</tt>
284
+ </strong>
285
+ </concept>
286
+ <concept ital='false' ref='false'>
287
+ <strong>
288
+ term
289
+ <tt>blah</tt>
290
+ , display
291
+ <tt>term</tt>
292
+ not resolved via ID
293
+ <tt>blah</tt>
294
+ </strong>
295
+ </concept>
274
296
  </p>
275
297
  </foreword>
276
298
  </preface>
@@ -286,6 +308,137 @@ RSpec.describe Asciidoctor::Standoc do
286
308
  .to be_equivalent_to xmlpp(output)
287
309
  end
288
310
 
311
+ it "processes the Asciidoctor::Standoc concept macros for acronyms" do
312
+ input = <<~INPUT
313
+ #{ASCIIDOC_BLANK_HDR}
314
+ {{Clause1}}
315
+ {{Clause1,Clause 1}}
316
+ {{Clause 2}}
317
+ {{Clause 2,Clause 1}}
318
+ {{<<Clause2>>,Clause 2}}
319
+ symbol:[Clause1]
320
+ symbol:[Clause1,word]
321
+ symbol:[Clause 2]
322
+ symbol:[Clause 2,word]
323
+ {{<<Clause2>>,word}}
324
+ {{<<Clause2>>,word,term}}
325
+ {{<<Clause2>>,word,term,xref}}
326
+ {{<<Clause2>>,word,term,xref,option="noital,noref"}}
327
+ {{<<Clause2>>,word,term,xref,option="ital,ref"}}
328
+
329
+ == Terms and definitions
330
+ === Clause1
331
+ == Symbols and Abbreviated Terms
332
+ Clause1:: A
333
+ [[Clause2]]Clause 2:: C
334
+ INPUT
335
+ output = <<~OUTPUT
336
+ #{BLANK_HDR}
337
+ <preface>
338
+ <foreword id='_' obligation='informative'>
339
+ <title>Foreword</title>
340
+ <p id='_'>
341
+ <concept>
342
+ <refterm>Clause1</refterm>
343
+ <renderterm>Clause1</renderterm>
344
+ <xref target='term-clause1'/>
345
+ </concept>
346
+ <concept>
347
+ <refterm>Clause1</refterm>
348
+ <renderterm>Clause 1</renderterm>
349
+ <xref target='term-clause1'/>
350
+ </concept>
351
+ <concept>
352
+ <refterm>Clause 2</refterm>
353
+ <renderterm>Clause 2</renderterm>
354
+ <xref target='Clause2'/>
355
+ </concept>
356
+ <concept>
357
+ <refterm>Clause 2</refterm>
358
+ <renderterm>Clause 1</renderterm>
359
+ <xref target='Clause2'/>
360
+ </concept>
361
+ <concept>
362
+ <refterm>Clause 2</refterm>
363
+ <renderterm>Clause 2</renderterm>
364
+ <xref target='Clause2'/>
365
+ </concept>
366
+ <concept>
367
+ <refterm>Clause1</refterm>
368
+ <renderterm>Clause1</renderterm>
369
+ <xref target='symbol-clause1'/>
370
+ </concept>
371
+ <concept>
372
+ <refterm>Clause1</refterm>
373
+ <renderterm>word</renderterm>
374
+ <xref target='symbol-clause1'/>
375
+ </concept>
376
+ <concept>
377
+ <refterm>Clause 2</refterm>
378
+ <renderterm>Clause 2</renderterm>
379
+ <xref target='Clause2'/>
380
+ </concept>
381
+ <concept>
382
+ <refterm>Clause 2</refterm>
383
+ <renderterm>word</renderterm>
384
+ <xref target='Clause2'/>
385
+ </concept>
386
+ <concept>
387
+ <refterm>word</refterm>
388
+ <renderterm>word</renderterm>
389
+ <xref target='Clause2'/>
390
+ </concept>
391
+ <concept>
392
+ <refterm>word</refterm>
393
+ <renderterm>term</renderterm>
394
+ <xref target='Clause2'/>
395
+ </concept>
396
+ <concept>
397
+ <refterm>word</refterm>
398
+ <renderterm>term</renderterm>
399
+ <xref target='Clause2'>xref</xref>
400
+ </concept>
401
+ <concept ital='false' ref='false'>
402
+ <refterm>word</refterm>
403
+ <renderterm>term</renderterm>
404
+ <xref target='Clause2'>xref</xref>
405
+ </concept>
406
+ <concept ital='true' ref='true'>
407
+ <refterm>word</refterm>
408
+ <renderterm>term</renderterm>
409
+ <xref target='Clause2'>xref</xref>
410
+ </concept>
411
+ </p>
412
+ </foreword>
413
+ </preface>
414
+ <sections>
415
+ <terms id='_' obligation='normative'>
416
+ <title>Terms and definitions</title>
417
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
418
+ <term id='term-clause1'>
419
+ <preferred>Clause1</preferred>
420
+ </term>
421
+ </terms>
422
+ <definitions id='_' obligation='normative'>
423
+ <title>Symbols and abbreviated terms</title>
424
+ <dl id='_'>
425
+ <dt id="symbol-clause1">Clause1</dt>
426
+ <dd>
427
+ <p id='_'>A</p>
428
+ </dd>
429
+ <dt id='Clause2'>Clause 2</dt>
430
+ <dd>
431
+ <p id='_'>C</p>
432
+ </dd>
433
+ </dl>
434
+ </definitions>
435
+ </sections>
436
+ </standard-document>
437
+ OUTPUT
438
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
439
+ .to be_equivalent_to xmlpp(output)
440
+ end
441
+
289
442
  it "processes the concept macros with xrefs" do
290
443
  input = <<~INPUT
291
444
  #{ASCIIDOC_BLANK_HDR}
@@ -813,7 +966,7 @@ RSpec.describe Asciidoctor::Standoc do
813
966
  input = <<~INPUT
814
967
  #{ASCIIDOC_BLANK_HDR}
815
968
 
816
- [form,id=N0,name=N1,action="/action_page.php"]
969
+ [form,id=N0,name=N1,action="/action_page.php",class="checkboxes"]
817
970
  --
818
971
  label:fname[First name:] +
819
972
  input:text[id=fname,name=fname] +
@@ -851,7 +1004,7 @@ RSpec.describe Asciidoctor::Standoc do
851
1004
  output = <<~OUTPUT
852
1005
  #{BLANK_HDR}
853
1006
  <sections>
854
- <form id='_' name='N1' action='/action_page.php'>
1007
+ <form id='_' name='N1' action='/action_page.php' class="checkboxes">
855
1008
  <p id='_'>
856
1009
  <label for='fname'>First name:</label>
857
1010
  <br/>
@@ -1139,79 +1292,79 @@ RSpec.describe Asciidoctor::Standoc do
1139
1292
  end
1140
1293
  let(:output) do
1141
1294
  <<~XML
1142
- #{BLANK_HDR}
1143
- <sections>
1144
- <terms id='_' obligation='normative'>
1145
- <title>Terms and definitions</title>
1146
- <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1147
- <term id='term-name-identity'>
1148
- <preferred>name identity</preferred>
1149
- </term>
1150
- <term id='name-check'>
1151
- <preferred>name check</preferred>
1152
- <definition>
1153
- <p id='_'>paragraph</p>
1154
- <p id='_'>
1155
- <concept>
1156
- <refterm>name check</refterm>
1157
- <renderterm>name check</renderterm>
1158
- <xref target='name-check'/>
1159
- </concept>
1160
- is a term
1161
- </p>
1162
- <p id='_'>
1163
- <concept>
1164
- <refterm>name identity</refterm>
1165
- <renderterm>name identity</renderterm>
1166
- <xref target='term-name-identity'/>
1167
- </concept>
1168
- is a term
1169
- </p>
1170
- <p id='_'>
1171
- Moreover,
1172
- <concept>
1173
- <strong>
1174
- term
1175
- <tt>missing</tt>
1176
- not resolved via ID
1177
- <tt>missing</tt>
1178
- </strong>
1179
- </concept>
1180
- is a term
1181
- </p>
1182
- <p id='_'>
1183
- <concept>
1184
- <refterm>name check</refterm>
1185
- <renderterm>name check</renderterm>
1186
- <xref target='name-check'/>
1187
- </concept>
1188
- is a term
1189
- </p>
1190
- <p id='_'>
1191
- <concept>
1192
- <refterm>name identity</refterm>
1193
- <renderterm>name identity</renderterm>
1194
- <xref target='term-name-identity'/>
1195
- </concept>
1196
- is a term
1197
- </p>
1198
- <p id='_'>
1199
- Moreover,
1200
- <concept>
1201
- <strong>
1202
- term
1203
- <tt>missing</tt>
1204
- not resolved via ID
1205
- <tt>missing</tt>
1206
- </strong>
1207
- </concept>
1208
- is a term
1209
- </p>
1210
- </definition>
1211
- </term>
1212
- </terms>
1213
- </sections>
1214
- </standard-document>
1295
+ #{BLANK_HDR}
1296
+ <sections>
1297
+ <terms id='_' obligation='normative'>
1298
+ <title>Terms and definitions</title>
1299
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1300
+ <term id='term-name-identity'>
1301
+ <preferred>name identity</preferred>
1302
+ </term>
1303
+ <term id='name-check'>
1304
+ <preferred>name check</preferred>
1305
+ <definition>
1306
+ <p id='_'>paragraph</p>
1307
+ <p id='_'>
1308
+ <concept>
1309
+ <refterm>name check</refterm>
1310
+ <renderterm>name check</renderterm>
1311
+ <xref target='name-check'/>
1312
+ </concept>
1313
+ is a term
1314
+ </p>
1315
+ <p id='_'>
1316
+ <concept>
1317
+ <refterm>name identity</refterm>
1318
+ <renderterm>name identity</renderterm>
1319
+ <xref target='term-name-identity'/>
1320
+ </concept>
1321
+ is a term
1322
+ </p>
1323
+ <p id='_'>
1324
+ Moreover,
1325
+ <concept>
1326
+ <strong>
1327
+ term
1328
+ <tt>missing</tt>
1329
+ not resolved via ID
1330
+ <tt>missing</tt>
1331
+ </strong>
1332
+ </concept>
1333
+ is a term
1334
+ </p>
1335
+ <p id='_'>
1336
+ <concept>
1337
+ <refterm>name check</refterm>
1338
+ <renderterm>name check</renderterm>
1339
+ <xref target='name-check'/>
1340
+ </concept>
1341
+ is a term
1342
+ </p>
1343
+ <p id='_'>
1344
+ <concept>
1345
+ <refterm>name identity</refterm>
1346
+ <renderterm>name identity</renderterm>
1347
+ <xref target='term-name-identity'/>
1348
+ </concept>
1349
+ is a term
1350
+ </p>
1351
+ <p id='_'>
1352
+ Moreover,
1353
+ <concept>
1354
+ <strong>
1355
+ term
1356
+ <tt>missing</tt>
1357
+ not resolved via ID
1358
+ <tt>missing</tt>
1359
+ </strong>
1360
+ </concept>
1361
+ is a term
1362
+ </p>
1363
+ </definition>
1364
+ </term>
1365
+ </terms>
1366
+ </sections>
1367
+ </standard-document>
1215
1368
  XML
1216
1369
  end
1217
1370