isodoc 1.8.3.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -812,526 +812,526 @@ RSpec.describe IsoDoc do
812
812
  </iso-standard>
813
813
  INPUT
814
814
  html = <<~OUTPUT
815
- <html lang='en'>
816
- <head/>
817
- <body lang='en'>
818
- <div class='title-section'>
819
- <p>&#160;</p>
820
- </div>
821
- <br/>
822
- <div class='prefatory-section'>
823
- <p>&#160;</p>
824
- </div>
825
- <br/>
826
- <div class='main-section'>
827
- <br/>
828
- <div>
829
- <h1 class='AbstractTitle'>
830
- Abstract
831
- <br/>
832
- <br/>
833
- Variant 1
834
- </h1>
835
- </div>
836
- <br/>
837
- <div>
838
- <h1 class='ForewordTitle'>
839
- Foreword
840
- <br/>
841
- <br/>
842
- Variant 1
843
- </h1>
844
- <p id='A'>This is a preamble</p>
845
- </div>
846
- <br/>
847
- <div class='Section3' id='B'>
848
- <h1 class='IntroTitle'>Introduction</h1>
849
- <div id='C'>
850
- <h2>
851
- Introduction Subsection
852
- <br/>
853
- <br/>
854
- Variant 1
855
- </h2>
856
- </div>
857
- </div>
858
- <br/>
859
- <div class='Section3' id='B1'>
860
- <h1 class='IntroTitle'>
861
- Dedication
862
- <br/>
863
- <br/>
864
- Variant 1
865
- </h1>
866
- </div>
867
- <br/>
868
- <div class='Section3' id='B2'>
869
- <h1 class='IntroTitle'>
870
- Note to reader
871
- <br/>
872
- <br/>
873
- Variant 1
874
- </h1>
875
- </div>
876
- <br/>
877
- <div class='Section3' id=''>
878
- <h1 class='IntroTitle'>
879
- Acknowledgements
880
- <br/>
881
- <br/>
882
- Variant 1
883
- </h1>
884
- </div>
885
- <p class='zzSTDTitle1'/>
886
- <div id='NN1' class='Note'>
887
- <p>
888
- <span class='note_label'>NOTE</span>
889
- &#160; Initial note
890
- </p>
891
- </div>
892
- <div id='NN2' class='Admonition'>
893
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
894
- <p>Initial admonition</p>
895
- </div>
896
- <div id='D'>
897
- <h1>
898
- 1.&#160; Scope
899
- <br/>
900
- <br/>
901
- Variant 1
902
- </h1>
903
- <p id='E'>Text</p>
904
- </div>
905
- <div>
906
- <h1>
907
- 2.&#160; Normative References
908
- <br/>
909
- <br/>
910
- Variant 1
911
- </h1>
912
- </div>
913
- <div id='H'>
914
- <h1>
915
- 3.&#160; Terms, Definitions, Symbols and Abbreviated Terms
916
- <br/>
917
- <br/>
918
- Variant 1
919
- </h1>
920
- <div id='I'>
921
- <h2>
922
- 3.1.&#160; Normal Terms
923
- <br/>
924
- <br/>
925
- Variant 1
926
- </h2>
927
- <p class='TermNum' id='J'>3.1.1.</p>
928
- <p class='Terms' style='text-align:left;'><b>Term2</b></p>
929
- </div>
930
- <div id='K'>
931
- <h2>
932
- 3.2.&#160; Definitions
933
- <br/>
934
- <br/>
935
- Variant 1
936
- </h2>
937
- <dl>
938
- <dt>
939
- <p>Symbol</p>
940
- </dt>
941
- <dd>Definition</dd>
942
- </dl>
943
- </div>
944
- </div>
945
- <div id='L' class='Symbols'>
946
- <h1>
947
- 4.&#160; Symbols and abbreviated terms
948
- <br/>
949
- <br/>
950
- Variant 1
951
- </h1>
952
- <dl>
953
- <dt>
954
- <p>Symbol</p>
955
- </dt>
956
- <dd>Definition</dd>
957
- </dl>
958
- </div>
959
- <div id='M'>
960
- <h1>
961
- 5.&#160; Clause 4
962
- <br/>
963
- <br/>
964
- Variant 1
965
- </h1>
966
- <div id='N'>
967
- <h2>
968
- 5.1.&#160; Introduction
969
- <br/>
970
- <br/>
971
- Variant 1
972
- </h2>
973
- </div>
974
- <div id='O'>
975
- <h2>
976
- 5.2.&#160; Clause 4.2
977
- <br/>
978
- <br/>
979
- Variant 1
980
- </h2>
981
- </div>
982
- <div id='O1'>
983
- <h2>5.3.</h2>
984
- </div>
985
- </div>
986
- <br/>
987
- <div id='P' class='Section3'>
988
- <h1 class='Annex'>
989
- <b>Annex A</b>
990
- <br/>
991
- (normative)
992
- <br/>
993
- <br/>
994
- <b>Annex</b>
995
- <br/>
996
- <br/>
997
- Variant 1
998
- </h1>
999
- <div id='Q'>
1000
- <h2>
1001
- A.1.&#160; Annex A.1
1002
- <br/>
1003
- <br/>
1004
- Variant 1
1005
- </h2>
1006
- <div id='Q1'>
1007
- <h3>
1008
- A.1.1.&#160; Annex A.1a
1009
- <br/>
1010
- <br/>
1011
- Variant 1
1012
- </h3>
1013
- </div>
1014
- <div>
1015
- <h3 class='Section3'>
1016
- A.1.2.&#160; Annex Bibliography
1017
- <br/>
1018
- <br/>
1019
- Variant 1
1020
- </h3>
1021
- </div>
1022
- </div>
1023
- </div>
1024
- <br/>
1025
- <div id='P1' class='Section3'>
1026
- <h1 class='Annex'>
1027
- <b>Annex B</b>
1028
- <br/>
1029
- (normative)
1030
- </h1>
1031
- </div>
1032
- <br/>
1033
- <div>
1034
- <h1 class='Section3'>Bibliography</h1>
1035
- <div>
1036
- <h2 class='Section3'>
1037
- Bibliography Subsection
1038
- <br/>
1039
- <br/>
1040
- Variant 1
1041
- </h2>
1042
- </div>
1043
- </div>
1044
- </div>
1045
- </body>
1046
- </html>
815
+ <html lang='en'>
816
+ <head/>
817
+ <body lang='en'>
818
+ <div class='title-section'>
819
+ <p>&#160;</p>
820
+ </div>
821
+ <br/>
822
+ <div class='prefatory-section'>
823
+ <p>&#160;</p>
824
+ </div>
825
+ <br/>
826
+ <div class='main-section'>
827
+ <br/>
828
+ <div>
829
+ <h1 class='AbstractTitle'>
830
+ Abstract
831
+ <br/>
832
+ <br/>
833
+ Variant 1
834
+ </h1>
835
+ </div>
836
+ <br/>
837
+ <div>
838
+ <h1 class='ForewordTitle'>
839
+ Foreword
840
+ <br/>
841
+ <br/>
842
+ Variant 1
843
+ </h1>
844
+ <p id='A'>This is a preamble</p>
845
+ </div>
846
+ <br/>
847
+ <div class='Section3' id='B'>
848
+ <h1 class='IntroTitle'>Introduction</h1>
849
+ <div id='C'>
850
+ <h2>
851
+ Introduction Subsection
852
+ <br/>
853
+ <br/>
854
+ Variant 1
855
+ </h2>
856
+ </div>
857
+ </div>
858
+ <br/>
859
+ <div class='Section3' id='B1'>
860
+ <h1 class='IntroTitle'>
861
+ Dedication
862
+ <br/>
863
+ <br/>
864
+ Variant 1
865
+ </h1>
866
+ </div>
867
+ <br/>
868
+ <div class='Section3' id='B2'>
869
+ <h1 class='IntroTitle'>
870
+ Note to reader
871
+ <br/>
872
+ <br/>
873
+ Variant 1
874
+ </h1>
875
+ </div>
876
+ <br/>
877
+ <div class='Section3' id=''>
878
+ <h1 class='IntroTitle'>
879
+ Acknowledgements
880
+ <br/>
881
+ <br/>
882
+ Variant 1
883
+ </h1>
884
+ </div>
885
+ <p class='zzSTDTitle1'/>
886
+ <div id='NN1' class='Note'>
887
+ <p>
888
+ <span class='note_label'>NOTE</span>
889
+ &#160; Initial note
890
+ </p>
891
+ </div>
892
+ <div id='NN2' class='Admonition'>
893
+ <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
894
+ <p>Initial admonition</p>
895
+ </div>
896
+ <div id='D'>
897
+ <h1>
898
+ 1.&#160; Scope
899
+ <br/>
900
+ <br/>
901
+ Variant 1
902
+ </h1>
903
+ <p id='E'>Text</p>
904
+ </div>
905
+ <div>
906
+ <h1>
907
+ 2.&#160; Normative References
908
+ <br/>
909
+ <br/>
910
+ Variant 1
911
+ </h1>
912
+ </div>
913
+ <div id='H'>
914
+ <h1>
915
+ 3.&#160; Terms, Definitions, Symbols and Abbreviated Terms
916
+ <br/>
917
+ <br/>
918
+ Variant 1
919
+ </h1>
920
+ <div id='I'>
921
+ <h2>
922
+ 3.1.&#160; Normal Terms
923
+ <br/>
924
+ <br/>
925
+ Variant 1
926
+ </h2>
927
+ <p class='TermNum' id='J'>3.1.1.</p>
928
+ <p class='Terms' style='text-align:left;'><b>Term2</b></p>
929
+ </div>
930
+ <div id='K'>
931
+ <h2>
932
+ 3.2.&#160; Definitions
933
+ <br/>
934
+ <br/>
935
+ Variant 1
936
+ </h2>
937
+ <dl>
938
+ <dt>
939
+ <p>Symbol</p>
940
+ </dt>
941
+ <dd>Definition</dd>
942
+ </dl>
943
+ </div>
944
+ </div>
945
+ <div id='L' class='Symbols'>
946
+ <h1>
947
+ 4.&#160; Symbols and abbreviated terms
948
+ <br/>
949
+ <br/>
950
+ Variant 1
951
+ </h1>
952
+ <dl>
953
+ <dt>
954
+ <p>Symbol</p>
955
+ </dt>
956
+ <dd>Definition</dd>
957
+ </dl>
958
+ </div>
959
+ <div id='M'>
960
+ <h1>
961
+ 5.&#160; Clause 4
962
+ <br/>
963
+ <br/>
964
+ Variant 1
965
+ </h1>
966
+ <div id='N'>
967
+ <h2>
968
+ 5.1.&#160; Introduction
969
+ <br/>
970
+ <br/>
971
+ Variant 1
972
+ </h2>
973
+ </div>
974
+ <div id='O'>
975
+ <h2>
976
+ 5.2.&#160; Clause 4.2
977
+ <br/>
978
+ <br/>
979
+ Variant 1
980
+ </h2>
981
+ </div>
982
+ <div id='O1'>
983
+ <h2>5.3.</h2>
984
+ </div>
985
+ </div>
986
+ <br/>
987
+ <div id='P' class='Section3'>
988
+ <h1 class='Annex'>
989
+ <b>Annex A</b>
990
+ <br/>
991
+ (normative)
992
+ <br/>
993
+ <br/>
994
+ <b>Annex</b>
995
+ <br/>
996
+ <br/>
997
+ Variant 1
998
+ </h1>
999
+ <div id='Q'>
1000
+ <h2>
1001
+ A.1.&#160; Annex A.1
1002
+ <br/>
1003
+ <br/>
1004
+ Variant 1
1005
+ </h2>
1006
+ <div id='Q1'>
1007
+ <h3>
1008
+ A.1.1.&#160; Annex A.1a
1009
+ <br/>
1010
+ <br/>
1011
+ Variant 1
1012
+ </h3>
1013
+ </div>
1014
+ <div>
1015
+ <h3 class='Section3'>
1016
+ A.1.2.&#160; Annex Bibliography
1017
+ <br/>
1018
+ <br/>
1019
+ Variant 1
1020
+ </h3>
1021
+ </div>
1022
+ </div>
1023
+ </div>
1024
+ <br/>
1025
+ <div id='P1' class='Section3'>
1026
+ <h1 class='Annex'>
1027
+ <b>Annex B</b>
1028
+ <br/>
1029
+ (normative)
1030
+ </h1>
1031
+ </div>
1032
+ <br/>
1033
+ <div>
1034
+ <h1 class='Section3'>Bibliography</h1>
1035
+ <div>
1036
+ <h2 class='Section3'>
1037
+ Bibliography Subsection
1038
+ <br/>
1039
+ <br/>
1040
+ Variant 1
1041
+ </h2>
1042
+ </div>
1043
+ </div>
1044
+ </div>
1045
+ </body>
1046
+ </html>
1047
1047
  OUTPUT
