asciidoctor-iso 0.9.9 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/README.adoc +49 -9
  4. data/asciidoctor-iso.gemspec +3 -3
  5. data/lib/asciidoctor-iso.rb +2 -0
  6. data/lib/asciidoctor/iso/base.rb +14 -0
  7. data/lib/asciidoctor/iso/blocks.rb +1 -1
  8. data/lib/asciidoctor/iso/cleanup.rb +2 -2
  9. data/lib/asciidoctor/iso/cleanup_ref.rb +1 -1
  10. data/lib/asciidoctor/iso/inline.rb +1 -1
  11. data/lib/asciidoctor/iso/macros.rb +54 -0
  12. data/lib/asciidoctor/iso/ref.rb +7 -2
  13. data/lib/asciidoctor/iso/validate.rb +8 -8
  14. data/lib/asciidoctor/iso/validate_requirements.rb +5 -5
  15. data/lib/asciidoctor/iso/version.rb +1 -1
  16. data/lib/isodoc/iso/html/header.html +206 -0
  17. data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
  18. data/lib/isodoc/iso/html/html_iso_titlepage.html +34 -0
  19. data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
  20. data/lib/isodoc/iso/html/isodoc.scss +696 -0
  21. data/lib/isodoc/iso/html/scripts.html +174 -0
  22. data/lib/isodoc/iso/html/style-human.scss +1277 -0
  23. data/lib/isodoc/iso/html/style-iso.scss +1257 -0
  24. data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
  25. data/lib/isodoc/iso/html/word_iso_titlepage.html +62 -0
  26. data/lib/isodoc/iso/html/wordstyle.scss +1175 -0
  27. data/lib/isodoc/iso/html_convert.rb +136 -0
  28. data/lib/isodoc/iso/metadata.rb +107 -0
  29. data/lib/isodoc/iso/word_convert.rb +139 -0
  30. data/spec/asciidoctor-iso/isobib_cache_spec.rb +18 -4
  31. data/spec/asciidoctor-iso/macros_spec.rb +92 -1
  32. data/spec/asciidoctor-iso/validate_spec.rb +173 -144
  33. data/spec/assets/header.html +7 -0
  34. data/spec/assets/html.css +2 -0
  35. data/spec/assets/htmlcover.html +4 -0
  36. data/spec/assets/htmlintro.html +5 -0
  37. data/spec/assets/i18n.yaml +2 -0
  38. data/spec/assets/iso.doc +2312 -0
  39. data/spec/assets/iso.headless.html +33 -0
  40. data/spec/assets/iso.html +1388 -0
  41. data/spec/assets/iso.xml +8 -0
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +3 -0
  44. data/spec/assets/std.css +2 -0
  45. data/spec/assets/word.css +2 -0
  46. data/spec/assets/wordcover.html +3 -0
  47. data/spec/assets/wordintro.html +4 -0
  48. data/spec/examples/103_01_02.html +247 -0
  49. data/spec/isodoc/i18n_spec.rb +642 -0
  50. data/spec/isodoc/iso_spec.rb +168 -0
  51. data/spec/isodoc/metadata_spec.rb +152 -0
  52. data/spec/isodoc/postproc_spec.rb +409 -0
  53. data/spec/isodoc/section_spec.rb +522 -0
  54. data/spec/isodoc/xref_spec.rb +1337 -0
  55. data/spec/spec_helper.rb +45 -0
  56. metadata +45 -9
