1 |
<!DOCTYPE html> |
2 |
<html lang="en"> |
3 |
<head> |
4 |
<title>HTML5 Parser Web Interface</title> |
5 |
<style type="text/css"> |
6 |
form { |
7 |
display: block; |
8 |
position: relative; |
9 |
height: 20em; |
10 |
margin-left: 1em; |
11 |
margin-right: 1em; |
12 |
} |
13 |
form > fieldset { |
14 |
display: block; |
15 |
position: absolute; |
16 |
top: 0; left: 0; |
17 |
width: 40%; bottom: 0; |
18 |
margin: 0; |
19 |
border-style: none; |
20 |
padding: 0; |
21 |
} |
22 |
iframe { |
23 |
display: block; |
24 |
position: absolute; |
25 |
top: 0; right: 0; |
26 |
width: 40%; bottom: 0; |
27 |
margin: 0; |
28 |
} |
29 |
textarea { |
30 |
width: 100%; |
31 |
height: 19em; |
32 |
} |
33 |
button { |
34 |
display: block; |
35 |
position: absolute; |
36 |
top: 9em; |
37 |
left: 110%; |
38 |
} |
39 |
button:after { |
40 |
content: " ->"; |
41 |
} |
42 |
form > fieldset > fieldset { |
43 |
display: block; |
44 |
position: absolute; |
45 |
top: 11em; |
46 |
left: 103%; |
47 |
border-style: none; |
48 |
padding: 0; |
49 |
min-width: 7em; |
50 |
} |
51 |
form > fieldset > fieldset fieldset { |
52 |
font-size: 60%; |
53 |
} |
54 |
fieldset p { |
55 |
margin-top: 0; |
56 |
margin-bottom: 0; |
57 |
} |
58 |
#element { |
59 |
width: 5em; |
60 |
} |
61 |
</style> |
62 |
</head> |
63 |
<body onload="document.getElementById('element').disabled=!document.getElementById('html5').checked"> |
64 |
<h1>HTML5 Parser (<em>beta</em>) Web Interface |
65 |
(manakai Version)</h1> |
66 |
|
67 |
<form action="parser-manakai/html" |
68 |
method="post" accept-charset="utf-8" target="result" |
69 |
onsubmit=" |
70 |
var uri = 'parser-manakai/'; |
71 |
if (document.getElementById ('html5').checked) { |
72 |
uri += 'html/'; |
73 |
uri += document.getElementById ('element').value + '/'; |
74 |
} else if (document.getElementById ('h2h').checked) { |
75 |
uri += 'h2h/'; |
76 |
uri += document.getElementById ('element').value + '/'; |
77 |
} else { |
78 |
uri += 'xhtml/'; |
79 |
uri += '/'; |
80 |
} |
81 |
if (document.getElementById ('format-test').checked) { |
82 |
this.action = uri + 'test'; |
83 |
} else if (document.getElementById ('format-xml').checked) { |
84 |
this.action = uri + 'xml'; |
85 |
} else { |
86 |
this.action = uri + 'html'; |
87 |
} |
88 |
"> |
89 |
<fieldset> |
90 |
<p><textarea name="s"><!DOCTYPE html> |
91 |
<html> |
92 |
<head> |
93 |
<title></title> |
94 |
</head> |
95 |
<body></body> |
96 |
</html> |
97 |
</textarea></p> |
98 |
<p><button type="submit">Parse</button></p> |
99 |
<fieldset> |
100 |
<fieldset> |
101 |
<p><label title="Show any HTML5 parse errors if checked"><input type="radio" name="input-format" id="html5" onchange="element.disabled = false" checked> HTML5</label></p> |
102 |
<p><label title="Show any XML 1.0/1.1 parse errors if checked (using a non-validating parser)"><input type="radio" name="input-format" onchange="element.disabled = true" id="xhtml5"> XHTML5</label></p> |
103 |
<p><label title="Parse as H2H document if checked"><input type="radio" name="input-format" id="h2h" onchange="element.disabled = true"> H2H</label></p> |
104 |
<p><input type="text" name="element" id="element" value="" title="If specified, the input is parsed by the fragment parsing (innerHTML) algorithm."></p> |
105 |
<p><label title="Show any conformance error of the parsed DOM tree if checked"><input type="checkbox" name="dom5"> DOM5 HTML</label></p> |
106 |
</fieldset> |
107 |
<fieldset> |
108 |
<legend>Output format</legend> |
109 |
<p><label title="Show the value of |document.innerHTML| (in HTML) if checked"><input type="radio" name="format" value="html" checked id="format-html"> |
110 |
<code>innerHTML</code> (HTML)</label></p> |
111 |
<p><label title="Show the value of |document.innerHTML| (in XML) if checked"><input type="radio" name="format" value="xml" id="format-xml"> |
112 |
<code>innerHTML</code> (XML)</label></p> |
113 |
<p><label title="Show the parsed DOM in the format used in html5lib tests"><input type="radio" name="format" value="test" id="format-test"> |
114 |
parser test</label></p> |
115 |
</fieldset> |
116 |
</fieldset> |
117 |
|
118 |
</fieldset> |
119 |
|
120 |
<p><iframe name="result" src="about:blank"></iframe></p> |
121 |
</form> |
122 |
|
123 |
<address>Powered by |
124 |
<a href="http://suika.fam.cx/www/markup/html/whatpm/readme">Whatpm</a> |
125 |
and |
126 |
<a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>.</address> |
127 |
|
128 |
</body> |
129 |
</html> |