Skip to content

Commit 132fb35

Browse files
committed
The XML Parser and XML Pretty Printer are now non-recursive.
1 parent 71ff9a7 commit 132fb35

File tree

19 files changed

+637
-320
lines changed

19 files changed

+637
-320
lines changed

include/tidyplatform.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ extern "C" {
611611
# define TIDY_THREAD_LOCAL __thread
612612
#endif
613613

614+
#ifndef TIDY_INDENTATION_LIMIT
615+
# define TIDY_INDENTATION_LIMIT 50
616+
#endif
617+
614618
typedef unsigned char byte;
615619

616620
typedef uint tchar; /* single, full character */
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Config for test case.
2+
tidy-mark: no
3+
indent: yes
4+
wrap: 999
5+
input-xml: yes
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<!--
2+
This is a sample XML file.
3+
-->
4+
<?xml version="1.0"?>
5+
<catalog>
6+
<book id="bk101">
7+
<author>Gambardella, Matthew</author>
8+
<title>XML Developer's Guide</title>
9+
<genre>Computer</genre>
10+
<price>44.95</price>
11+
<publish_date>2000-10-01</publish_date>
12+
<description>An in-depth look at creating applications
13+
with XML.</description>
14+
</book>
15+
<book id="bk102">
16+
<author>Ralls, Kim</author>
17+
<title>Midnight Rain</title>
18+
<genre>Fantasy</genre>
19+
<price>5.95</price>
20+
<publish_date>2000-12-16</publish_date>
21+
<description>A former architect battles corporate zombies,
22+
an evil sorceress, and her own childhood to become queen
23+
of the world.</description>
24+
</book>
25+
<book id="bk103">
26+
<author>Corets, Eva</author>
27+
<title>Maeve Ascendant</title>
28+
<genre>Fantasy</genre>
29+
<price>5.95</price>
30+
<publish_date>2000-11-17</publish_date>
31+
<description>After the collapse of a nanotechnology
32+
society in England, the young survivors lay the
33+
foundation for a new society.</description>
34+
</book>
35+
<book id="bk104">
36+
<author>Corets, Eva</author>
37+
<title>Oberon's Legacy</title>
38+
<genre>Fantasy</genre>
39+
<price>5.95</price>
40+
<publish_date>2001-03-10</publish_date>
41+
<description>In post-apocalypse England, the mysterious
42+
agent known only as Oberon helps to create a new life
43+
for the inhabitants of London. Sequel to Maeve
44+
Ascendant.</description>
45+
</book>
46+
<book id="bk105">
47+
<author>Corets, Eva</author>
48+
<title>The Sundered Grail</title>
49+
<genre>Fantasy</genre>
50+
<price>5.95</price>
51+
<publish_date>2001-09-10</publish_date>
52+
<description>The two daughters of Maeve, half-sisters,
53+
battle one another for control of England. Sequel to
54+
Oberon's Legacy.</description>
55+
</book>
56+
<book id="bk106">
57+
<author>Randall, Cynthia</author>
58+
<title>Lover Birds</title>
59+
<genre>Romance</genre>
60+
<price>4.95</price>
61+
<publish_date>2000-09-02</publish_date>
62+
<description>When Carla meets Paul at an ornithology
63+
conference, tempers fly as feathers get ruffled.</description>
64+
</book>
65+
<book id="bk107">
66+
<author>Thurman, Paula</author>
67+
<title>Splish Splash</title>
68+
<genre>Romance</genre>
69+
<price>4.95</price>
70+
<publish_date>2000-11-02</publish_date>
71+
<description>A deep sea diver finds true love twenty
72+
thousand leagues beneath the sea.</description>
73+
</book>
74+
<book id="bk108">
75+
<author>Knorr, Stefan</author>
76+
<title>Creepy Crawlies</title>
77+
<genre>Horror</genre>
78+
<price>4.95</price>
79+
<publish_date>2000-12-06</publish_date>
80+
<description>An anthology of horror stories about roaches,
81+
centipedes, scorpions and other insects.</description>
82+
</book>
83+
<book id="bk109">
84+
<author>Kress, Peter</author>
85+
<title>Paradox Lost</title>
86+
<genre>Science Fiction</genre>
87+
<price>6.95</price>
88+
<publish_date>2000-11-02</publish_date>
89+
<description>After an inadvertant trip through a Heisenberg
90+
Uncertainty Device, James Salway discovers the problems
91+
of being quantum.</description>
92+
</book>
93+
<book id="bk110">
94+
<author>O'Brien, Tim</author>
95+
<title>Microsoft .NET: The Programming Bible</title>
96+
<genre>Computer</genre>
97+
<price>36.95</price>
98+
<publish_date>2000-12-09</publish_date>
99+
<description>Microsoft's .NET initiative is explored in
100+
detail in this deep programmer's reference.</description>
101+
</book>
102+
<book id="bk111">
103+
<author>O'Brien, Tim</author>
104+
<title>MSXML3: A Comprehensive Guide</title>
105+
<genre>Computer</genre>
106+
<price>36.95</price>
107+
<publish_date>2000-12-01</publish_date>
108+
<description>The Microsoft MSXML3 parser is covered in
109+
detail, with attention to XML DOM interfaces, XSLT processing,
110+
SAX and more.</description>
111+
</book>
112+
<book id="bk112">
113+
<author>Galos, Mike</author>
114+
<title>Visual Studio 7: A Comprehensive Guide</title>
115+
<genre>Computer</genre>
116+
<price>49.95</price>
117+
<publish_date>2001-04-16</publish_date>
118+
<description>Microsoft Visual Studio 7 is explored in depth,
119+
looking at how Visual Basic, Visual C++, C#, and ASP+ are
120+
integrated into a comprehensive development
121+
environment.</description>
122+
</book>
123+
</catalog>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
This is a sample XML file.
4+
-->
5+
<catalog>
6+
<book id="bk101">
7+
<author>Gambardella, Matthew</author>
8+
<title>XML Developer's Guide</title>
9+
<genre>Computer</genre>
10+
<price>44.95</price>
11+
<publish_date>2000-10-01</publish_date>
12+
<description>An in-depth look at creating applications with XML.</description>
13+
</book>
14+
<book id="bk102">
15+
<author>Ralls, Kim</author>
16+
<title>Midnight Rain</title>
17+
<genre>Fantasy</genre>
18+
<price>5.95</price>
19+
<publish_date>2000-12-16</publish_date>
20+
<description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description>
21+
</book>
22+
<book id="bk103">
23+
<author>Corets, Eva</author>
24+
<title>Maeve Ascendant</title>
25+
<genre>Fantasy</genre>
26+
<price>5.95</price>
27+
<publish_date>2000-11-17</publish_date>
28+
<description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description>
29+
</book>
30+
<book id="bk104">
31+
<author>Corets, Eva</author>
32+
<title>Oberon's Legacy</title>
33+
<genre>Fantasy</genre>
34+
<price>5.95</price>
35+
<publish_date>2001-03-10</publish_date>
36+
<description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description>
37+
</book>
38+
<book id="bk105">
39+
<author>Corets, Eva</author>
40+
<title>The Sundered Grail</title>
41+
<genre>Fantasy</genre>
42+
<price>5.95</price>
43+
<publish_date>2001-09-10</publish_date>
44+
<description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description>
45+
</book>
46+
<book id="bk106">
47+
<author>Randall, Cynthia</author>
48+
<title>Lover Birds</title>
49+
<genre>Romance</genre>
50+
<price>4.95</price>
51+
<publish_date>2000-09-02</publish_date>
52+
<description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description>
53+
</book>
54+
<book id="bk107">
55+
<author>Thurman, Paula</author>
56+
<title>Splish Splash</title>
57+
<genre>Romance</genre>
58+
<price>4.95</price>
59+
<publish_date>2000-11-02</publish_date>
60+
<description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description>
61+
</book>
62+
<book id="bk108">
63+
<author>Knorr, Stefan</author>
64+
<title>Creepy Crawlies</title>
65+
<genre>Horror</genre>
66+
<price>4.95</price>
67+
<publish_date>2000-12-06</publish_date>
68+
<description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description>
69+
</book>
70+
<book id="bk109">
71+
<author>Kress, Peter</author>
72+
<title>Paradox Lost</title>
73+
<genre>Science Fiction</genre>
74+
<price>6.95</price>
75+
<publish_date>2000-11-02</publish_date>
76+
<description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description>
77+
</book>
78+
<book id="bk110">
79+
<author>O'Brien, Tim</author>
80+
<title>Microsoft .NET: The Programming Bible</title>
81+
<genre>Computer</genre>
82+
<price>36.95</price>
83+
<publish_date>2000-12-09</publish_date>
84+
<description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description>
85+
</book>
86+
<book id="bk111">
87+
<author>O'Brien, Tim</author>
88+
<title>MSXML3: A Comprehensive Guide</title>
89+
<genre>Computer</genre>
90+
<price>36.95</price>
91+
<publish_date>2000-12-01</publish_date>
92+
<description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description>
93+
</book>
94+
<book id="bk112">
95+
<author>Galos, Mike</author>
96+
<title>Visual Studio 7: A Comprehensive Guide</title>
97+
<genre>Computer</genre>
98+
<price>49.95</price>
99+
<publish_date>2001-04-16</publish_date>
100+
<description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description>
101+
</book>
102+
</catalog>

regression_testing/cases/legacy-cases/case-480406.conf

Lines changed: 0 additions & 3 deletions
This file was deleted.

regression_testing/cases/legacy-cases/[email protected]

Lines changed: 0 additions & 4 deletions
This file was deleted.

regression_testing/cases/legacy-cases/case-634889.conf

Lines changed: 0 additions & 10 deletions
This file was deleted.

regression_testing/cases/legacy-cases/[email protected]

Lines changed: 0 additions & 9 deletions
This file was deleted.

regression_testing/cases/legacy-cases/[email protected]

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)