@@ -0,0 +1,8 @@
1
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
2
+ <foreword>
3
+ <note>
4
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
5
+ </note>
6
+ </foreword>
7
+ </iso-standard>
8
+
@@ -0,0 +1,3 @@
1
+ <script>
2
+ This is > a script
3
+ </script>
@@ -0,0 +1,2 @@
1
+
2
+ /* a third empty stylesheet */
@@ -0,0 +1,2 @@
1
+
2
+ /* one empty stylesheet */
@@ -0,0 +1,3 @@
1
+
2
+ /* an empty word cover page */
3
+
@@ -0,0 +1,4 @@
1
+
2
+ /* an empty word intro page */
3
+
4
+ WORDTOC
@@ -0,0 +1,247 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <TITLE>IEC 60050 - International Electrotechnical Vocabulary - Details for IEV number 103-01-02: "functional"</TITLE>
5
+ <meta name="Description" content="Definition of functional by Electropedia. Meaning of functional. Translations of functional. Equivalent terms for functional." />
6
+ <meta name="Keywords" content="functional,fonctionnelle, f,دالى,Funktional, n,funcional,funzionale,汎関数,funkcjonał,funcional,funktional,범함수,функционал, м јд,泛函, dictionary, definition, meaning, translation, term, terminology, IEC 60050, Electropedia, IEV 103-01-02,IEV, International, Electrotechnical, Vocabulary, VEI, Vocabulaire, Electrotechnique, Internationale, IEC, electric, electronic" />
7
+ <meta name="Copyright" content="IEC - International Electrotechnical Commission" />
8
+ <meta name="Language" content="English, French, Arabic, Chinese, Czech, Finnish, German, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Serbian, Slovenian, Spanish, Swedish" />
9
+ <SCRIPT language="JavaScript">
10
+
11
+ function printWindow() { bV = parseInt(navigator.appVersion); if (bV >= 4) window.print(); }
12
+
13
+ function popup(name) { msgWindow=open(name,'popup','history=yes,toolbar=no,scrollbars=yes,resizable=yes,width=700,height=750'); }
14
+
15
+ </SCRIPT>
16
+
17
+ <STYLE TYPE="text/css">
18
+ a:link {color: blue ; text-decoration: none}
19
+ a:visited { color: blue ; text-decoration: none }
20
+ a:active { color: blue ; text-decoration: none }
21
+ a:hover { color: blue ; text-decoration: none; background-color: #C0C0C0}
22
+ table {font-family: arial}
23
+ td { font-size: 11pt; font-family: Arial, Helvetica, sans-serif }
24
+ h6 {page-break-before: always;}
25
+ </STYLE>
26
+
27
+ <STYLE TYPE="text/css" media="print">
28
+ .hide { display: none }
29
+ </STYLE>
30
+ <!-- Google Analytics -->
31
+ <script type="text/javascript">
32
+ var _gaq = _gaq || [];
33
+ _gaq.push(['_setAccount', 'UA-34400412-1']);
34
+ _gaq.push(['_trackPageview']);
35
+ (function() {
36
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
37
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
38
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
39
+ })();
40
+ </script>
41
+ <!-- End Google Analytics -->
42
+ <meta name="Description" content="functional,fonctionnelle, f,دالى,Funktional, n,funcional,funzionale,汎関数,funkcjonał,funcional,funktional,범함수,функционал, м јд,泛函" >
43
+ <STYLE TYPE="text/css">
44
+ @font-face { font-family: 'liberation_serifitalic';
45
+ src: url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_italic_macroman/LiberationSerif-Italic-webfont.eot');
46
+ src: url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_italic_macroman/LiberationSerif-Italic-webfont.eot?#iefix') format('embedded-opentype'),
47
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_italic_macroman/LiberationSerif-Italic-webfont.woff') format('woff'),
48
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_italic_macroman/LiberationSerif-Italic-webfont.ttf') format('truetype'),
49
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_italic_macroman/LiberationSerif-Italic-webfont.svg#liberation_serifitalic') format('svg');
50
+ }
51
+
52
+ @font-face { font-family: 'liberation_serifregular';
53
+ src: url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_regular_macroman/LiberationSerif-Regular-webfont.eot');
54
+ src: url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_regular_macroman/LiberationSerif-Regular-webfont.eot?#iefix') format('embedded-opentype'),
55
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_regular_macroman/LiberationSerif-Regular-webfont.woff') format('woff'),
56
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_regular_macroman/LiberationSerif-Regular-webfont.ttf') format('truetype'),
57
+ url('/font/Liberation-Serif-fontfacekit/web%20fonts/liberationserif_regular_macroman/LiberationSerif-Regular-webfont.svg#liberation_serifregular') format('svg');
58
+ font-weight: normal; font-style: normal;}
59
+ * {font-family: liberation_serifregular;}body {font-family: liberation_serifregular;}td {font-family: liberation_serifregular;}i {font-family: liberation_serifitalic;}#copy td { font-size:11px; }#copy a { font-size:11px; text-decoration: none;}#copy {border-top: 1px #c0c0c0 solid;}hr {height: 1px; color: #c0c0c0;}</STYLE><script type="text/javascript" src="/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
60
+ <script language="JavaScript" type="text/javascript">
61
+ <!--
62
+ document._domino_target = "_self";
63
+ function _doClick(v, o, t, h) {
64
+ var form = document._Display;
65
+ if (form.onsubmit) {
66
+ var retVal = form.onsubmit();
67
+ if (typeof retVal == "boolean" && retVal == false)
68
+ return false;
69
+ }
70
+ var target = document._domino_target;
71
+ if (o.href != null) {
72
+ if (o.target != null)
73
+ target = o.target;
74
+ } else {
75
+ if (t != null)
76
+ target = t;
77
+ }
78
+ form.target = target;
79
+ form.__Click.value = v;
80
+ if (h != null)
81
+ form.action += h;
82
+ form.submit();
83
+ return false;
84
+ }
85
+ // -->
86
+ </script>
87
+ </head>
88
+ <body text="#000000" bgcolor="#FFFFFF" leftmargin=10 topmargin=0>
89
+
90
+ <form method="post" action="/iev/iev.nsf/display?OpenForm&amp;Seq=1&amp;ievref=103-01-02" name="_Display">
91
+ <input type="hidden" name="__Click" value="0"><style>
92
+ .Top {
93
+ margin: auto;
94
+ height: 109px;
95
+ padding: 0px;
96
+ font-family: Arial, Helvetica;
97
+ }
98
+ .logolink {
99
+ position: relative;
100
+ width: 260px;
101
+ height: 60px;
102
+ top: 20px;
103
+ left: 8px;
104
+ float: left;
105
+ font-family: Arial, Helvetica, sans-serif;
106
+ }
107
+ .logolink h1 {
108
+ color: #000;
109
+ font-size: 17px;
110
+ font-weight: bold;
111
+ letter-spacing: 2px;
112
+ float:left;
113
+ top:-60px;
114
+ margin:0;
115
+ margin-left:80px;
116
+ position:relative;
117
+ font-family: Arial, Helvetica, sans-serif;
118
+ }
119
+ .top {
120
+ outline: none;
121
+ margin: 0px;
122
+ padding: 0px;
123
+ font-family: Arial, Helvetica, sans-serif;
124
+ font-size: 12px;
125
+ }
126
+ </style><div class="Top">
127
+ <div class="logolink"><a title="Back to homepage" href="http://www.iec.ch/">
128
+ <img title="www.iec.ch" alt=" www.iec.ch" src="/img/logo.jpg"></a>
129
+ <h1>International</h1>
130
+ <h1>Electrotechnical</h1>
131
+ <h1>Commission</h1>
132
+ </div>
133
+ </div>
134
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
135
+ <tr valign="top"><td width="1%" valign="middle"><img width="65" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
136
+ </td><td width="1%"><img width="19" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
137
+ </td><td width="46%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
138
+ </td><td width="1%"><img width="19" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
139
+ </td><td width="54%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
140
+ </td></tr>
141
+ </table>
142
+ <div align="right"><font size="2" face="Arial"> </font><a href="&amp;login"></a></div>
143
+ <table style="width: 100%; margin-bottom: 10px;" cellpadding=0 width="100%" border="0" cellspacing="0" cellpadding="0">
144
+ <tr valign="top"><td style="width: 144px;" width="15%"><img src="/iev/iev.nsf/30c867bbcbcee00dc1257e81003e697e/$Body/0.E5A?OpenElement&amp;FieldElemFormat=gif" width="144" height="20"></td><td class="hide" style="border-top: 1px #c0c0c0 solid; width: 100% !important; " width="85%"><div align="right"><font size="2" face="Arial">Queries, comments, suggestions? Please </font><a href="mailto:custserv@iec.ch"><font size="2" face="Arial">contact us</font></a><font size="2" face="Arial">.</font></div></td></tr>
145
+ </table>
146
+ <br>
147
+
148
+ <input type="button" value=" Home " class="hide" style="font-size: 11px;" onclick="window.open('/iev/iev.nsf/6d6bdd8667c378f7c12581fa003d80e7?OpenForm', document._domino_target);">
149
+ <input type="button" onclick="history.back()" value=" Back " class="hide" style="font-size: 11px;">
150
+ <input type="button" onclick="printWindow()" value=" Print " class="hide" style="font-size: 11px;"><font face=""><br>
151
+
152
+ <br>
153
+
154
+ <table cellpadding="1" cellspacing="0" border="0" border="0" cellspacing="0" cellpadding="0">
155
+ <tr valign="top"><td width="57"><b><font size="2" color="#800080" face="Arial">Area</font></b></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><b><font size="2" face="Arial"> </font></b><a href=index?openform&part=103>Mathematics - Functions</a> / General concepts</td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
156
+
157
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
158
+
159
+ <tr valign="top"><td width="57"><b><font size="2" color="#800080" face="Arial">IEV ref</font></b></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><b>103-01-02</b></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
160
+
161
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
162
+
163
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
164
+
165
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">en</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> <b>functional</b> </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
166
+
167
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> function for which the argument is a function and the value a number<p>Note 1 to entry: An example of a functional of the function <i>f</i>(<i>t</i>) is <math> <semantics> <mrow> <mstyle displaystyle='true'> <mrow> <msubsup> <mo>∫</mo> <mrow> <msub> <mi>t</mi> <mn>2</mn> </msub> </mrow> <mrow> <msub> <mi>t</mi> <mn>1</mn> </msub> </mrow> </msubsup> <mrow> <mi>f</mi><mo stretchy='false'>(</mo><mi>t</mi><mo stretchy='false'>)</mo><mo>d</mo><mi>t</mi></mrow> </mrow> </mstyle></mrow> <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbbjxAHX garuavP1wzZbItLDhis9wBH5garmWu51MyVXgarqqtubsr4rNCHbGe aGqipG0dh9qqWrVepG0dbbL8F4rqqrVepeea0xe9LqFf0xc9q8qqaq Fn0lXdHiVcFbIOFHK8Feea0dXdar=Jb9hs0dXdHuk9fr=xfr=xfrpe WZqaaeaaciWacmGadaGadeaabaGaaqaaaOqaamaapedabaGaamOzai aacIcacaWG0bGaaiykaKqzaeGaaiizaOGaamiDaaWcbaGaamiDamaa BaaameaacaaIYaaabeaaaSqaaiaadshadaWgaaadbaGaaGymaaqaba aaniabgUIiYdaaaa@40DD@ </annotation> </semantics> </math>. </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
168
+
169
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
170
+
171
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
172
+
173
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">fr</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> <b>fonctionnelle</b>, f </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
174
+
175
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> fonction dont l'argument est une fonction et la valeur un nombre <p>Note 1 à l'article: Un exemple de fonctionnelle de la fonction <i>f</i>(<i>t</i>) est <math> <semantics> <mrow> <mstyle displaystyle='true'> <mrow> <msubsup> <mo>∫</mo> <mrow> <msub> <mi>t</mi> <mn>2</mn> </msub> </mrow> <mrow> <msub> <mi>t</mi> <mn>1</mn> </msub> </mrow> </msubsup> <mrow> <mi>f</mi><mo stretchy='false'>(</mo><mi>t</mi><mo stretchy='false'>)</mo><mo>d</mo><mi>t</mi></mrow> </mrow> </mstyle></mrow> <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbbjxAHX garuavP1wzZbItLDhis9wBH5garmWu51MyVXgarqqtubsr4rNCHbGe aGqipG0dh9qqWrVepG0dbbL8F4rqqrVepeea0xe9LqFf0xc9q8qqaq Fn0lXdHiVcFbIOFHK8Feea0dXdar=Jb9hs0dXdHuk9fr=xfr=xfrpe WZqaaeaaciWacmGadaGadeaabaGaaqaaaOqaamaapedabaGaamOzai aacIcacaWG0bGaaiykaKqzaeGaaiizaOGaamiDaaWcbaGaamiDamaa BaaameaacaaIYaaabeaaaSqaaiaadshadaWgaaadbaGaaGymaaqaba aaniabgUIiYdaaaa@40DD@ </annotation> </semantics> </math>. </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
176
+
177
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
178
+
179
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
180
+
181
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">ar</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td style="direction:rtl; text-align:left" width="567"> دالى </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
182
+
183
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
184
+
185
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">de</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> Funktional, n </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
186
+
187
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
188
+
189
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
190
+
191
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
192
+
193
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">es</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> funcional </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
194
+
195
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
196
+
197
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
198
+
199
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">it</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> funzionale </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
200
+
201
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
202
+
203
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080" face="Arial">ko</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> 범함수 </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
204
+
205
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
206
+
207
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">ja</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td lang="ja-jp" width="567"> 汎関数 </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
208
+
209
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
210
+
211
+ <tr></tr>
212
+
213
+ <tr></tr>
214
+
215
+ <tr></tr>
216
+
217
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
218
+
219
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080" face="Arial">pl</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> funkcjonał </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
220
+
221
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
222
+
223
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080" face="Arial">pt</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> funcional </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
224
+
225
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
226
+
227
+ <tr valign="top"><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
228
+
229
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
230
+
231
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">sr</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> функционал, м јд </td><td width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
232
+
233
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
234
+
235
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080">sv</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> funktional </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
236
+
237
+ <tr valign="top"><td width="699" colspan="4"><hr></td></tr>
238
+
239
+ <tr valign="top"><td width="57"><div align="center"><font color="#800080" face="Arial">zh</font></div></td><td width="19"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td><td width="567"> 泛函 </td><td class="hide" width="57"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""></td></tr>
240
+ </table>
241
+ </font><hr>
242
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
243
+ <tr valign="top"><td width="25%"><a href="/iev/iev.nsf/display?openform&amp;ievref=103-01-02&amp;login"></a><font color="#800080">Publication date:</font> 2009-12 </td><td width="75%"><div align="right"><a href="http://www.iec.ch/about/copyright/copyright-db_entry.htm" target="_blank"><font color="#003399">Copyright</font></a> © <a href="http://www.iec.ch/about/co/office-e.htm" target="_blank"><font color="#003399">IEC</font></a> 2018. All Rights Reserved.</div></td></tr>
244
+ </table>
245
+ </form>
246
+ </body>
247
+ </html>
@@ -0,0 +1,642 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe IsoDoc do
4
+ it "processes English" do
5
+ expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
6
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
7
+ <bibdata>
8
+ <language>en</language>
9
+ </bibdata>
10
+ <preface>
11
+ <foreword obligation="informative">
12
+ <title>Foreword</title>
13
+ <p id="A">This is a preamble</p>
14
+ </foreword>
15
+ <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
16
+ <title>Introduction Subsection</title>
17
+ </clause>
18
+ <patent-notice>
19
+ <p>This is patent boilerplate</p>
20
+ </patent-notice>
21
+ </introduction></preface><sections>
22
+ <clause id="D" obligation="normative">
23
+ <title>Scope</title>
24
+ <p id="E">Text</p>
25
+ </clause>
26
+
27
+ <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
28
+ <title>Normal Terms</title>
29
+ <term id="J">
30
+ <preferred>Term2</preferred>
31
+ </term>
32
+ </terms>
33
+ <definitions id="K">
34
+ <dl>
35
+ <dt>Symbol</dt>
36
+ <dd>Definition</dd>
37
+ </dl>
38
+ </definitions>
39
+ </clause>
40
+ <definitions id="L">
41
+ <dl>
42
+ <dt>Symbol</dt>
43
+ <dd>Definition</dd>
44
+ </dl>
45
+ </definitions>
46
+ <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
47
+ <title>Introduction</title>
48
+ </clause>
49
+ <clause id="O" inline-header="false" obligation="normative">
50
+ <title>Clause 4.2</title>
51
+ </clause></clause>
52
+
53
+ </sections><annex id="P" inline-header="false" obligation="normative">
54
+ <title>Annex</title>
55
+ <clause id="Q" inline-header="false" obligation="normative">
56
+ <title>Annex A.1</title>
57
+ <clause id="Q1" inline-header="false" obligation="normative">
58
+ <title>Annex A.1a</title>
59
+ </clause>
60
+ </clause>
61
+ <appendix id="Q2" inline-header="false" obligation="normative">
62
+ <title>An Appendix</title>
63
+ </appendix>
64
+ </annex><bibliography><references id="R" obligation="informative">
65
+ <title>Normative References</title>
66
+ </references><clause id="S" obligation="informative">
67
+ <title>Bibliography</title>
68
+ <references id="T" obligation="informative">
69
+ <title>Bibliography Subsection</title>
70
+ </references>
71
+ </clause>
72
+ </bibliography>
73
+ </iso-standard>
74
+ INPUT
75
+ #{HTML_HDR}
76
+ <br/>
77
+ <div>
78
+ <h1 class="ForewordTitle">Foreword</h1>
79
+ <p id="A">This is a preamble</p>
80
+ </div>
81
+ <br/>
82
+ <div class="Section3" id="B">
83
+ <h1 class="IntroTitle">0.&#160; Introduction</h1>
84
+ <div id="C">
85
+ <h2>0.1. Introduction Subsection</h2>
86
+ </div>
87
+ <p>This is patent boilerplate</p>
88
+ </div>
89
+ <p class="zzSTDTitle1"/>
90
+ <div id="D">
91
+ <h1>1.&#160; Scope</h1>
92
+ <p id="E">Text</p>
93
+ </div>
94
+ <div>
95
+ <h1>2.&#160; Normative references</h1>
96
+ <p>There are no normative references in this document.</p>
97
+ </div>
98
+ <div id="H"><h1>3.&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
99
+ the following terms and definitions apply.</p>
100
+ <p>ISO and IEC maintain terminological databases for use in
101
+ standardization at the following addresses:</p>
102
+
103
+ <ul>
104
+ <li> <p>ISO Online browsing platform: available at
105
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
106
+ <li> <p>IEC Electropedia: available at
107
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
108
+ </p> </li> </ul>
109
+ <div id="I">
110
+ <h2>3.1. Normal Terms</h2>
111
+ <p class="TermNum" id="J">3.1.1</p>
112
+ <p class="Terms" style="text-align:left;">Term2</p>
113
+
114
+ </div><div id="K"><h2>3.2. Symbols and abbreviated terms</h2>
115
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
116
+ </div></div>
117
+ <div id="L" class="Symbols">
118
+ <h1>4.&#160; Symbols and abbreviated terms</h1>
119
+ <dl>
120
+ <dt>
121
+ <p>Symbol</p>
122
+ </dt>
123
+ <dd>Definition</dd>
124
+ </dl>
125
+ </div>
126
+ <div id="M">
127
+ <h1>5.&#160; Clause 4</h1>
128
+ <div id="N">
129
+ <h2>5.1. Introduction</h2>
130
+ </div>
131
+ <div id="O">
132
+ <h2>5.2. Clause 4.2</h2>
133
+ </div>
134
+ </div>
135
+ <br/>
136
+ <div id="P" class="Section3">
137
+ <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
138
+ <div id="Q">
139
+ <h2>A.1. Annex A.1</h2>
140
+ <div id="Q1">
141
+ <h3>A.1.1. Annex A.1a</h3>
142
+ </div>
143
+ </div>
144
+ <div id="Q2">
145
+ <h2>Appendix 1. An Appendix</h2>
146
+ </div>
147
+ </div>
148
+ <br/>
149
+ <div>
150
+ <h1 class="Section3">Bibliography</h1>
151
+ <div>
152
+ <h2 class="Section3">Bibliography Subsection</h2>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </body>
157
+ </html>
158
+ OUTPUT
159
+ end
160
+
161
+ it "defaults to English" do
162
+ expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
163
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
164
+ <bibdata>
165
+ <language>tlh</language>
166
+ </bibdata>
167
+ <preface>
168
+ <foreword obligation="informative">
169
+ <title>Foreword</title>
170
+ <p id="A">This is a preamble</p>
171
+ </foreword>
172
+ <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
173
+ <title>Introduction Subsection</title>
174
+ </clause>
175
+ <patent-notice>
176
+ <p>This is patent boilerplate</p>
177
+ </patent-notice>
178
+ </introduction></preface><sections>
179
+ <clause id="D" obligation="normative">
180
+ <title>Scope</title>
181
+ <p id="E">Text</p>
182
+ </clause>
183
+
184
+ <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
185
+ <title>Normal Terms</title>
186
+ <term id="J">
187
+ <preferred>Term2</preferred>
188
+ </term>
189
+ </terms>
190
+ <definitions id="K">
191
+ <dl>
192
+ <dt>Symbol</dt>
193
+ <dd>Definition</dd>
194
+ </dl>
195
+ </definitions>
196
+ </clause>
197
+ <definitions id="L">
198
+ <dl>
199
+ <dt>Symbol</dt>
200
+ <dd>Definition</dd>
201
+ </dl>
202
+ </definitions>
203
+ <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
204
+ <title>Introduction</title>
205
+ </clause>
206
+ <clause id="O" inline-header="false" obligation="normative">
207
+ <title>Clause 4.2</title>
208
+ </clause></clause>
209
+
210
+ </sections><annex id="P" inline-header="false" obligation="normative">
211
+ <title>Annex</title>
212
+ <clause id="Q" inline-header="false" obligation="normative">
213
+ <title>Annex A.1</title>
214
+ <clause id="Q1" inline-header="false" obligation="normative">
215
+ <title>Annex A.1a</title>
216
+ </clause>
217
+ </clause>
218
+ <appendix id="Q2" inline-header="false" obligation="normative">
219
+ <title>An Appendix</title>
220
+ </appendix>
221
+ </annex><bibliography><references id="R" obligation="informative">
222
+ <title>Normative References</title>
223
+ </references><clause id="S" obligation="informative">
224
+ <title>Bibliography</title>
225
+ <references id="T" obligation="informative">
226
+ <title>Bibliography Subsection</title>
227
+ </references>
228
+ </clause>
229
+ </bibliography>
230
+ </iso-standard>
231
+ INPUT
232
+ #{HTML_HDR}
233
+ <br/>
234
+ <div>
235
+ <h1 class="ForewordTitle">Foreword</h1>
236
+ <p id="A">This is a preamble</p>
237
+ </div>
238
+ <br/>
239
+ <div class="Section3" id="B">
240
+ <h1 class="IntroTitle">0.&#160; Introduction</h1>
241
+ <div id="C">
242
+ <h2>0.1. Introduction Subsection</h2>
243
+ </div>
244
+ <p>This is patent boilerplate</p>
245
+ </div>
246
+ <p class="zzSTDTitle1"/>
247
+ <div id="D">
248
+ <h1>1.&#160; Scope</h1>
249
+ <p id="E">Text</p>
250
+ </div>
251
+ <div>
252
+ <h1>2.&#160; Normative references</h1>
253
+ <p>There are no normative references in this document.</p>
254
+ </div>
255
+ <div id="H"><h1>3.&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
256
+ the following terms and definitions apply.</p>
257
+ <p>ISO and IEC maintain terminological databases for use in
258
+ standardization at the following addresses:</p>
259
+
260
+ <ul>
261
+ <li> <p>ISO Online browsing platform: available at
262
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
263
+ <li> <p>IEC Electropedia: available at
264
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
265
+ </p> </li> </ul>
266
+ <div id="I">
267
+ <h2>3.1. Normal Terms</h2>
268
+ <p class="TermNum" id="J">3.1.1</p>
269
+ <p class="Terms" style="text-align:left;">Term2</p>
270
+
271
+ </div><div id="K"><h2>3.2. Symbols and abbreviated terms</h2>
272
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
273
+ </div></div>
274
+ <div id="L" class="Symbols">
275
+ <h1>4.&#160; Symbols and abbreviated terms</h1>
276
+ <dl>
277
+ <dt>
278
+ <p>Symbol</p>
279
+ </dt>
280
+ <dd>Definition</dd>
281
+ </dl>
282
+ </div>
283
+ <div id="M">
284
+ <h1>5.&#160; Clause 4</h1>
285
+ <div id="N">
286
+ <h2>5.1. Introduction</h2>
287
+ </div>
288
+ <div id="O">
289
+ <h2>5.2. Clause 4.2</h2>
290
+ </div>
291
+ </div>
292
+ <br/>
293
+ <div id="P" class="Section3">
294
+ <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
295
+ <div id="Q">
296
+ <h2>A.1. Annex A.1</h2>
297
+ <div id="Q1">
298
+ <h3>A.1.1. Annex A.1a</h3>
299
+ </div>
300
+ </div>
301
+ <div id="Q2">
302
+ <h2>Appendix 1. An Appendix</h2>
303
+ </div>
304
+ </div>
305
+ <br/>
306
+ <div>
307
+ <h1 class="Section3">Bibliography</h1>
308
+ <div>
309
+ <h2 class="Section3">Bibliography Subsection</h2>
310
+ </div>
311
+ </div>
312
+ </div>
313
+ </body>
314
+ </html>
315
+ OUTPUT
316
+ end
317
+
318
+ it "processes French" do
319
+ expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
320
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
321
+ <bibdata>
322
+ <language>fr</language>
323
+ </bibdata>
324
+ <preface>
325
+ <foreword obligation="informative">
326
+ <title>Foreword</title>
327
+ <p id="A">This is a preamble</p>
328
+ </foreword>
329
+ <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
330
+ <title>Introduction Subsection</title>
331
+ </clause>
332
+ <patent-notice>
333
+ <p>This is patent boilerplate</p>
334
+ </patent-notice>
335
+ </introduction></preface><sections>
336
+ <clause id="D" obligation="normative">
337
+ <title>Scope</title>
338
+ <p id="E">Text</p>
339
+ </clause>
340
+
341
+ <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
342
+ <title>Normal Terms</title>
343
+ <term id="J">
344
+ <preferred>Term2</preferred>
345
+ </term>
346
+ </terms>
347
+ <definitions id="K">
348
+ <dl>
349
+ <dt>Symbol</dt>
350
+ <dd>Definition</dd>
351
+ </dl>
352
+ </definitions>
353
+ </clause>
354
+ <definitions id="L">
355
+ <dl>
356
+ <dt>Symbol</dt>
357
+ <dd>Definition</dd>
358
+ </dl>
359
+ </definitions>
360
+ <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
361
+ <title>Introduction</title>
362
+ </clause>
363
+ <clause id="O" inline-header="false" obligation="normative">
364
+ <title>Clause 4.2</title>
365
+ </clause></clause>
366
+
367
+ </sections><annex id="P" inline-header="false" obligation="normative">
368
+ <title>Annex</title>
369
+ <clause id="Q" inline-header="false" obligation="normative">
370
+ <title>Annex A.1</title>
371
+ <clause id="Q1" inline-header="false" obligation="normative">
372
+ <title>Annex A.1a</title>
373
+ </clause>
374
+ </clause>
375
+ <appendix id="Q2" inline-header="false" obligation="normative">
376
+ <title>An Appendix</title>
377
+ </appendix>
378
+ </annex><bibliography><references id="R" obligation="informative">
379
+ <title>Normative References</title>
380
+ </references><clause id="S" obligation="informative">
381
+ <title>Bibliography</title>
382
+ <references id="T" obligation="informative">
383
+ <title>Bibliography Subsection</title>
384
+ </references>
385
+ </clause>
386
+ </bibliography>
387
+ </iso-standard>
388
+ INPUT
389
+ #{HTML_HDR}
390
+ <br/>
391
+ <div>
392
+ <h1 class="ForewordTitle">Avant-propos</h1>
393
+ <p id="A">This is a preamble</p>
394
+ </div>
395
+ <br/>
396
+ <div class="Section3" id="B">
397
+ <h1 class="IntroTitle">0.&#160; Introduction</h1>
398
+ <div id="C">
399
+ <h2>0.1. Introduction Subsection</h2>
400
+ </div>
401
+ <p>This is patent boilerplate</p>
402
+ </div>
403
+ <p class="zzSTDTitle1"/>
404
+ <div id="D">
405
+ <h1>1.&#160; Domaine d'application</h1>
406
+ <p id="E">Text</p>
407
+ </div>
408
+ <div>
409
+ <h1>2.&#160; R&#233;f&#233;rences normatives</h1>
410
+ <p>Le pr&#233;sent document ne contient aucune r&#233;f&#233;rence normative.</p>
411
+ </div>
412
+ <div id="H"><h1>3.&#160; Terms, d&#233;finitions, symboles et termes abr&#233;g&#233;s</h1><p>Pour les besoins du pr&#233;sent document, les termes et d&#233;finitions suivants s'appliquent.</p>
413
+ <p>L'ISO et l'IEC tiennent &#224; jour des bases de donn&#233;es terminologiques
414
+ destin&#233;es &#224; &#234;tre utilis&#233;es en normalisation, consultables aux adresses
415
+ suivantes:</p>
416
+ <ul>
417
+ <li> <p>ISO Online browsing platform: disponible &#224; l'adresse
418
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
419
+ <li> <p>IEC Electropedia: disponible &#224; l'adresse
420
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
421
+ </p> </li> </ul>
422
+ <div id="I">
423
+ <h2>3.1. Normal Terms</h2>
424
+ <p class="TermNum" id="J">3.1.1</p>
425
+ <p class="Terms" style="text-align:left;">Term2</p>
426
+
427
+ </div><div id="K"><h2>3.2. Symboles et termes abr&#233;g&#233;s</h2>
428
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
429
+ </div></div>
430
+ <div id="L" class="Symbols">
431
+ <h1>4.&#160; Symboles et termes abr&#233;g&#233;s</h1>
432
+ <dl>
433
+ <dt>
434
+ <p>Symbol</p>
435
+ </dt>
436
+ <dd>Definition</dd>
437
+ </dl>
438
+ </div>
439
+ <div id="M">
440
+ <h1>5.&#160; Clause 4</h1>
441
+ <div id="N">
442
+ <h2>5.1. Introduction</h2>
443
+ </div>
444
+ <div id="O">
445
+ <h2>5.2. Clause 4.2</h2>
446
+ </div>
447
+ </div>
448
+ <br/>
449
+ <div id="P" class="Section3">
450
+ <h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
451
+ <div id="Q">
452
+ <h2>A.1. Annex A.1</h2>
453
+ <div id="Q1">
454
+ <h3>A.1.1. Annex A.1a</h3>
455
+ </div>
456
+ </div>
457
+ <div id="Q2">
458
+ <h2>Appendice 1. An Appendix</h2>
459
+ </div>
460
+ </div>
461
+ <br/>
462
+ <div>
463
+ <h1 class="Section3">Bibliographie</h1>
464
+ <div>
465
+ <h2 class="Section3">Bibliography Subsection</h2>
466
+ </div>
467
+ </div>
468
+ </div>
469
+ </body>
470
+ </html>
471
+ OUTPUT
472
+ end
473
+
474
+ it "processes Simplified Chinese" do
475
+ expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
476
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
477
+ <bibdata>
478
+ <language>zh</language>
479
+ <script>Hans</script>
480
+ </bibdata>
481
+ <preface>
482
+ <foreword obligation="informative">
483
+ <title>Foreword</title>
484
+ <p id="A">This is a preamble</p>
485
+ </foreword>
486
+ <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
487
+ <title>Introduction Subsection</title>
488
+ </clause>
489
+ <patent-notice>
490
+ <p>This is patent boilerplate</p>
491
+ </patent-notice>
492
+ </introduction></preface><sections>
493
+ <clause id="D" obligation="normative">
494
+ <title>Scope</title>
495
+ <p id="E"><eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref></p>
496
+ </clause>
497
+
498
+ <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
499
+ <title>Normal Terms</title>
500
+ <term id="J">
501
+ <preferred>Term2</preferred>
502
+ </term>
503
+ </terms>
504
+ <definitions id="K">
505
+ <dl>
506
+ <dt>Symbol</dt>
507
+ <dd>Definition</dd>
508
+ </dl>
509
+ </definitions>
510
+ </clause>
511
+ <definitions id="L">
512
+ <dl>
513
+ <dt>Symbol</dt>
514
+ <dd>Definition</dd>
515
+ </dl>
516
+ </definitions>
517
+ <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
518
+ <title>Introduction</title>
519
+ </clause>
520
+ <clause id="O" inline-header="false" obligation="normative">
521
+ <title>Clause 4.2</title>
522
+ </clause></clause>
523
+
524
+ </sections><annex id="P" inline-header="false" obligation="normative">
525
+ <title>Annex</title>
526
+ <clause id="Q" inline-header="false" obligation="normative">
527
+ <title>Annex A.1</title>
528
+ <clause id="Q1" inline-header="false" obligation="normative">
529
+ <title>Annex A.1a</title>
530
+ </clause>
531
+ </clause>
532
+ <appendix id="Q2" inline-header="false" obligation="normative">
533
+ <title>An Appendix</title>
534
+ </appendix>
535
+ </annex><bibliography><references id="R" obligation="informative">
536
+ <title>Normative References</title>
537
+ <bibitem id="ISO712" type="standard">
538
+ <title format="text/plain">Cereals and cereal products</title>
539
+ <docidentifier>ISO 712</docidentifier>
540
+ <contributor>
541
+ <role type="publisher"/>
542
+ <organization>
543
+ <abbreviation>ISO</abbreviation>
544
+ </organization>
545
+ </contributor>
546
+ </bibitem>
547
+ </references><clause id="S" obligation="informative">
548
+ <title>Bibliography</title>
549
+ <references id="T" obligation="informative">
550
+ <title>Bibliography Subsection</title>
551
+ </references>
552
+ </clause>
553
+ </bibliography>
554
+ </iso-standard>
555
+ INPUT
556
+ #{HTML_HDR}
557
+ <br/>
558
+ <div>
559
+ <h1 class="ForewordTitle">&#21069;&#35328;</h1>
560
+ <p id="A">This is a preamble</p>
561
+ </div>
562
+ <br/>
563
+ <div class="Section3" id="B">
564
+ <h1 class="IntroTitle">0.&#160; &#24341;&#35328;</h1>
565
+ <div id="C">
566
+ <h2>0.1. Introduction Subsection</h2>
567
+ </div>
568
+ <p>This is patent boilerplate</p>
569
+ </div>
570
+ <p class="zzSTDTitle1"/>
571
+ <div id="D">
572
+ <h1>1.&#160; &#33539;&#22260;</h1>
573
+ <p id="E">
574
+ <a href="#ISO712">ISO 712&#12289;&#31532;1&#8211;<referenceto>1</referenceto>&#34920;</a>
575
+ </p>
576
+ </div>
577
+ <div>
578
+ <h1>2.&#160; &#35268;&#33539;&#24615;&#24341;&#29992;&#25991;&#20214;</h1>
579
+ <p>&#19979;&#21015;&#25991;&#20214;&#23545;&#20110;&#26412;&#25991;&#20214;&#30340;&#24212;&#29992;&#26159;&#24517;&#19981;&#21487;&#23569;&#30340;&#12290; &#20961;&#26159;&#27880;&#26085;&#26399;&#30340;&#24341;&#29992;&#25991;&#20214;&#65292;&#20165;&#27880;&#26085;&#26399;&#30340;&#29256;&#26412;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290; &#20961;&#26159;&#19981;&#27880;&#26085;&#26399;&#30340;&#24341;&#29992;&#25991;&#20214;&#65292;&#20854;&#26368;&#26032;&#29256;&#26412;&#65288;&#21253;&#25324;&#25152;&#26377;&#30340;&#20462;&#25913;&#21333;&#65289;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290;</p>
580
+ <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
581
+ </div>
582
+ <div id="H"><h1>3.&#160; &#26415;&#35821;&#12289;&#23450;&#20041;&#12289;&#31526;&#21495;&#12289;&#20195;&#21495;&#21644;&#32553;&#30053;&#35821;</h1><p>&#19979;&#21015;&#26415;&#35821;&#21644;&#23450;&#20041;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290;</p>
583
+ <p>ISO&#21644;IEC&#29992;&#20110;&#26631;&#20934;&#21270;&#30340;&#26415;&#35821;&#25968;&#25454;&#24211;&#22320;&#22336;&#22914;&#19979;&#65306;</p>
584
+ <ul>
585
+ <li> <p>ISO&#22312;&#32447;&#27983;&#35272;&#24179;&#21488;:
586
+ &#20301;&#20110;<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
587
+ <li> <p>IEC Electropedia:
588
+ &#20301;&#20110;<a href="http://www.electropedia.org">http://www.electropedia.org</a>
589
+ </p> </li> </ul>
590
+ <div id="I">
591
+ <h2>3.1. Normal Terms</h2>
592
+ <p class="TermNum" id="J">3.1.1</p>
593
+ <p class="Terms" style="text-align:left;">Term2</p>
594
+
595
+ </div><div id="K"><h2>3.2. &#31526;&#21495;&#12289;&#20195;&#21495;&#21644;&#32553;&#30053;&#35821;</h2>
596
+ <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
597
+ </div></div>
598
+ <div id="L" class="Symbols">
599
+ <h1>4.&#160; &#31526;&#21495;&#12289;&#20195;&#21495;&#21644;&#32553;&#30053;&#35821;</h1>
600
+ <dl>
601
+ <dt>
602
+ <p>Symbol</p>
603
+ </dt>
604
+ <dd>Definition</dd>
605
+ </dl>
606
+ </div>
607
+ <div id="M">
608
+ <h1>5.&#160; Clause 4</h1>
609
+ <div id="N">
610
+ <h2>5.1. Introduction</h2>
611
+ </div>
612
+ <div id="O">
613
+ <h2>5.2. Clause 4.2</h2>
614
+ </div>
615
+ </div>
616
+ <br/>
617
+ <div id="P" class="Section3">
618
+ <h1 class="Annex">&#38468;&#20214;A<br/>&#65288;&#35268;&#33539;&#24615;&#38468;&#24405;&#65289;<br/><br/><b>Annex</b></h1>
619
+ <div id="Q">
620
+ <h2>A.1. Annex A.1</h2>
621
+ <div id="Q1">
622
+ <h3>A.1.1. Annex A.1a</h3>
623
+ </div>
624
+ </div>
625
+ <div id="Q2">
626
+ <h2>&#38468;&#24405;1. An Appendix</h2>
627
+ </div>
628
+ </div>
629
+ <br/>
630
+ <div>
631
+ <h1 class="Section3">&#21442;&#32771;&#25991;&#29486;</h1>
632
+ <div>
633
+ <h2 class="Section3">Bibliography Subsection</h2>
634
+ </div>
635
+ </div>
636
+ </div>
637
+ </body>
638
+ </html>
639
+ OUTPUT
640
+ end
641
+
642
+ end