1048
1048
  word = <<~OUTPUT
1049
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
1050
- <head>
1051
- <style>
1052
- </style>
1053
- </head>
1054
- <body lang='EN-US' link='blue' vlink='#954F72'>
1055
- <div class='WordSection1'>
1056
- <p>&#160;</p>
1057
- </div>
1058
- <p>
1059
- <br clear='all' class='section'/>
1060
- </p>
1061
- <div class='WordSection2'>
1062
- <p>
1063
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1064
- </p>
1065
- <div>
1066
- <h1 class='AbstractTitle'>
1067
- Abstract
1068
- <br/>
1069
- <br/>
1070
- Variant 1
1071
- </h1>
1072
- </div>
1073
- <p>
1074
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1075
- </p>
1076
- <div>
1077
- <h1 class='ForewordTitle'>
1078
- Foreword
1079
- <br/>
1080
- <br/>
1081
- Variant 1
1082
- </h1>
1083
- <p id='A'>This is a preamble</p>
1084
- </div>
1085
- <p>
1086
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1087
- </p>
1088
- <div class='Section3' id='B'>
1089
- <h1 class='IntroTitle'>Introduction</h1>
1090
- <div id='C'>
1091
- <h2>
1092
- Introduction Subsection
1093
- <br/>
1094
- <br/>
1095
- Variant 1
1096
- </h2>
1097
- </div>
1098
- </div>
1099
- <p>
1100
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1101
- </p>
1102
- <div class='Section3' id='B1'>
1103
- <h1 class='IntroTitle'>
1104
- Dedication
1105
- <br/>
1106
- <br/>
1107
- Variant 1
1108
- </h1>
1109
- </div>
1110
- <p>
1111
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1112
- </p>
1113
- <div class='Section3' id='B2'>
1114
- <h1 class='IntroTitle'>
1115
- Note to reader
1116
- <br/>
1117
- <br/>
1118
- Variant 1
1119
- </h1>
1120
- </div>
1121
- <p>
1122
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1123
- </p>
1124
- <div class='Section3' id=''>
1125
- <h1 class='IntroTitle'>
1126
- Acknowledgements
1127
- <br/>
1128
- <br/>
1129
- Variant 1
1130
- </h1>
1131
- </div>
1132
- <p>&#160;</p>
1133
- </div>
1134
- <p>
1135
- <br clear='all' class='section'/>
1136
- </p>
1137
- <div class='WordSection3'>
1138
- <p class='zzSTDTitle1'/>
1139
- <div id='NN1' class='Note'>
1140
- <p class='Note'>
1141
- <span class='note_label'>NOTE</span>
1142
- <span style='mso-tab-count:1'>&#160; </span>
1143
- Initial note
1144
- </p>
1145
- </div>
1146
- <div id='NN2' class='Admonition'>
1147
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
1148
- <p>Initial admonition</p>
1149
- </div>
1150
- <div id='D'>
1151
- <h1>
1152
- 1.
1153
- <span style='mso-tab-count:1'>&#160; </span>
1154
- Scope
1155
- <br/>
1156
- <br/>
1157
- Variant 1
1158
- </h1>
1159
- <p id='E'>Text</p>
1160
- </div>
1161
- <div>
1162
- <h1>
1163
- 2.
1164
- <span style='mso-tab-count:1'>&#160; </span>
1165
- Normative References
1166
- <br/>
1167
- <br/>
1168
- Variant 1
1169
- </h1>
1170
- </div>
1171
- <div id='H'>
1172
- <h1>
1173
- 3.
1174
- <span style='mso-tab-count:1'>&#160; </span>
1175
- Terms, Definitions, Symbols and Abbreviated Terms
1176
- <br/>
1177
- <br/>
1178
- Variant 1
1179
- </h1>
1180
- <div id='I'>
1181
- <h2>
1182
- 3.1.
1183
- <span style='mso-tab-count:1'>&#160; </span>
1184
- Normal Terms
1185
- <br/>
1186
- <br/>
1187
- Variant 1
1188
- </h2>
1189
- <p class='TermNum' id='J'>3.1.1.</p>
1190
- <p class='Terms' style='text-align:left;'><b>Term2</b></p>
1191
- </div>
1192
- <div id='K'>
1193
- <h2>
1194
- 3.2.
1195
- <span style='mso-tab-count:1'>&#160; </span>
1196
- Definitions
1197
- <br/>
1198
- <br/>
1199
- Variant 1
1200
- </h2>
1201
- <table class='dl'>
1202
- <tr>
1203
- <td valign='top' align='left'>
1204
- <p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
1205
- </td>
1206
- <td valign='top'>Definition</td>
1207
- </tr>
1208
- </table>
1209
- </div>
1210
- </div>
1211
- <div id='L' class='Symbols'>
1212
- <h1>
1213
- 4.
1214
- <span style='mso-tab-count:1'>&#160; </span>
1215
- Symbols and abbreviated terms
1216
- <br/>
1217
- <br/>
1218
- Variant 1
1219
- </h1>
1220
- <table class='dl'>
1221
- <tr>
1222
- <td valign='top' align='left'>
1223
- <p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
1224
- </td>
1225
- <td valign='top'>Definition</td>
1226
- </tr>
1227
- </table>
1228
- </div>
1229
- <div id='M'>
1230
- <h1>
1231
- 5.
1232
- <span style='mso-tab-count:1'>&#160; </span>
1233
- Clause 4
1234
- <br/>
1235
- <br/>
1236
- Variant 1
1237
- </h1>
1238
- <div id='N'>
1239
- <h2>
1240
- 5.1.
1241
- <span style='mso-tab-count:1'>&#160; </span>
1242
- Introduction
1243
- <br/>
1244
- <br/>
1245
- Variant 1
1246
- </h2>
1247
- </div>
1248
- <div id='O'>
1249
- <h2>
1250
- 5.2.
1251
- <span style='mso-tab-count:1'>&#160; </span>
1252
- Clause 4.2
1253
- <br/>
1254
- <br/>
1255
- Variant 1
1256
- </h2>
1257
- </div>
1258
- <div id='O1'>
1259
- <h2>5.3.</h2>
1260
- </div>
1261
- </div>
1262
- <p>
1263
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1264
- </p>
1265
- <div id='P' class='Section3'>
1266
- <h1 class='Annex'>
1267
- <b>Annex A</b>
1268
- <br/>
1269
- (normative)
1270
- <br/>
1271
- <br/>
1272
- <b>Annex</b>
1273
- <br/>
1274
- <br/>
1275
- Variant 1
1276
- </h1>
1277
- <div id='Q'>
1278
- <h2>
1279
- A.1.
1280
- <span style='mso-tab-count:1'>&#160; </span>
1281
- Annex A.1
1282
- <br/>
1283
- <br/>
1284
- Variant 1
1285
- </h2>
1286
- <div id='Q1'>
1287
- <h3>
1288
- A.1.1.
1289
- <span style='mso-tab-count:1'>&#160; </span>
1290
- Annex A.1a
1291
- <br/>
1292
- <br/>
1293
- Variant 1
1294
- </h3>
1295
- </div>
1296
- <div>
1297
- <h3 class='Section3'>
1298
- A.1.2.
1299
- <span style='mso-tab-count:1'>&#160; </span>
1300
- Annex Bibliography
1301
- <br/>
1302
- <br/>
1303
- Variant 1
1304
- </h3>
1305
- </div>
1306
- </div>
1307
- </div>
1308
- <p>
1309
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1310
- </p>
1311
- <div id='P1' class='Section3'>
1312
- <h1 class='Annex'>
1313
- <b>Annex B</b>
1314
- <br/>
1315
- (normative)
1316
- </h1>
1317
- </div>
1318
- <p>
1319
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1320
- </p>
1321
- <div>
1322
- <h1 class='Section3'>Bibliography</h1>
1323
- <div>
1324
- <h2 class='Section3'>
1325
- Bibliography Subsection
1326
- <br/>
1327
- <br/>
1328
- Variant 1
1329
- </h2>
1330
- </div>
1331
- </div>
1332
- </div>
1333
- </body>
1334
- </html>
1049
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
1050
+ <head>
1051
+ <style>
1052
+ </style>
1053
+ </head>
1054
+ <body lang='EN-US' link='blue' vlink='#954F72'>
1055
+ <div class='WordSection1'>
1056
+ <p>&#160;</p>
1057
+ </div>
1058
+ <p>
1059
+ <br clear='all' class='section'/>
1060
+ </p>
1061
+ <div class='WordSection2'>
1062
+ <p>
1063
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1064
+ </p>
1065
+ <div>
1066
+ <h1 class='AbstractTitle'>
1067
+ Abstract
1068
+ <br/>
1069
+ <br/>
1070
+ Variant 1
1071
+ </h1>
1072
+ </div>
1073
+ <p>
1074
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1075
+ </p>
1076
+ <div>
1077
+ <h1 class='ForewordTitle'>
1078
+ Foreword
1079
+ <br/>
1080
+ <br/>
1081
+ Variant 1
1082
+ </h1>
1083
+ <p id='A'>This is a preamble</p>
1084
+ </div>
1085
+ <p>
1086
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1087
+ </p>
1088
+ <div class='Section3' id='B'>
1089
+ <h1 class='IntroTitle'>Introduction</h1>
1090
+ <div id='C'>
1091
+ <h2>
1092
+ Introduction Subsection
1093
+ <br/>
1094
+ <br/>
1095
+ Variant 1
1096
+ </h2>
1097
+ </div>
1098
+ </div>
1099
+ <p>
1100
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1101
+ </p>
1102
+ <div class='Section3' id='B1'>
1103
+ <h1 class='IntroTitle'>
1104
+ Dedication
1105
+ <br/>
1106
+ <br/>
1107
+ Variant 1
1108
+ </h1>
1109
+ </div>
1110
+ <p>
1111
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1112
+ </p>
1113
+ <div class='Section3' id='B2'>
1114
+ <h1 class='IntroTitle'>
1115
+ Note to reader
1116
+ <br/>
1117
+ <br/>
1118
+ Variant 1
1119
+ </h1>
1120
+ </div>
1121
+ <p>
1122
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1123
+ </p>
1124
+ <div class='Section3' id=''>
1125
+ <h1 class='IntroTitle'>
1126
+ Acknowledgements
1127
+ <br/>
1128
+ <br/>
1129
+ Variant 1
1130
+ </h1>
1131
+ </div>
1132
+ <p>&#160;</p>
1133
+ </div>
1134
+ <p>
1135
+ <br clear='all' class='section'/>
1136
+ </p>
1137
+ <div class='WordSection3'>
1138
+ <p class='zzSTDTitle1'/>
1139
+ <div id='NN1' class='Note'>
1140
+ <p class='Note'>
1141
+ <span class='note_label'>NOTE</span>
1142
+ <span style='mso-tab-count:1'>&#160; </span>
1143
+ Initial note
1144
+ </p>
1145
+ </div>
1146
+ <div id='NN2' class='Admonition'>
1147
+ <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
1148
+ <p>Initial admonition</p>
1149
+ </div>
1150
+ <div id='D'>
1151
+ <h1>
1152
+ 1.
1153
+ <span style='mso-tab-count:1'>&#160; </span>
1154
+ Scope
1155
+ <br/>
1156
+ <br/>
1157
+ Variant 1
1158
+ </h1>
1159
+ <p id='E'>Text</p>
1160
+ </div>
1161
+ <div>
1162
+ <h1>
1163
+ 2.
1164
+ <span style='mso-tab-count:1'>&#160; </span>
1165
+ Normative References
1166
+ <br/>
1167
+ <br/>
1168
+ Variant 1
1169
+ </h1>
1170
+ </div>
1171
+ <div id='H'>
1172
+ <h1>
1173
+ 3.
1174
+ <span style='mso-tab-count:1'>&#160; </span>
1175
+ Terms, Definitions, Symbols and Abbreviated Terms
1176
+ <br/>
1177
+ <br/>
1178
+ Variant 1
1179
+ </h1>
1180
+ <div id='I'>
1181
+ <h2>
1182
+ 3.1.
1183
+ <span style='mso-tab-count:1'>&#160; </span>
1184
+ Normal Terms
1185
+ <br/>
1186
+ <br/>
1187
+ Variant 1
1188
+ </h2>
1189
+ <p class='TermNum' id='J'>3.1.1.</p>
1190
+ <p class='Terms' style='text-align:left;'><b>Term2</b></p>
1191
+ </div>
1192
+ <div id='K'>
1193
+ <h2>
1194
+ 3.2.
1195
+ <span style='mso-tab-count:1'>&#160; </span>
1196
+ Definitions
1197
+ <br/>
1198
+ <br/>
1199
+ Variant 1
1200
+ </h2>
1201
+ <table class='dl'>
1202
+ <tr>
1203
+ <td valign='top' align='left'>
1204
+ <p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
1205
+ </td>
1206
+ <td valign='top'>Definition</td>
1207
+ </tr>
1208
+ </table>
1209
+ </div>
1210
+ </div>
1211
+ <div id='L' class='Symbols'>
1212
+ <h1>
1213
+ 4.
1214
+ <span style='mso-tab-count:1'>&#160; </span>
1215
+ Symbols and abbreviated terms
1216
+ <br/>
1217
+ <br/>
1218
+ Variant 1
1219
+ </h1>
1220
+ <table class='dl'>
1221
+ <tr>
1222
+ <td valign='top' align='left'>
1223
+ <p align='left' style='margin-left:0pt;text-align:left;'>Symbol</p>
1224
+ </td>
1225
+ <td valign='top'>Definition</td>
1226
+ </tr>
1227
+ </table>
1228
+ </div>
1229
+ <div id='M'>
1230
+ <h1>
1231
+ 5.
1232
+ <span style='mso-tab-count:1'>&#160; </span>
1233
+ Clause 4
1234
+ <br/>
1235
+ <br/>
1236
+ Variant 1
1237
+ </h1>
1238
+ <div id='N'>
1239
+ <h2>
1240
+ 5.1.
1241
+ <span style='mso-tab-count:1'>&#160; </span>
1242
+ Introduction
1243
+ <br/>
1244
+ <br/>
1245
+ Variant 1
1246
+ </h2>
1247
+ </div>
1248
+ <div id='O'>
1249
+ <h2>
1250
+ 5.2.
1251
+ <span style='mso-tab-count:1'>&#160; </span>
1252
+ Clause 4.2
1253
+ <br/>
1254
+ <br/>
1255
+ Variant 1
1256
+ </h2>
1257
+ </div>
1258
+ <div id='O1'>
1259
+ <h2>5.3.</h2>
1260
+ </div>
1261
+ </div>
1262
+ <p>
1263
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1264
+ </p>
1265
+ <div id='P' class='Section3'>
1266
+ <h1 class='Annex'>
1267
+ <b>Annex A</b>
1268
+ <br/>
1269
+ (normative)
1270
+ <br/>
1271
+ <br/>
1272
+ <b>Annex</b>
1273
+ <br/>
1274
+ <br/>
1275
+ Variant 1
1276
+ </h1>
1277
+ <div id='Q'>
1278
+ <h2>
1279
+ A.1.
1280
+ <span style='mso-tab-count:1'>&#160; </span>
1281
+ Annex A.1
1282
+ <br/>
1283
+ <br/>
1284
+ Variant 1
1285
+ </h2>
1286
+ <div id='Q1'>
1287
+ <h3>
1288
+ A.1.1.
1289
+ <span style='mso-tab-count:1'>&#160; </span>
1290
+ Annex A.1a
1291
+ <br/>
1292
+ <br/>
1293
+ Variant 1
1294
+ </h3>
1295
+ </div>
1296
+ <div>
1297
+ <h3 class='Section3'>
1298
+ A.1.2.
1299
+ <span style='mso-tab-count:1'>&#160; </span>
1300
+ Annex Bibliography
1301
+ <br/>
1302
+ <br/>
1303
+ Variant 1
1304
+ </h3>
1305
+ </div>
1306
+ </div>
1307
+ </div>
1308
+ <p>
1309
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1310
+ </p>
1311
+ <div id='P1' class='Section3'>
1312
+ <h1 class='Annex'>
1313
+ <b>Annex B</b>
1314
+ <br/>
1315
+ (normative)
1316
+ </h1>
1317
+ </div>
1318
+ <p>
1319
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1320
+ </p>
1321
+ <div>
1322
+ <h1 class='Section3'>Bibliography</h1>
1323
+ <div>
1324
+ <h2 class='Section3'>
1325
+ Bibliography Subsection
1326
+ <br/>
1327
+ <br/>
1328
+ Variant 1
1329
+ </h2>
1330
+ </div>
1331
+ </div>
1332
+ </div>
1333
+ </body>
1334
+ </html>
1335
1335
  OUTPUT
