sometimes in make something that related with HTML and its friends, we usually confused with their language. they 'talked' with different language with us that we called with 'programming language'. this is a little about errors and problem when we interact with the HTML aif (and its friends aka dan kawan kawan)
A WML documents without error
HTTP-Header:
Content-Type: text/vnd.wap.wml; charset=UTF-8
1: <?xml version="1.0" encoding="utf-8"?> 2: <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" 3: "http://www.wapforum.org/DTD/wml13.dtd"> 4: 5: <wml> 6: <card title="Validator"> 7: <do type="prev" label="Back"> 8: <prev/> 9: </do> 10: <p align="center"> 11: Hello world! 12: <br /> 13: </p> 14: </card> 15: </wml>
Uncomplied entities (Entities have to end with a ";")
HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1
1: <?xml version="1.0" encoding="ISO-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
6: <head>
7: <title>incomplete Entity</title>
8: </head>
9: <body>
10: <div title="&"></div>
11: </body>
12: </html>
Missing white space between attributes in XML / HTML documents
HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1
1: <?xml version="1.0" encoding="iso-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
6: <head>
7: <title>no attribute space</title>
8: </head>
9: <body>
10: <p class="CLASS"title='TITLE'/>
11: <!--<p class="CLASS"title='TITLE'/>-->
12: <div><![CDATA[<p class=''title=''></p>]]></div>
13: </body>
14: </html>
Id- and name-Attributes must be identic in some Tags (Id- and name-Attributes which are used at the same time in the Tags "a", "applet", "form", "frame", "iframe", "img" and "map" must have identical values (also according to upper and lower case)..)
HTTP-Header:
Content-Type: text/html; charset=ISO-8859-1
1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
2: "http://www.w3.org/TR/html4/frameset.dtd">
3:
4: <html>
5: <head>
6: <title>missing Anchor</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10:
11: <frameset>
12: <frame id="FRAME-Tag" name="frame-Tag">
13: <frame id="FRAME-Tag2" name="FRAME-Tag2">
14: <noframes>
15: <a id="A-Tag" name="a-Tag" href=""></a>
16: <applet id="APPLET-Tag" name="applet-Tag" width="1" height="1"></applet>
17: <form id="FORM-Tag" name="form-Tag" action=""></form>
18: <img id="IMG-Tag" name="img-Tag" src="" alt="">
19: <map id="MAP-Tag" name="map-Tag"><p></map>
20: <iframe id="IFRAME-Tag" name="iframe-Tag" src=""></iframe>
21:
22: <a id="A-Tag2" name="A-Tag2" href=""></a>
23: <applet id="APPLET-Tag2" name="APPLET-Tag2" width="1" height="1"></applet>
24: <form id="FORM-Tag2" name="FORM-Tag2" action=""></form>
25: <img id="IMG-Tag2" name="IMG-Tag2" src="" alt="">
26: <map id="MAP-Tag2" name="MAP-Tag2"><p></map>
27: <iframe id="IFRAME-Tag2" name="IFRAME-Tag2" src=""></iframe>
28: </noframes>
29: </frameset>
30: </html>
Start-tag not closed (All Tags should be closed with >)
HTTP-Header:
Content-Type: text/html; charset=ISO-8859-1
1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3:
4: <html>
5: <head>
6: <title>unclosed Starttag</title>
7: <meta http-equiv="Content-Type" content="text/html;
8: charset=iso-8859-1">
9: </head>
10: <body>
11: <a href="http://foo.com">
12: <img src="test.gif" alt=""
13: </a>
14: </body>
15: </html>
unallowed characters references (Character references which are not allowedmust be recognized during processing by a validator.)
HTTP-Header:
Content-Type: application/xhtml+xml; charset=UTF-8
1: <?xml version="1.0" encoding="utf-8"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title>Illegal Char-Reference</title>
8: </head>
9: <body>
10: <p></p>
11: <p>�</p>
12: <p>�</p>
13: <p></p>
14: <p></p>
15: <p>𐀀</p>
16: <p></p>
17: <p>�</p>
18: </body>
19: </html>
nested a tags (It is not allowed to nest an a-Tag in a precedent a-Tag.)
HTTP-Header:
Content-Type: application/xhtml+xml; charset=UTF-8
1: <?xml version="1.0" encoding="utf-8"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title></title>
8: </head>
9: <body>
10: <p>
11: <a href="/foo">
12: <em>
13: <a href="/foo">foo</a>
14: </em>
15: </a>
16: </p>
17: </body>
18: </html>
missing declaration of standard script language (Documents without information upon standard script language and containing elements, which specify scripts for embedded events, are not valid.)
HTTP-Header:
Content-Type: application/xhtml+xml; charset=UTF-8
1: <?xml version="1.0" encoding="utf-8"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4:
5: <html xml:lang="de" lang="de" xmlns="http://www.w3.org/1999/xhtml">
6: <head>
7: <title>missing Script-Type</title>
8: </head>
9:
10: <body onload="" />
11: </html>
0 comments:
Post a Comment