1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
/*
James Clark XMLTEST cases - Standalone
This contains cases that are valid XML documents.
This contains cases that are standalone (as defined in XML)
and do not have references to external general entities.
*/
#[cfg(all(test, feature = "test-conformance-xml"))]
use std::fs;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::item::Node;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::parser::{ParseError, ParserStateBuilder, StaticStateBuilder, xml};
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::trees::smite::RNode;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::validators::Schema;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::{Error, ErrorKind};
#[cfg(feature = "test-conformance-xml")]
fn test_xmltest_valid_sa(xmldoc: &str, xmlcanondoc: &str) {
/*
Test ID:valid-sa-001
Test URI:valid/sa/001.xml
Spec Sections:3.2.2 [51]
Description:Test demonstrates an Element Type Declaration with Mixed Content.
*/
let testxml = RNode::new_document();
let parseresult = xml::parse(
testxml,
xmldoc,
Some(|_: &_| Err(ParseError::MissingNameSpace)),
);
let canonicalxml = RNode::new_document();
let canonicalparseresult = xml::parse(
canonicalxml.clone(),
xmlcanondoc,
Some(|_: &_| Err(ParseError::MissingNameSpace)),
);
assert!(parseresult.is_ok());
assert!(canonicalparseresult.is_ok());
let doc = parseresult.unwrap();
let validation = doc.validate(Schema::DTD);
assert!(validation.is_ok());
assert_eq!(doc.get_canonical().unwrap(), canonicalparseresult.unwrap());
}
#[cfg(all(test, feature = "test-conformance-xml"))]
fn dtdfileresolve() -> fn(Option<String>, String) -> Result<String, Error> {
move |locdir, uri| {
let u = match locdir {
None => uri,
Some(ld) => ld + uri.as_str(),
};
match fs::read_to_string(u) {
Err(_) => Err(Error::new(
ErrorKind::Unknown,
"Unable to read external DTD".to_string(),
)),
Ok(s) => Ok(s),
}
}
}
#[cfg(all(test, feature = "test-conformance-xml"))]
use encoding_rs::UTF_8;
#[cfg(all(test, feature = "test-conformance-xml"))]
use encoding_rs::UTF_16BE;
#[cfg(all(test, feature = "test-conformance-xml"))]
use encoding_rs::UTF_16LE;
#[cfg(all(test, feature = "test-conformance-xml"))]
use encoding_rs::WINDOWS_1252;
#[cfg(all(test, feature = "test-conformance-xml"))]
use encoding_rs_io::DecodeReaderBytesBuilder;
#[cfg(all(test, feature = "test-conformance-xml"))]
use std::fs::File;
#[cfg(all(test, feature = "test-conformance-xml"))]
use std::io::{Read, Seek, SeekFrom};
#[cfg(all(test, feature = "test-conformance-xml"))]
pub fn non_utf8_file_reader(filedir: &str) -> String {
/*
xRust itself will most likely be UTF-8 only, but there are UTF-16 files in the conformance
suite. I could change them, but best leave as-is in case we do try to support later.
*/
let mut file_in = File::open(filedir).unwrap();
let mut buffer = [0; 4];
// read exactly 4 bytes
let _ = file_in.read_exact(&mut buffer);
let _ = file_in.seek(SeekFrom::Start(0));
let enc = match buffer {
//[0, 0, 254, 255] => {} //UCS-4, big-endian machine (1234 order)
//[255, 254, 0, 0] => {} //UCS-4, little-endian machine (4321 order)
//[0, 0, 255, 254] => {} //UCS-4, unusual octet order (2143)
//[254, 255, 0, 0] => {} //UCS-4, unusual octet order (3412)
[254, 255, _, _] => Some(UTF_16BE), //UTF-16, big-endian
[255, 254, _, _] => Some(UTF_16LE), //UTF-16, little-endian
[239, 187, 191, _] => Some(UTF_8), //UTF-8
[60, 63, 120, 109] => Some(WINDOWS_1252), //UTF-8
_ => Some(UTF_8), //Other
};
let mut decoded_stream = DecodeReaderBytesBuilder::new().encoding(enc).build(file_in);
let mut dest = String::new();
let _ = decoded_stream.read_to_string(&mut dest);
dest
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa001() {
/*
Test ID:valid-sa-001
Test URI:valid/sa/001.xml
Spec Sections:3.2.2 [51]
Description:Test demonstrates an Element Type Declaration with Mixed Content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/001.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/001.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa002() {
/*
Test ID:valid-sa-002
Test URI:valid/sa/002.xml
Spec Sections:3.1 [40]
Description:Test demonstrates that whitespace is permitted after the tag name in a Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/002.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/002.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa003() {
/*
Test ID:valid-sa-003
Test URI:valid/sa/003.xml
Spec Sections:3.1 [42]
Description:Test demonstrates that whitespace is permitted after the tag name in an End-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/003.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/003.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa004() {
/*
Test ID:valid-sa-004
Test URI:valid/sa/004.xml
Spec Sections:3.1 [41]
Description:Test demonstrates a valid attribute specification within a Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/004.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/004.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa005() {
/*
Test ID:valid-sa-005
Test URI:valid/sa/005.xml
Spec Sections:3.1 [40]
Description:Test demonstrates a valid attribute specification within a Start-tag thatcontains whitespace on both sides of the equal sign.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/005.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/005.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa006() {
/*
Test ID:valid-sa-006
Test URI:valid/sa/006.xml
Spec Sections:3.1 [41]
Description:Test demonstrates that the AttValue within a Start-tag can use a single quote as a delimter.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/006.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/006.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa007() {
/*
Test ID:valid-sa-007
Test URI:valid/sa/007.xml
Spec Sections:3.1 4.6 [43]
Description:Test demonstrates numeric character references can be used for element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/007.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/007.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa008() {
/*
Test ID:valid-sa-008
Test URI:valid/sa/008.xml
Spec Sections:2.4 3.1 [43]
Description:Test demonstrates character references can be used for element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/008.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/008.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa009() {
/*
Test ID:valid-sa-009
Test URI:valid/sa/009.xml
Spec Sections:2.3 3.1 [43]
Description:Test demonstrates that PubidChar can be used for element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/009.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/009.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa010() {
/*
Test ID:valid-sa-010
Test URI:valid/sa/010.xml
Spec Sections:3.1 [40]
Description:Test demonstrates that whitespace is valid after the Attribute in a Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/010.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/010.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa011() {
/*
Test ID:valid-sa-011
Test URI:valid/sa/011.xml
Spec Sections:3.1 [40]
Description:Test demonstrates mutliple Attibutes within the Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/011.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/011.xml")
.unwrap()
.as_str(),
);
}
/*
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa012() {
/*
This test is deliberately ignored. Although these are valid XML documents,
XML without namespaces is not something we wish to handle.
*/
/*
Test ID:valid-sa-012
Test URI:valid/sa/012.xml
Spec Sections:2.3 [4]
Description:Uses a legal XML 1.0 name consisting of a single colon character (disallowed by the latest XML Namespaces draft).
*/
let testxml = RNode::new_document();
let parseresult = xml::parse(testxml,
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/012.xml").unwrap(),
Some(|_: &_| Err(ParseError::MissingNameSpace)),Some(|_: &_| Err(ParseError::MissingNameSpace))
));
let canonicalxml = RNode::new_document();
let canonicalparseresult = xml::parse(canonicalxml.clone(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/012.xml").unwrap(),
Some(|_: &_| Err(ParseError::MissingNameSpace)),Some(|_: &_| Err(ParseError::MissingNameSpace))
));
assert!(parseresult.is_ok());
assert!(canonicalparseresult.is_ok());
assert_eq!(parseresult.unwrap().get_canonical().unwrap(), canonicalparseresult.unwrap());
}
*/
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa013() {
/*
Test ID:valid-sa-013
Test URI:valid/sa/013.xml
Spec Sections:2.3 3.1 [13] [40]
Description:Test demonstrates that the Attribute in a Start-tag can consist of numerals along with special characters.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/013.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/013.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa014() {
/*
Test ID:valid-sa-014
Test URI:valid/sa/014.xml
Spec Sections:2.3 3.1 [13] [40]
Description:Test demonstrates that all lower case letters are valid for the Attribute in a Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/014.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/014.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa015() {
/*
Test ID:valid-sa-015
Test URI:valid/sa/015.xml
Spec Sections:2.3 3.1 [13] [40]
Description:Test demonstrates that all upper case letters are valid for the Attribute in a Start-tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/015.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/015.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa016() {
/*
Test ID:valid-sa-016
Test URI:valid/sa/016.xml
Spec Sections:2.6 3.1 [16] [43]
Description:Test demonstrates that Processing Instructions are valid element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/016.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/016.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa017() {
/*
Test ID:valid-sa-017
Test URI:valid/sa/017.xml
Spec Sections:2.6 3.1 [16] [43]
Description:Test demonstrates that Processing Instructions are valid element content and there can be more than one.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/017.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/017.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa018() {
/*
Test ID:valid-sa-018
Test URI:valid/sa/018.xml
Spec Sections:2.7 3.1 [18] [43]
Description:Test demonstrates that CDATA sections are valid element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/018.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/018.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa019() {
/*
Test ID:valid-sa-019
Test URI:valid/sa/019.xml
Spec Sections:2.7 3.1 [18] [43]
Description:Test demonstrates that CDATA sections are valid element content and thatampersands may occur in their literal form.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/019.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/019.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa020() {
/*
Test ID:valid-sa-020
Test URI:valid/sa/020.xml
Spec Sections:2.7 3.1 [18] [43]
Description:Test demonstractes that CDATA sections are valid element content and thateveryting between the CDStart and CDEnd is recognized as character data not markup.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/020.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/020.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa021() {
/*
Test ID:valid-sa-021
Test URI:valid/sa/021.xml
Spec Sections:2.5 3.1 [15] [43]
Description:Test demonstrates that comments are valid element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/021.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/021.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa022() {
/*
Test ID:valid-sa-022
Test URI:valid/sa/022.xml
Spec Sections:2.5 3.1 [15] [43]
Description:Test demonstrates that comments are valid element content and that all characters before the double-hypen right angle combination are considered part of thecomment.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/022.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/022.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa023() {
/*
Test ID:valid-sa-023
Test URI:valid/sa/023.xml
Spec Sections:3.1 [43]
Description:Test demonstrates that Entity References are valid element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/023.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/023.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa024() {
/*
Test ID:valid-sa-024
Test URI:valid/sa/024.xml
Spec Sections:3.1 4.1 [43] [66]
Description:Test demonstrates that Entity References are valid element content and also demonstrates a valid Entity Declaration.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/024.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/024.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa025() {
/*
Test ID:valid-sa-025
Test URI:valid/sa/025.xml
Spec Sections:3.2 [46]
Description:Test demonstrates an Element Type Declaration and that the contentspec can be of mixed content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/025.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/025.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa026() {
/*
Test ID:valid-sa-026
Test URI:valid/sa/026.xml
Spec Sections:3.2 [46]
Description:Test demonstrates an Element Type Declaration and that EMPTY is a valid contentspec.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/026.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/026.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa027() {
/*
Test ID:valid-sa-027
Test URI:valid/sa/027.xml
Spec Sections:3.2 [46]
Description:Test demonstrates an Element Type Declaration and that ANY is a valid contenspec.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/027.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/027.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa028() {
/*
Test ID:valid-sa-028
Test URI:valid/sa/028.xml
Spec Sections:2.8 [24]
Description:Test demonstrates a valid prolog that uses double quotes as delimeters around the VersionNum.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/028.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/028.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa029() {
/*
Test ID:valid-sa-029
Test URI:valid/sa/029.xml
Spec Sections:2.8 [24]
Description:Test demonstrates a valid prolog that uses single quotes as delimters around the VersionNum.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/029.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/029.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa030() {
/*
Test ID:valid-sa-030
Test URI:valid/sa/030.xml
Spec Sections:2.8 [25]
Description:Test demonstrates a valid prolog that contains whitespace on both sides of the equal sign in the VersionInfo.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/030.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/030.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa031() {
/*
Test ID:valid-sa-031
Test URI:valid/sa/031.xml
Spec Sections:4.3.3 [80]
Description:Test demonstrates a valid EncodingDecl within the prolog.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/031.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/031.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa032() {
/*
Test ID:valid-sa-032
Test URI:valid/sa/032.xml
Spec Sections:2.9 [32]
Description:Test demonstrates a valid SDDecl within the prolog.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/032.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/032.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa033() {
/*
Test ID:valid-sa-033
Test URI:valid/sa/033.xml
Spec Sections:2.8 [23]
Description:Test demonstrates that both a EncodingDecl and SDDecl are valid within the prolog.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/033.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/033.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa034() {
/*
Test ID:valid-sa-034
Test URI:valid/sa/034.xml
Spec Sections:3.1 [44]
Description:Test demonstrates the correct syntax for an Empty element tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/034.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/034.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa035() {
/*
Test ID:valid-sa-035
Test URI:valid/sa/035.xml
Spec Sections:3.1 [44]
Description:Test demonstrates that whitespace is permissible after the name in an Empty element tag.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/035.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/035.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa036() {
/*
Test ID:valid-sa-036
Test URI:valid/sa/036.xml
Spec Sections:2.6 [16]
Description:Test demonstrates a valid processing instruction.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/036.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/036.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa017a() {
/*
Test ID:valid-sa-017a
Test URI:valid/sa/017a.xml
Spec Sections:2.6 3.1 [16] [43]
Description:Test demonstrates that two apparently wrong Processing Instructions make aright one, with very odd content "some data ? > <?".
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/017a.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/017a.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa037() {
/*
Test ID:valid-sa-037
Test URI:valid/sa/037.xml
Spec Sections:2.6 [15]
Description:Test demonstrates a valid comment and that it may appear anywhere in the document including at the end.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/037.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/037.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa038() {
/*
Test ID:valid-sa-038
Test URI:valid/sa/038.xml
Spec Sections:2.6 [15]
Description:Test demonstrates a valid comment and that it may appear anywhere in the document including the beginning.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/038.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/038.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa039() {
/*
Test ID:valid-sa-039
Test URI:valid/sa/039.xml
Spec Sections:2.6 [16]
Description:Test demonstrates a valid processing instruction and that it may appear at the beginning of the document.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/039.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/039.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa040() {
/*
Test ID:valid-sa-040
Test URI:valid/sa/040.xml
Spec Sections:3.3 3.3.1 [52] [54]
Description:Test demonstrates an Attribute List declaration that uses a StringType as the AttType.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/040.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/040.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa041() {
/*
Test ID:valid-sa-041
Test URI:valid/sa/041.xml
Spec Sections:3.3.1 4.1 [54] [66]
Description:Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/041.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/041.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa042() {
/*
Test ID:valid-sa-042
Test URI:valid/sa/042.xml
Spec Sections:3.3.1 4.1 [54] [66]
Description:Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference. The test also shows that the leading zeros in the character reference are ignored.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/042.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/042.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa043() {
/*
Test ID:valid-sa-043
Test URI:valid/sa/043.xml
Spec Sections:3.3
Description:An element's attributes may be declared before its content model; and attribute values may contain newlines.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/043.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/043.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa044() {
/*
Test ID:valid-sa-044
Test URI:valid/sa/044.xml
Spec Sections:3.1 [44]
Description:Test demonstrates that the empty-element tag must be use for an elements that are declared EMPTY.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/044.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/044.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa045() {
/*
Test ID:valid-sa-045
Test URI:valid/sa/045.xml
Spec Sections:3.3 [52]
Description:Tests whether more than one definition can be provided for the same attribute of a given element type with the first declaration being binding.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/045.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/045.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa046() {
/*
Test ID:valid-sa-046
Test URI:valid/sa/046.xml
Spec Sections:3.3 [52]
Description:Test demonstrates that when more than one AttlistDecl is provided for a given element type, the contents of all those provided are merged.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/046.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/046.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa047() {
/*
Test ID:valid-sa-047
Test URI:valid/sa/047.xml
Spec Sections:3.1 [43]
Description:Test demonstrates that extra whitespace is normalized into single space character.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/047.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/047.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa048() {
/*
Test ID:valid-sa-048
Test URI:valid/sa/048.xml
Spec Sections:2.4 3.1 [14] [43]
Description:Test demonstrates that character data is valid element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/048.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/048.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa049() {
/*
Test ID:valid-sa-049
Test URI:valid/sa/049.xml
Spec Sections:2.2 [2]
Description:Test demonstrates that characters outside of normal ascii range can be used as element content.
*/
test_xmltest_valid_sa(
non_utf8_file_reader("tests/conformance/xml/xmlconf/xmltest/valid/sa/049.xml").as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/049.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa050() {
/*
Test ID:valid-sa-050
Test URI:valid/sa/050.xml
Spec Sections:2.2 [2]
Description:Test demonstrates that characters outside of normal ascii range can be used as element content.
*/
test_xmltest_valid_sa(
non_utf8_file_reader("tests/conformance/xml/xmlconf/xmltest/valid/sa/050.xml").as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/050.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa051() {
/*
Test ID:valid-sa-051
Test URI:valid/sa/051.xml
Spec Sections:2.2 [2]
Description:The document is encoded in UTF-16 and uses some name characters well outside of the normal ASCII range.
*/
test_xmltest_valid_sa(
non_utf8_file_reader("tests/conformance/xml/xmlconf/xmltest/valid/sa/051.xml").as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/051.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa052() {
/*
Test ID:valid-sa-052
Test URI:valid/sa/052.xml
Spec Sections:2.2 [2]
Description:The document is encoded in UTF-8 and the text inside the root element uses two non-ASCII characters, encoded in UTF-8 and each of which expands to a Unicode surrogate pair.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/052.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/052.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa053() {
/*
Test ID:valid-sa-053
Test URI:valid/sa/053.xml
Spec Sections:4.4.2
Description:Tests inclusion of a well-formed internal entity, which holds an element required by the content model.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/053.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/053.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa054() {
/*
Test ID:valid-sa-054
Test URI:valid/sa/054.xml
Spec Sections:3.1 [40] [42]
Description:Test demonstrates that extra whitespace within Start-tags and End-tags are nomalized into single spaces.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/054.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/054.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa055() {
/*
Test ID:valid-sa-055
Test URI:valid/sa/055.xml
Spec Sections:2.6 2.10 [16]
Description:Test demonstrates that extra whitespace within a processing instruction willnormalized into s single space character.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/055.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/055.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa056() {
/*
Test ID:valid-sa-056
Test URI:valid/sa/056.xml
Spec Sections:3.3.1 4.1 [54] [66]
Description:Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference. The test also shows that the leading zeros in the character reference are ignored.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/056.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/056.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa057() {
/*
Test ID:valid-sa-057
Test URI:valid/sa/057.xml
Spec Sections:3.2.1 [47]
Description:Test demonstrates an element content model whose element can occur zero or more times.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/057.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/057.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa058() {
/*
Test ID:valid-sa-058
Test URI:valid/sa/058.xml
Spec Sections:3.3.3
Description:Test demonstrates that extra whitespace be normalized into a single space character in an attribute of type NMTOKENS.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/058.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/058.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa059() {
/*
Test ID:valid-sa-059
Test URI:valid/sa/059.xml
Spec Sections:3.2 3.3 [46] [53]
Description:Test demonstrates an Element Type Declaration that uses the contentspec of EMPTY. The element cannot have any contents and must always appear as an empty element in the document. The test also shows an Attribute-list declaration with multiple AttDef's.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/059.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/059.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa060() {
/*
Test ID:valid-sa-060
Test URI:valid/sa/060.xml
Spec Sections:4.1 [66]
Description:Test demonstrates the use of decimal Character References within element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/060.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/060.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa061() {
/*
Test ID:valid-sa-061
Test URI:valid/sa/061.xml
Spec Sections:4.1 [66]
Description:Test demonstrates the use of decimal Character References within element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/061.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/061.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa062() {
/*
Test ID:valid-sa-062
Test URI:valid/sa/062.xml
Spec Sections:4.1 [66]
Description:Test demonstrates the use of hexadecimal Character References within element.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/062.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/062.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa063() {
/*
Test ID:valid-sa-063
Test URI:valid/sa/063.xml
Spec Sections:2.3 [5]
Description:The document is encoded in UTF-8 and the name of the root element type uses non-ASCII characters.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/063.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/063.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa064() {
/*
Test ID:valid-sa-064
Test URI:valid/sa/064.xml
Spec Sections:4.1 [66]
Description:Tests in-line handling of two legal character references, which each expand to a Unicode surrogate pair.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/064.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/064.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa065() {
/*
Test ID:valid-sa-065
Test URI:valid/sa/065.xml
Spec Sections:4.5
Description:Tests ability to define an internal entity which can't legally be expanded (contains an unquoted <).
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/065.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/065.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa066() {
/*
Test ID:valid-sa-066
Test URI:valid/sa/066.xml
Spec Sections:4.1 [66]
Description:Expands a CDATA attribute with a character reference.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/066.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/066.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa067() {
/*
Test ID:valid-sa-067
Test URI:valid/sa/067.xml
Spec Sections:4.1 [66]
Description:Test demonstrates the use of decimal character references within element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/067.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/067.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa068() {
/*
Test ID:valid-sa-068
Test URI:valid/sa/068.xml
Spec Sections:2.11, 4.5
Description:Tests definition of an internal entity holding a carriage return character reference, which must not be normalized before reporting to the application. Line break normalization only occurs when parsing external parsed entities.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/068.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/068.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa069() {
/*
Test ID:valid-sa-069
Test URI:valid/sa/069.xml
Spec Sections:4.7
Description:Verifies that an XML parser will parse a NOTATION declaration; the output phase of this test ensures that it's reported to the application.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/069.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/069.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa070() {
/*
Test ID:valid-sa-070
Test URI:valid/sa/070.xml
Spec Sections:4.4.8
Description:Verifies that internal parameter entities are correctly expanded within the internal subset.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/070.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/070.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa071() {
/*
Test ID:valid-sa-071
Test URI:valid/sa/071.xml
Spec Sections:3.3 3.3.1 [52] [56]
Description:Test demonstrates that an AttlistDecl can use ID as the TokenizedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/071.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/071.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa072() {
/*
Test ID:valid-sa-072
Test URI:valid/sa/072.xml
Spec Sections:3.3 3.3.1 [52] [56]
Description:Test demonstrates that an AttlistDecl can use IDREF as the TokenizedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/072.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/072.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa073() {
/*
Test ID:valid-sa-073
Test URI:valid/sa/073.xml
Spec Sections:3.3 3.3.1 [52] [56]
Description:Test demonstrates that an AttlistDecl can use IDREFS as the TokenizedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/073.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/073.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa074() {
/*
Test ID:valid-sa-074
Test URI:valid/sa/074.xml
Spec Sections:3.3 3.3.1 [52] [56]
Description:Test demonstrates that an AttlistDecl can use ENTITY as the TokenizedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/074.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/074.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa075() {
/*
Test ID:valid-sa-075
Test URI:valid/sa/075.xml
Spec Sections:3.3 3.3.1 [52] [56]
Description:Test demonstrates that an AttlistDecl can use ENTITIES as the TokenizedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/075.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/075.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa076() {
/*
Test ID:valid-sa-076
Test URI:valid/sa/076.xml
Spec Sections:3.3.1
Description:Verifies that an XML parser will parse a NOTATION attribute; the output phase of this test ensures that both notations are reported to the application.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/076.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/076.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa077() {
/*
Test ID:valid-sa-077
Test URI:valid/sa/077.xml
Spec Sections:3.3 3.3.1 [52] [54]
Description:Test demonstrates that an AttlistDecl can use an EnumeratedType within the Attribute type. The test also shows that IMPLIED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/077.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/077.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa078() {
/*
Test ID:valid-sa-078
Test URI:valid/sa/078.xml
Spec Sections:3.3 3.3.1 [52] [54]
Description:Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type. The test also shows that REQUIRED is a valid DefaultDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/078.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/078.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa079() {
/*
Test ID:valid-sa-079
Test URI:valid/sa/079.xml
Spec Sections:3.3 3.3.2 [52] [60]
Description:Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type. The test also shows that FIXED is a valid DefaultDecl and that a value can be given to the attribute in the Start-tag as well as the AttListDecl.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/079.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/079.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa080() {
/*
Test ID:valid-sa-080
Test URI:valid/sa/080.xml
Spec Sections:3.3 3.3.2 [52] [60]
Description:Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type. The test also shows that FIXED is a valid DefaultDecl and that an value can be given to the attribute.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/080.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/080.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa081() {
/*
Test ID:valid-sa-081
Test URI:valid/sa/081.xml
Spec Sections:3.2.1 [50]
Description:Test demonstrates the use of the optional character following a name or list to govern the number of times an element or content particles in the list occur.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/081.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/081.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa082() {
/*
Test ID:valid-sa-082
Test URI:valid/sa/082.xml
Spec Sections:4.2 [72]
Description:Tests that an external PE may be defined (but not referenced).
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/082.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/082.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa083() {
/*
Test ID:valid-sa-083
Test URI:valid/sa/083.xml
Spec Sections:4.2 [72]
Description:Tests that an external PE may be defined (but not referenced).
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/083.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/083.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa084() {
/*
Test ID:valid-sa-084
Test URI:valid/sa/084.xml
Spec Sections:2.10
Description:Test demonstrates that although whitespace can be used to set apart markup for greater readability it is not necessary.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/084.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/084.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa085() {
/*
Test ID:valid-sa-085
Test URI:valid/sa/085.xml
Spec Sections:4
Description:Parameter and General entities use different namespaces, so there can be an entity of each type with a given name.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/085.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/085.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa086() {
/*
Test ID:valid-sa-086
Test URI:valid/sa/086.xml
Spec Sections:4.2
Description:Tests whether entities may be declared more than once, with the first declaration being the binding one.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/086.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/086.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa087() {
/*
Test ID:valid-sa-087
Test URI:valid/sa/087.xml
Spec Sections:4.5
Description:Tests whether character references in internal entities are expanded early enough, by relying on correct handling to make the entity be well formed.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/087.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/087.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa088() {
/*
Test ID:valid-sa-088
Test URI:valid/sa/088.xml
Spec Sections:4.5
Description:Tests whether entity references in internal entities are expanded late enough, by relying on correct handling to make the expanded text be valid. (If it's expanded too early, the entity will parse as an element that's not valid in that context.)
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/088.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/088.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa089() {
/*
Test ID:valid-sa-089
Test URI:valid/sa/089.xml
Spec Sections:4.1 [66]
Description:Tests entity expansion of three legal character references, which each expand to a Unicode surrogate pair.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/089.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/089.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa090() {
/*
Test ID:valid-sa-090
Test URI:valid/sa/090.xml
Spec Sections:3.3.1
Description:Verifies that an XML parser will parse a NOTATION attribute; the output phase of this test ensures that the notation is reported to the application.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/090.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/090.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa091() {
/*
Test ID:valid-sa-091
Test URI:valid/sa/091.xml
Spec Sections:3.3.1
Description:Verifies that an XML parser will parse an ENTITY attribute; the output phase of this test ensures that the notation is reported to the application, and for validating parsers it further tests that the entity is so reported.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/091.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/091.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa092() {
/*
Test ID:valid-sa-092
Test URI:valid/sa/092.xml
Spec Sections:2.3 2.10
Description:Test demostrates that extra whitespace is normalized into a single space character.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/092.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/092.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa093() {
/*
Test ID:valid-sa-093
Test URI:valid/sa/093.xml
Spec Sections:2.10
Description:Test demonstrates that extra whitespace is not intended for inclusion in the delivered version of the document.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/093.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/093.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa094() {
/*
Test ID:valid-sa-094
Test URI:valid/sa/094.xml
Spec Sections:2.8
Description:Attribute defaults with a DTD have special parsing rules, different from other strings. That means that characters found there may look like an undefined parameter entity reference "within a markup declaration", but they aren't ... so they can't be violating the PEs in Internal Subset WFC.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/094.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/094.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa095() {
/*
Test ID:valid-sa-095
Test URI:valid/sa/095.xml
Spec Sections:3.3.3
Description:Basically an output test, this requires extra whitespace to be normalized into a single space character in an attribute of type NMTOKENS.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/095.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/095.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa096() {
/*
Test ID:valid-sa-096
Test URI:valid/sa/096.xml
Spec Sections:3.3.3
Description:Test demonstrates that extra whitespace is normalized into a single space character in an attribute of type NMTOKENS.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/096.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/096.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa097() {
/*
Test ID:valid-sa-097
Test URI:valid/sa/097.xml
Spec Sections:3.3
Description:Basically an output test, this tests whether an externally defined attribute declaration (with a default) takes proper precedence over a subsequent internal declaration.
*/
let ss = StaticStateBuilder::new()
.dtd_resolver(dtdfileresolve())
.namespace(|_: &_| Err(ParseError::MissingNameSpace))
.build();
let testxml = RNode::new_document();
let ps = ParserStateBuilder::new()
.doc(testxml)
.document_location("tests/conformance/xml/xmlconf/xmltest/valid/sa/".to_string())
.build();
let parseresult = xml::parse_with_state(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/097.xml")
.unwrap()
.as_str(),
ps,
ss,
);
let canonicalxml = RNode::new_document();
let canonicalparseresult = xml::parse(
canonicalxml.clone(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/097.xml")
.unwrap()
.as_str(),
Some(|_: &_| Err(ParseError::MissingNameSpace)),
);
assert!(parseresult.is_ok());
assert!(canonicalparseresult.is_ok());
let doc = parseresult.unwrap();
let validation = doc.validate(Schema::DTD);
assert!(validation.is_ok());
assert_eq!(doc.get_canonical().unwrap(), canonicalparseresult.unwrap());
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa098() {
/*
Test ID:valid-sa-098
Test URI:valid/sa/098.xml
Spec Sections:2.6 2.10 [16]
Description:Test demonstrates that extra whitespace within a processing instruction is converted into a single space character.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/098.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/098.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa099() {
/*
Test ID:valid-sa-099
Test URI:valid/sa/099.xml
Spec Sections:4.3.3 [81]
Description:Test demonstrates the name of the encoding can be composed of lowercase characters.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/099.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/099.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa100() {
/*
Test ID:valid-sa-100
Test URI:valid/sa/100.xml
Spec Sections:2.3 [12]
Description:Makes sure that PUBLIC identifiers may have some strange characters. NOTE: The XML editors have said that the XML specification errata will specify that parameter entity expansion does not occur in PUBLIC identifiers, so that the '%' character will not flag a malformed parameter entity reference.
*/
let ss = StaticStateBuilder::new()
.dtd_resolver(dtdfileresolve())
.namespace(|_: &_| Err(ParseError::MissingNameSpace))
.build();
let testxml = RNode::new_document();
let ps = ParserStateBuilder::new()
.doc(testxml)
.document_location("tests/conformance/xml/xmlconf/xmltest/valid/sa/".to_string())
.build();
let parseresult = xml::parse_with_state(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/100.xml")
.unwrap()
.as_str(),
ps,
ss,
);
let canonicalxml = RNode::new_document();
let canonicalparseresult = xml::parse(
canonicalxml.clone(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/100.xml")
.unwrap()
.as_str(),
Some(|_: &_| Err(ParseError::MissingNameSpace)),
);
assert!(parseresult.is_ok());
assert!(canonicalparseresult.is_ok());
let doc = parseresult.unwrap();
let validation = doc.validate(Schema::DTD);
assert!(validation.is_ok());
assert_eq!(doc.get_canonical().unwrap(), canonicalparseresult.unwrap());
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa101() {
/*
Test ID:valid-sa-101
Test URI:valid/sa/101.xml
Spec Sections:4.5
Description:This tests whether entity expansion is (incorrectly) done while processing entity declarations; if it is, the entity value literal will terminate prematurely.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/101.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/101.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa102() {
/*
Test ID:valid-sa-102
Test URI:valid/sa/102.xml
Spec Sections:3.3.3
Description:Test demonstrates that a CDATA attribute can pass a double quote as its value.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/102.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/102.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa103() {
/*
Test ID:valid-sa-103
Test URI:valid/sa/103.xml
Spec Sections:3.3.3
Description:Test demonstrates that an attribute can pass a less than sign as its value.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/103.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/103.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa104() {
/*
Test ID:valid-sa-104
Test URI:valid/sa/104.xml
Spec Sections:3.1 [40]
Description:Test demonstrates that extra whitespace within an Attribute of a Start-tag is normalized to a single space character.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/104.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/104.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa105() {
/*
Test ID:valid-sa-105
Test URI:valid/sa/105.xml
Spec Sections:3.3.3
Description:Basically an output test, this requires a CDATA attribute with a tab character to be passed through as one space.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/105.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/105.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa106() {
/*
Test ID:valid-sa-106
Test URI:valid/sa/106.xml
Spec Sections:3.3.3
Description:Basically an output test, this requires a CDATA attribute with a newline character to be passed through as one space.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/106.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/106.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa107() {
/*
Test ID:valid-sa-107
Test URI:valid/sa/107.xml
Spec Sections:3.3.3
Description:Basically an output test, this requires a CDATA attribute with a return character to be passed through as one space.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/107.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/107.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa108() {
/*
Test ID:valid-sa-108
Test URI:valid/sa/108.xml
Spec Sections:2.11, 3.3.3
Description:This tests normalization of end-of-line characters (CRLF) within entities to LF, primarily as an output test.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/108.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/108.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa109() {
/*
Test ID:valid-sa-109
Test URI:valid/sa/109.xml
Spec Sections:2.3 3.1 [10][40][41]
Description:Test demonstrates that an attribute can have a null value.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/109.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/109.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(feature = "test-conformance-xml")]
fn validsa110() {
/*
Test ID:valid-sa-110
Test URI:valid/sa/110.xml
Spec Sections:3.3.3
Description:Basically an output test, this requires that a CDATA attribute with a CRLF be normalized to one space.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/110.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/110.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa111() {
/*
Test ID:valid-sa-111
Test URI:valid/sa/111.xml
Spec Sections:3.3.3
Description:Character references expanding to spaces doesn't affect treatment of attributes.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/111.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/111.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa112() {
/*
Test ID:valid-sa-112
Test URI:valid/sa/112.xml
Spec Sections:3.2.1 [48][49]
Description:Test demonstrates shows the use of content particles within the element content.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/112.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/112.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa113() {
/*
Test ID:valid-sa-113
Test URI:valid/sa/113.xml
Spec Sections:3.3 [52][53]
Description:Test demonstrates that it is not an error to have attributes declared for an element not itself declared.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/113.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/113.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa114() {
/*
Test ID:valid-sa-114
Test URI:valid/sa/114.xml
Spec Sections:2.7 [20]
Description:Test demonstrates that all text within a valid CDATA section is considered text and not recognized as markup.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/114.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/114.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa115() {
/*
Test ID:valid-sa-115
Test URI:valid/sa/115.xml
Spec Sections:3.3.3
Description:Test demonstrates that an entity reference is processed by recursively processing the replacement text of the entity.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/115.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/115.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa116() {
/*
Test ID:valid-sa-116
Test URI:valid/sa/116.xml
Spec Sections:2.11
Description:Test demonstrates that a line break within CDATA will be normalized.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/116.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/116.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa117() {
/*
Test ID:valid-sa-117
Test URI:valid/sa/117.xml
Spec Sections:4.5
Description:Test demonstrates that entity expansion is done while processing entity declarations.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/117.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/117.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa118() {
/*
Test ID:valid-sa-118
Test URI:valid/sa/118.xml
Spec Sections:4.5
Description:Test demonstrates that entity expansion is done while processing entity declarations.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/118.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/118.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(feature = "test-conformance-xml")]
fn validsa119() {
/*
Test ID:valid-sa-119
Test URI:valid/sa/119.xml
Spec Sections:2.5
Description:Comments may contain any legal XML characters; only the string "--" is disallowed.
*/
test_xmltest_valid_sa(
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/119.xml")
.unwrap()
.as_str(),
fs::read_to_string("tests/conformance/xml/xmlconf/xmltest/valid/sa/out/119.xml")
.unwrap()
.as_str(),
);
}