summaryrefslogtreecommitdiff
path: root/result
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-10-14 23:38:43 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-10-14 23:38:43 +0000
commit7eda8452f826744fd6b2875d3a38e8f00602cef3 (patch)
tree8b2e71cc3cc4ffcbab0184e5b282f58bad5dee99 /result
parentff9c33075358e670a8c48bb860b1db6a3d1eae0b (diff)
downloadlibxml2-7eda8452f826744fd6b2875d3a38e8f00602cef3.tar.gz
- HTMLparser.c HTMLtree.[ch] SAX.c testHTML.c tree.c: fixed HTML
support for SCRIPT and STYLE with help from Bjorn Reese - test/HTML/* result/HTML/*: added simple testcase and updated the existing ones. Daniel
Diffstat (limited to 'result')
-rw-r--r--result/HTML/doc2.htm.err2
-rw-r--r--result/HTML/doc2.htm.sax2
-rw-r--r--result/HTML/doc3.htm20
-rw-r--r--result/HTML/doc3.htm.err74
-rw-r--r--result/HTML/doc3.htm.sax77
-rw-r--r--result/HTML/script.html10
-rw-r--r--result/HTML/script.html.err0
-rw-r--r--result/HTML/script.html.sax32
8 files changed, 119 insertions, 98 deletions
diff --git a/result/HTML/doc2.htm.err b/result/HTML/doc2.htm.err
index bf46ffad..d098b471 100644
--- a/result/HTML/doc2.htm.err
+++ b/result/HTML/doc2.htm.err
@@ -1,3 +1,3 @@
-./test/HTML/doc2.htm:10: error: Misplaced DOCTYPE declaration
+./test/HTML/doc2.htm:5: error: Misplaced DOCTYPE declaration
<!-- END Naviscope Javascript --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Tr
^
diff --git a/result/HTML/doc2.htm.sax b/result/HTML/doc2.htm.sax
index 9f635dc5..94f2819e 100644
--- a/result/HTML/doc2.htm.sax
+++ b/result/HTML/doc2.htm.sax
@@ -11,7 +11,7 @@ SAX.endElement(title)
SAX.ignorableWhitespace(
, 1)
SAX.startElement(script, language='javascript')
-SAX.characters(
+SAX.cdata(
NS_ActualOpen=windo, 194)
SAX.endElement(script)
SAX.ignorableWhitespace(
diff --git a/result/HTML/doc3.htm b/result/HTML/doc3.htm
index 1ee19d20..65ab90db 100644
--- a/result/HTML/doc3.htm
+++ b/result/HTML/doc3.htm
@@ -18,7 +18,13 @@ A.nav:hover {
}
</style>
<script language="JavaScript">
-<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) --><!-- Web URL: http://fineline.xs.mw --><!-- This script and many more are available free online at --><!-- The JavaScript Source!! http://javascript.internet.com --><!-- Begin
+<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
+<!-- Web URL: http://fineline.xs.mw -->
+
+<!-- This script and many more are available free online at -->
+<!-- The JavaScript Source!! http://javascript.internet.com -->
+
+<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
@@ -816,7 +822,8 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
</TR>
</TABLE>
--><table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="middle" width="100%">
-<!-- BEGIN GoTo.com Search Box --><script language="javascript" type="text/javascript"><!--
+<!-- BEGIN GoTo.com Search Box --><script language="javascript" type="text/javascript">
+ <!--
if ((parseInt(navigator.appVersion) >= 3)
&& (navigator.appName != "Netscape")) {
document.write("<IFRAME marginheight=0 frameborder=0 ");
@@ -825,7 +832,7 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
document.write("ype=html&size=100x90&url=http://www.goto.co");
document.write("m/d/search/ssn/&target=_blank&Partner=SSN80");
- document.write("42DF8478957377></IFRAME>");
+ document.write("42DF8478957377>");
} else if ((parseInt(navigator.appVersion) > 3)
&& (navigator.appName == "Netscape")) {
document.write("<SCRIPT language=javascript type=text/javas");
@@ -833,7 +840,7 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
document.write("ype=js&size=100x90&url=http://www.goto.com/");
document.write("d/search/ssn/&target=_blank&Partner=SSN8042");
- document.write("DF8478957377></SC");
+ document.write("DF8478957377>");
document.write("RIPT>");
} else {
document.write("<A TARGET=_blank ");
@@ -841,9 +848,10 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
document.write("GIF=true>");
document.write("<IMG ismap ");
document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
- document.write("ype=gif&size=100x90></A>");
+ document.write("ype=gif&size=100x90>");
}
- // --></script>
+ // -->
+ </script>
<b><noscript></noscript></b>
<a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"><img align="bottom" border="0" height="90" ismap src="doc3_files/100x90.gif" width="100"></a>
<b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"></a></b>
diff --git a/result/HTML/doc3.htm.err b/result/HTML/doc3.htm.err
index 51266e19..5a57449d 100644
--- a/result/HTML/doc3.htm.err
+++ b/result/HTML/doc3.htm.err
@@ -1,93 +1,105 @@
-./test/HTML/doc3.htm:10: error: Misplaced DOCTYPE declaration
+./test/HTML/doc3.htm:5: error: Misplaced DOCTYPE declaration
<!-- END Naviscope Javascript --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
^
-./test/HTML/doc3.htm:52: error: htmlParseEntityRef: expecting ';'
+./test/HTML/doc3.htm:47: error: htmlParseEntityRef: expecting ';'
href="http://ads.gamesquad.net/addclick.exe/adclick.cgi?REGION=game|tech|ent&i
^
-./test/HTML/doc3.htm:52: error: htmlParseEntityRef: expecting ';'
+./test/HTML/doc3.htm:47: error: htmlParseEntityRef: expecting ';'
_top"><img src="http://ads.gamesquad.net/addclick.exe/adcycle.cgi?group=52&medi
^
-./test/HTML/doc3.htm:52: error: htmlParseEntityRef: expecting ';'
+./test/HTML/doc3.htm:47: error: htmlParseEntityRef: expecting ';'
><img src="http://ads.gamesquad.net/addclick.exe/adcycle.cgi?group=52&media=1&i
^
-./test/HTML/doc3.htm:145: error: error parsing attribute name
+./test/HTML/doc3.htm:140: error: error parsing attribute name
width=70 Gentus?.?></A><BR><A
^
-./test/HTML/doc3.htm:145: error: htmlParseStartTag: problem parsing attributes
+./test/HTML/doc3.htm:140: error: htmlParseStartTag: problem parsing attributes
width=70 Gentus?.?></A><BR><A
^
-./test/HTML/doc3.htm:145: error: Couldn't find end of Start Tag img
+./test/HTML/doc3.htm:140: error: Couldn't find end of Start Tag img
width=70 Gentus?.?></A><BR><A
^
-./test/HTML/doc3.htm:148: error: Unexpected end tag : p
+./test/HTML/doc3.htm:143: error: Unexpected end tag : p
</P></TD></TR></TBODY></TABLE></CENTER></TD></TR></TBODY></TABLE></CENTER></P
^
-./test/HTML/doc3.htm:236: error: Unexpected end tag : font
+./test/HTML/doc3.htm:231: error: Unexpected end tag : font
Specials<BR><BR></FONT></A><BR></FONT></A><B><FONT color=yellow
^
-./test/HTML/doc3.htm:236: error: Unexpected end tag : a
+./test/HTML/doc3.htm:231: error: Unexpected end tag : a
Specials<BR><BR></FONT></A><BR></FONT></A><B><FONT color=yellow
^
-./test/HTML/doc3.htm:747: error: htmlParseEntityRef: expecting ';'
+./test/HTML/doc3.htm:742: error: htmlParseEntityRef: expecting ';'
er=0 alt="Advertisement" src="http://ads.adflight.com/ad_static.asp?pid=2097&si
^
-./test/HTML/doc3.htm:747: error: htmlParseEntityRef: expecting ';'
+./test/HTML/doc3.htm:742: error: htmlParseEntityRef: expecting ';'
Advertisement" src="http://ads.adflight.com/ad_static.asp?pid=2097&sid=1881&asi
^
-./test/HTML/doc3.htm:747: error: Unexpected end tag : li
+./test/HTML/doc3.htm:742: error: Unexpected end tag : li
light.com/ad_static.asp?pid=2097&sid=1881&asid=7708"></a></IFRAME></CENTER></LI
^
-./test/HTML/doc3.htm:747: error: Unexpected end tag : font
+./test/HTML/doc3.htm:742: error: Unexpected end tag : font
om/ad_static.asp?pid=2097&sid=1881&asid=7708"></a></IFRAME></CENTER></LI></FONT
^
-./test/HTML/doc3.htm:747: error: Unexpected end tag : p
+./test/HTML/doc3.htm:742: error: Unexpected end tag : p
=7708"></a></IFRAME></CENTER></LI></FONT></TD></TR></TBODY></TABLE></CENTER></P
^
-./test/HTML/doc3.htm:772: error: Opening and ending tag mismatch: font and form
+./test/HTML/doc3.htm:767: error: Opening and ending tag mismatch: font and form
archive</A></FONT> </FORM></CENTER></TD></TR></TBODY></TABLE><!--
^
-./test/HTML/doc3.htm:772: error: Unexpected end tag : form
+./test/HTML/doc3.htm:767: error: Unexpected end tag : form
archive</A></FONT> </FORM></CENTER></TD></TR></TBODY></TABLE><!--
^
-./test/HTML/doc3.htm:815: error: Opening and ending tag mismatch: b and noscript
+./test/HTML/doc3.htm:790: error: Unexpected end tag : iframe
+ document.write("42DF8478957377></IFRAME>");
+ ^
+./test/HTML/doc3.htm:798: error: End tag : expected '>'
+ document.write("DF8478957377></SC");
+ ^
+./test/HTML/doc3.htm:798: error: Unexpected end tag : sc
+ document.write("DF8478957377></SC");
+ ^
+./test/HTML/doc3.htm:806: error: Unexpected end tag : a
+ document.write("ype=gif&size=100x90></A>");
+ ^
+./test/HTML/doc3.htm:810: error: Opening and ending tag mismatch: b and noscript
<B><NOSCRIPT></B><A
^
-./test/HTML/doc3.htm:820: error: Unexpected end tag : a
+./test/HTML/doc3.htm:815: error: Unexpected end tag : a
</A></A></B><B></NOSCRIPT></B><B><!-- END GoTo.com Search Box --></
^
-./test/HTML/doc3.htm:820: error: Unexpected end tag : noscript
+./test/HTML/doc3.htm:815: error: Unexpected end tag : noscript
</A></A></B><B></NOSCRIPT></B><B><!-- END GoTo.com Search Box --></
^
-./test/HTML/doc3.htm:826: error: Opening and ending tag mismatch: form and center
+./test/HTML/doc3.htm:821: error: Opening and ending tag mismatch: form and center
</FORM><!-- Pricewatch Search Box --><A
^
-./test/HTML/doc3.htm:833: error: Unexpected end tag : p
+./test/HTML/doc3.htm:828: error: Unexpected end tag : p
Special<BR>Code:BP6-hd</FONT></A> </P></CENTER></TD></TR></TBODY></
^
-./test/HTML/doc3.htm:833: error: Opening and ending tag mismatch: center and table
+./test/HTML/doc3.htm:828: error: Opening and ending tag mismatch: center and table
Special<BR>Code:BP6-hd</FONT></A> </P></CENTER></TD></TR></TBODY></
^
-./test/HTML/doc3.htm:839: error: Unexpected end tag : p
+./test/HTML/doc3.htm:834: error: Unexpected end tag : p
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE>
^
-./test/HTML/doc3.htm:839: error: Unexpected end tag : center
+./test/HTML/doc3.htm:834: error: Unexpected end tag : center
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE>
^
-./test/HTML/doc3.htm:839: error: Unexpected end tag : tr
+./test/HTML/doc3.htm:834: error: Unexpected end tag : tr
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE>
^
-./test/HTML/doc3.htm:839: error: Unexpected end tag : tbody
+./test/HTML/doc3.htm:834: error: Unexpected end tag : tbody
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE>
^
-./test/HTML/doc3.htm:839: error: Unexpected end tag : table
+./test/HTML/doc3.htm:834: error: Unexpected end tag : table
width="100%">&nbsp;</TD></TR></TBODY></TABLE></P></CENTER></TR></TBODY></TABLE>
^
-./test/HTML/doc3.htm:840: error: Unexpected end tag : td
+./test/HTML/doc3.htm:835: error: Unexpected end tag : td
<CENTER></CENTER></TD></TR><TR><TD COLSPAN="3" VALIGN="TOP"
^
-./test/HTML/doc3.htm:840: error: Unexpected end tag : tr
+./test/HTML/doc3.htm:835: error: Unexpected end tag : tr
<CENTER></CENTER></TD></TR><TR><TD COLSPAN="3" VALIGN="TOP"
^
-./test/HTML/doc3.htm:841: error: Unexpected end tag : table
+./test/HTML/doc3.htm:836: error: Unexpected end tag : table
HEIGHT="70">&nbsp;</TD> </TR></TABLE>
^
diff --git a/result/HTML/doc3.htm.sax b/result/HTML/doc3.htm.sax
index ff8f186a..0cd7df16 100644
--- a/result/HTML/doc3.htm.sax
+++ b/result/HTML/doc3.htm.sax
@@ -11,7 +11,7 @@ SAX.endElement(title)
SAX.ignorableWhitespace(
, 2)
SAX.startElement(script, language='javascript')
-SAX.characters(
+SAX.cdata(
NS_ActualOpen=wind, 199)
SAX.endElement(script)
SAX.ignorableWhitespace(
@@ -31,38 +31,15 @@ SAX.endElement(meta)
SAX.ignorableWhitespace(
, 2)
SAX.startElement(style, type='text/css')
-SAX.characters(A.nav {
+SAX.cdata(A.nav {
COLOR: #003399; TEXT, 115)
SAX.endElement(style)
SAX.ignorableWhitespace(
, 4)
SAX.startElement(script, language='JavaScript')
-SAX.characters(
-, 1)
-SAX.comment( Idea by: Nic Wolfe (Nic@TimelapseProductions.com) )
-SAX.characters(
-, 1)
-SAX.comment( Web URL: http://fineline.xs.mw )
-SAX.characters(
-
-, 2)
-SAX.comment( This script and many more are available free online at )
-SAX.characters(
-, 1)
-SAX.comment( The JavaScript Source!! http://javascript.internet.com )
-SAX.characters(
-
-, 2)
-SAX.comment( Begin
-function popUp(URL) {
-day = new Date();
-id = day.getTime();
-eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=145, height=250');");
-}
-// End )
-SAX.characters(
-, 1)
+SAX.cdata(
+&lt;!-- Idea by: Nic Wolfe (, 476)
SAX.endElement(script)
SAX.ignorableWhitespace(
@@ -2717,38 +2694,20 @@ SAX.comment( BEGIN GoTo.com Search Box )
SAX.characters(
, 14)
SAX.startElement(script, language='javascript', type='text/javascript')
-SAX.characters(
- , 9)
-SAX.comment(
- if ((parseInt(navigator.appVersion) >= 3)
- && (navigator.appName != "Netscape")) {
- document.write("<IFRAME marginheight=0 frameborder=0 ");
- document.write("marginwidth=0 scrolling=no width=100 height");
- document.write("=90 ");
- document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
- document.write("ype=html&size=100x90&url=http://www.goto.co");
- document.write("m/d/search/ssn/&target=_blank&Partner=SSN80");
- document.write("42DF8478957377></IFRAME>");
- } else if ((parseInt(navigator.appVersion) > 3)
- && (navigator.appName == "Netscape")) {
- document.write("<SCRIPT language=javascript type=text/javas");
- document.write("cript ");
- document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
- document.write("ype=js&size=100x90&url=http://www.goto.com/");
- document.write("d/search/ssn/&target=_blank&Partner=SSN8042");
- document.write("DF8478957377></SC");
- document.write("RIPT>");
- } else {
- document.write("<A TARGET=_blank ");
- document.write("HREF=http://www.goto.com/d/search/ssn/?from");
- document.write("GIF=true>");
- document.write("<IMG ismap ");
- document.write("SRC=http://www.goto.com/d/ssn/dynconsole/?t");
- document.write("ype=gif&size=100x90></A>");
+SAX.cdata(
+ &lt;!--
+ if ((, 532)
+SAX.error: Unexpected end tag : iframe
+SAX.cdata(");
+ } else if ((parseI, 463)
+SAX.error: End tag : expected '>'
+SAX.error: Unexpected end tag : sc
+SAX.cdata(");
+ document.write("RI, 361)
+SAX.error: Unexpected end tag : a
+SAX.cdata(");
}
- // )
-SAX.characters(
- , 9)
+ // --, 37)
SAX.endElement(script)
SAX.characters(
, 14)
@@ -2916,7 +2875,7 @@ SAX.endElement(div)
SAX.ignorableWhitespace(
, 2)
SAX.startElement(script)
-SAX.characters( window.open=NS_ActualOpen; , 28)
+SAX.cdata( window.open=NS_ActualOpen; , 28)
SAX.endElement(script)
SAX.ignorableWhitespace(
, 2)
diff --git a/result/HTML/script.html b/result/HTML/script.html
new file mode 100644
index 00000000..9f2fab81
--- /dev/null
+++ b/result/HTML/script.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head><title>Script tests</title></head>
+<body>
+<script language="javascript">
+ if (window.open<max) ;
+</script>
+<input onclick="if(window.open&lt;max);">
+</body>
+</html>
diff --git a/result/HTML/script.html.err b/result/HTML/script.html.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/result/HTML/script.html.err
diff --git a/result/HTML/script.html.sax b/result/HTML/script.html.sax
new file mode 100644
index 00000000..3a470619
--- /dev/null
+++ b/result/HTML/script.html.sax
@@ -0,0 +1,32 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(head)
+SAX.startElement(title)
+SAX.characters(Script tests, 12)
+SAX.endElement(title)
+SAX.endElement(head)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(body)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(script, language='javascript')
+SAX.cdata(
+ if (window.open&lt;max) ;, 28)
+SAX.endElement(script)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(input, onclick='if(window.open&lt;max);')
+SAX.endElement(input)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(body)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endDocument()