1336
1336
  presxml = IsoDoc::PresentationXMLConvert.new({})
1337
1337
  .convert("test", input, true)
@@ -1487,8 +1487,254 @@ RSpec.describe IsoDoc do
1487
1487
  </bibliography>
1488
1488
  </iso-standard>
1489
1489
  OUTPUT
1490
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({ suppressheadingnumbers: true })
1491
- .convert("test", input, true))).to be_equivalent_to xmlpp(output)
1490
+ expect(xmlpp(IsoDoc::PresentationXMLConvert
1491
+ .new({ suppressheadingnumbers: true })
1492
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
1493
+ end
1494
+
1495
+ it "processes floating titles" do
1496
+ input = <<~INPUT
1497
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1498
+ <preface>
1499
+ <introduction id="B" obligation="informative">
1500
+ <title>Introduction</title>
1501
+ <p type="floating-title">A</p>
1502
+ <clause id="B1" obligation="informative">
1503
+ <title>Introduction Subsection</title>
1504
+ <p type="floating-title">B</p>
1505
+ <clause id="B2" obligation="informative">
1506
+ <title>Introduction Sub-subsection</title>
1507
+ <p type="floating-title">C</p>
1508
+ </clause>
1509
+ </clause>
1510
+ </introduction>
1511
+ </preface>
1512
+ <sections>
1513
+ <clause id="A" obligation="informative">
1514
+ <title>Introduction</title>
1515
+ <p type="floating-title">A</p>
1516
+ <clause id="A1" obligation="informative">
1517
+ <title>Introduction Subsection</title>
1518
+ <p type="floating-title">B</p>
1519
+ <clause id="A2" obligation="informative">
1520
+ <title>Introduction Sub-subsection</title>
1521
+ <p type="floating-title">C</p>
1522
+ </clause>
1523
+ </clause>
1524
+ </clause>
1525
+ </sections>
1526
+ <annex id="C" obligation="informative">
1527
+ <title>Introduction</title>
1528
+ <p type="floating-title">A</p>
1529
+ <clause id="C1" obligation="informative">
1530
+ <title>Introduction Subsection</title>
1531
+ <p type="floating-title">B</p>
1532
+ <clause id="C2" obligation="informative">
1533
+ <title>Introduction Sub-subsection</title>
1534
+ <p type="floating-title">C</p>
1535
+ </clause>
1536
+ </clause>
1537
+ </annex>
1538
+ </iso-standard>
1539
+ INPUT
1540
+
1541
+ presxml = <<~PRESXML
1542
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
1543
+ <preface>
1544
+ <introduction id="B" obligation="informative" displayorder="1">
1545
+ <title>Introduction</title>
1546
+ <p type="floating-title" depth="2">A</p>
1547
+ <clause id="B1" obligation="informative">
1548
+ <title depth="2">Introduction Subsection</title>
1549
+ <p type="floating-title" depth="3">B</p>
1550
+ <clause id="B2" obligation="informative">
1551
+ <title depth="3">Introduction Sub-subsection</title>
1552
+ <p type="floating-title" depth="4">C</p>
1553
+ </clause>
1554
+ </clause>
1555
+ </introduction>
1556
+ </preface>
1557
+ <sections>
1558
+ <clause id="A" obligation="informative" displayorder="2">
1559
+ <title depth="1">1.<tab/>Introduction</title>
1560
+ <p type="floating-title" depth="2">A</p>
1561
+ <clause id="A1" obligation="informative">
1562
+ <title depth="2">1.1.<tab/>Introduction Subsection</title>
1563
+ <p type="floating-title" depth="3">B</p>
1564
+ <clause id="A2" obligation="informative">
1565
+ <title depth="3">1.1.1.<tab/>Introduction Sub-subsection</title>
1566
+ <p type="floating-title" depth="4">C</p>
1567
+ </clause>
1568
+ </clause>
1569
+ </clause>
1570
+ </sections>
1571
+ <annex id="C" obligation="informative" displayorder="3">
1572
+ <title><strong>Annex A</strong><br/>(informative)<br/><br/><strong>Introduction</strong></title>
1573
+ <p type="floating-title" depth="2">A</p>
1574
+ <clause id="C1" obligation="informative">
1575
+ <title depth="2">A.1.<tab/>Introduction Subsection</title>
1576
+ <p type="floating-title" depth="3">B</p>
1577
+ <clause id="C2" obligation="informative">
1578
+ <title depth="3">A.1.1.<tab/>Introduction Sub-subsection</title>
1579
+ <p type="floating-title" depth="4">C</p>
1580
+ </clause>
1581
+ </clause>
1582
+ </annex>
1583
+ </iso-standard>
1584
+ PRESXML
1585
+
1586
+ html = <<~OUTPUT
1587
+ #{HTML_HDR}
1588
+ <br/>
1589
+ <div class='Section3' id='B'>
1590
+ <h1 class='IntroTitle'>Introduction</h1>
1591
+ <p class='h2'>A</p>
1592
+ <div id='B1'>
1593
+ <h2>Introduction Subsection</h2>
1594
+ <p class='h3'>B</p>
1595
+ <div id='B2'>
1596
+ <h3>Introduction Sub-subsection</h3>
1597
+ <p class='h4'>C</p>
1598
+ </div>
1599
+ </div>
1600
+ </div>
1601
+ <p class='zzSTDTitle1'/>
1602
+ <div id='A'>
1603
+ <h1>1.&#160; Introduction</h1>
1604
+ <p class='h2'>A</p>
1605
+ <div id='A1'>
1606
+ <h2>1.1.&#160; Introduction Subsection</h2>
1607
+ <p class='h3'>B</p>
1608
+ <div id='A2'>
1609
+ <h3>1.1.1.&#160; Introduction Sub-subsection</h3>
1610
+ <p class='h4'>C</p>
1611
+ </div>
1612
+ </div>
1613
+ </div>
1614
+ <br/>
1615
+ <div id='C' class='Section3'>
1616
+ <h1 class='Annex'>
1617
+ <b>Annex A</b>
1618
+ <br/>
1619
+ (informative)
1620
+ <br/>
1621
+ <br/>
1622
+ <b>Introduction</b>
1623
+ </h1>
1624
+ <p class='h2'>A</p>
1625
+ <div id='C1'>
1626
+ <h2>A.1.&#160; Introduction Subsection</h2>
1627
+ <p class='h3'>B</p>
1628
+ <div id='C2'>
1629
+ <h3>A.1.1.&#160; Introduction Sub-subsection</h3>
1630
+ <p class='h4'>C</p>
1631
+ </div>
1632
+ </div>
1633
+ </div>
1634
+ </div>
1635
+ </body>
1636
+ </html>
1637
+ OUTPUT
1638
+
1639
+ word = <<~OUTPUT
1640
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
1641
+ <head>
1642
+ <style></style>
1643
+ </head>
1644
+ <body lang='EN-US' link='blue' vlink='#954F72'>
1645
+ <div class='WordSection1'>
1646
+ <p>&#160;</p>
1647
+ </div>
1648
+ <p>
1649
+ <br clear='all' class='section'/>
1650
+ </p>
1651
+ <div class='WordSection2'>
1652
+ <p>
1653
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1654
+ </p>
1655
+ <div class='Section3' id='B'>
1656
+ <h1 class='IntroTitle'>Introduction</h1>
1657
+ <p>A</p>
1658
+ <div id='B1'>
1659
+ <h2>Introduction Subsection</h2>
1660
+ <p>B</p>
1661
+ <div id='B2'>
1662
+ <h3>Introduction Sub-subsection</h3>
1663
+ <p>C</p>
1664
+ </div>
1665
+ </div>
1666
+ </div>
1667
+ <p>&#160;</p>
1668
+ </div>
1669
+ <p>
1670
+ <br clear='all' class='section'/>
1671
+ </p>
1672
+ <div class='WordSection3'>
1673
+ <p class='zzSTDTitle1'/>
1674
+ <div id='A'>
1675
+ <h1>
1676
+ 1.
1677
+ <span style='mso-tab-count:1'>&#160; </span>
1678
+ Introduction
1679
+ </h1>
1680
+ <p>A</p>
1681
+ <div id='A1'>
1682
+ <h2>
1683
+ 1.1.
1684
+ <span style='mso-tab-count:1'>&#160; </span>
1685
+ Introduction Subsection
1686
+ </h2>
1687
+ <p>B</p>
1688
+ <div id='A2'>
1689
+ <h3>
1690
+ 1.1.1.
1691
+ <span style='mso-tab-count:1'>&#160; </span>
1692
+ Introduction Sub-subsection
1693
+ </h3>
1694
+ <p>C</p>
1695
+ </div>
1696
+ </div>
1697
+ </div>
1698
+ <p>
1699
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1700
+ </p>
1701
+ <div id='C' class='Section3'>
1702
+ <h1 class='Annex'>
1703
+ <b>Annex A</b>
1704
+ <br/>
1705
+ (informative)
1706
+ <br/>
1707
+ <br/>
1708
+ <b>Introduction</b>
1709
+ </h1>
1710
+ <p>A</p>
1711
+ <div id='C1'>
1712
+ <h2>
1713
+ A.1.
1714
+ <span style='mso-tab-count:1'>&#160; </span>
1715
+ Introduction Subsection
1716
+ </h2>
1717
+ <p>B</p>
1718
+ <div id='C2'>
1719
+ <h3>
1720
+ A.1.1.
1721
+ <span style='mso-tab-count:1'>&#160; </span>
1722
+ Introduction Sub-subsection
1723
+ </h3>
1724
+ <p>C</p>
1725
+ </div>
1726
+ </div>
1727
+ </div>
1728
+ </div>
1729
+ </body>
1730
+ </html>
1731
+ OUTPUT
1732
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
1733
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
1734
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
1735
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
1736
+ expect(xmlpp(IsoDoc::WordConvert.new({})
1737
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(word)
1492
1738
  end
1493
1739
 
1494
1740
  it "processes section titles without ID" do
@@ -1780,7 +2026,7 @@ RSpec.describe IsoDoc do
1780
2026
  .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
1781
2027
  end
1782
2028
 
1783
- it "processes annexes containing one, or more than one special sections" do
2029
+ it "processes annexes containing one, or more than one special sections" do
1784
2030
  input = <<~INPUT
1785
2031
  <iso-standard xmlns="http://riboseinc.com/isoxml">
1786
2032
  <annex id='PP' obligation='normative'>
@@ -1821,87 +2067,87 @@ RSpec.describe IsoDoc do
1821
2067
  </iso-standard>
1822
2068
  INPUT
1823
2069
  presxml = <<~OUTPUT
1824
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
1825
- <annex id='PP' obligation='normative' displayorder='1'>
1826
- <title>
1827
- <strong>Annex A</strong>
1828
- <br/>
1829
- (normative)
1830
- <br/>
1831
- <br/>
1832
- <strong>Glossary</strong>
1833
- </title>
1834
- <terms id='PP1' obligation='normative'>
1835
- <title>A.</title>
1836
- <term id='term-glossary'>
1837
- <name>A.1.</name>
1838
- <preferred><strong>Glossary</strong></preferred>
1839
- </term>
1840
- </terms>
1841
- </annex>
1842
- <annex id='QQ' obligation='normative' displayorder='2'>
1843
- <title>
1844
- <strong>Annex B</strong>
1845
- <br/>
1846
- (normative)
1847
- <br/>
1848
- <br/>
1849
- <strong>Glossary</strong>
1850
- </title>
1851
- <terms id='QQ1' obligation='normative'>
1852
- <title depth='2'>
1853
- B.1.
1854
- <tab/>
1855
- Term Collection
1856
- </title>
1857
- <term id='term-term-1'>
1858
- <name>B.1.1.</name>
1859
- <preferred><strong>Term</strong></preferred>
1860
- </term>
1861
- </terms>
1862
- <terms id='QQ2' obligation='normative'>
1863
- <title depth='2'>
1864
- B.2.
1865
- <tab/>
1866
- Term Collection 2
1867
- </title>
1868
- <term id='term-term-2'>
1869
- <name>B.2.1.</name>
1870
- <preferred><strong>Term</strong></preferred>
1871
- </term>
1872
- </terms>
1873
- </annex>
1874
- <annex id='RR' obligation='normative' displayorder='3'>
1875
- <title>
1876
- <strong>Annex C</strong>
1877
- <br/>
1878
- (normative)
1879
- <br/>
1880
- <br/>
1881
- <strong>Glossary</strong>
1882
- </title>
1883
- <terms id='RR1' obligation='normative'>
1884
- <title depth='2'>
1885
- C.1.
1886
- <tab/>
1887
- Term Collection
1888
- </title>
1889
- <term id='term-term-3'>
1890
- <name>C.1.1.</name>
1891
- <preferred><strong>Term</strong></preferred>
1892
- </term>
1893
- </terms>
1894
- <references id='RR2' obligation='normative'>
1895
- <title depth='2'>
1896
- C.2.
1897
- <tab/>
1898
- References
1899
- </title>
1900
- </references>
1901
- </annex>
1902
- </iso-standard>
2070
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
2071
+ <annex id='PP' obligation='normative' displayorder='1'>
2072
+ <title>
2073
+ <strong>Annex A</strong>
2074
+ <br/>
2075
+ (normative)
2076
+ <br/>
2077
+ <br/>
2078
+ <strong>Glossary</strong>
2079
+ </title>
2080
+ <terms id='PP1' obligation='normative'>
2081
+ <title>A.</title>
2082
+ <term id='term-glossary'>
2083
+ <name>A.1.</name>
2084
+ <preferred><strong>Glossary</strong></preferred>
2085
+ </term>
2086
+ </terms>
2087
+ </annex>
2088
+ <annex id='QQ' obligation='normative' displayorder='2'>
2089
+ <title>
2090
+ <strong>Annex B</strong>
2091
+ <br/>
2092
+ (normative)
2093
+ <br/>
2094
+ <br/>
2095
+ <strong>Glossary</strong>
2096
+ </title>
2097
+ <terms id='QQ1' obligation='normative'>
2098
+ <title depth='2'>
2099
+ B.1.
2100
+ <tab/>
2101
+ Term Collection
2102
+ </title>
2103
+ <term id='term-term-1'>
2104
+ <name>B.1.1.</name>
2105
+ <preferred><strong>Term</strong></preferred>
2106
+ </term>
2107
+ </terms>
2108
+ <terms id='QQ2' obligation='normative'>
2109
+ <title depth='2'>
2110
+ B.2.
2111
+ <tab/>
2112
+ Term Collection 2
2113
+ </title>
2114
+ <term id='term-term-2'>
2115
+ <name>B.2.1.</name>
2116
+ <preferred><strong>Term</strong></preferred>
2117
+ </term>
2118
+ </terms>
2119
+ </annex>
2120
+ <annex id='RR' obligation='normative' displayorder='3'>
2121
+ <title>
2122
+ <strong>Annex C</strong>
2123
+ <br/>
2124
+ (normative)
2125
+ <br/>
2126
+ <br/>
2127
+ <strong>Glossary</strong>
2128
+ </title>
2129
+ <terms id='RR1' obligation='normative'>
2130
+ <title depth='2'>
2131
+ C.1.
2132
+ <tab/>
2133
+ Term Collection
2134
+ </title>
2135
+ <term id='term-term-3'>
2136
+ <name>C.1.1.</name>
2137
+ <preferred><strong>Term</strong></preferred>
2138
+ </term>
2139
+ </terms>
2140
+ <references id='RR2' obligation='normative'>
2141
+ <title depth='2'>
2142
+ C.2.
2143
+ <tab/>
2144
+ References
2145
+ </title>
2146
+ </references>
2147
+ </annex>
2148
+ </iso-standard>
1903
2149
  OUTPUT
1904
2150
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
1905
2151
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
1906
- end
2152
+ end
1907
2153
  end