33 |
exit; |
exit; |
34 |
} |
} |
35 |
|
|
36 |
|
my @nav; |
37 |
print STDOUT qq[Content-Type: text/html; charset=utf-8 |
print STDOUT qq[Content-Type: text/html; charset=utf-8 |
38 |
|
|
39 |
<!DOCTYPE html> |
<!DOCTYPE html> |
40 |
<html lang="en"> |
<html lang="en"> |
41 |
<head> |
<head> |
42 |
<title>Web Document Conformance Checker (BETA)</title> |
<title>Web Document Conformance Checker (BETA)</title> |
43 |
<link rel="stylesheet" href="/www/style/html/xhtml"> |
<link rel="stylesheet" href="../cc-style.css" type="text/css"> |
|
<style> |
|
|
q { |
|
|
white-space: pre; |
|
|
white-space: -moz-pre-wrap; |
|
|
white-space: pre-wrap; |
|
|
} |
|
|
</style> |
|
44 |
</head> |
</head> |
45 |
<body> |
<body> |
46 |
<h1>Web Document Conformance Checker (<em>beta</em>)</h1> |
<h1>Web Document Conformance Checker (<em>beta</em>)</h1> |
47 |
|
|
48 |
|
<div id="document-info" section="section"> |
49 |
<dl> |
<dl> |
50 |
<dt>Document URI</dt> |
<dt>Document URI</dt> |
51 |
<dd><code class="URI" lang=""><<a href="@{[htescape $input_uri]}">@{[htescape $input_uri]}</a>></code></dd> |
<dd><code class="URI" lang=""><<a href="@{[htescape $input_uri]}">@{[htescape $input_uri]}</a>></code></dd> |
52 |
<dt>Internet Media Type</dt> |
<dt>Internet Media Type</dt> |
53 |
<dd><code class="MIME" lang="en">@{[htescape $input_format]}</code></dd> |
<dd><code class="MIME" lang="en">@{[htescape $input_format]}</code></dd> |
54 |
]; # no </dl> yet |
]; # no </dl> yet |
55 |
|
push @nav, ['#document-info' => 'Information']; |
56 |
|
|
57 |
require Message::DOM::DOMImplementation; |
require Message::DOM::DOMImplementation; |
58 |
my $dom = Message::DOM::DOMImplementation->____new; |
my $dom = Message::DOM::DOMImplementation->____new; |
69 |
<dt>Character Encoding</dt> |
<dt>Character Encoding</dt> |
70 |
<dd>(none)</dd> |
<dd>(none)</dd> |
71 |
</dl> |
</dl> |
72 |
|
</div> |
73 |
|
|
74 |
<div id="source-string" class="section"> |
<div id="source-string" class="section"> |
75 |
|
<h2>Document Source</h2> |
76 |
]; |
]; |
77 |
|
push @nav, ['#source-string' => 'Source']; |
78 |
print_source_string (\$s); |
print_source_string (\$s); |
79 |
print STDOUT qq[ |
print STDOUT qq[ |
80 |
</div> |
</div> |
84 |
|
|
85 |
<ul> |
<ul> |
86 |
]; |
]; |
87 |
|
push @nav, ['#parse-errors' => 'Parse Error']; |
88 |
|
|
89 |
my $onerror = sub { |
my $onerror = sub { |
90 |
my (%opt) = @_; |
my (%opt) = @_; |
120 |
<dt>Character Encoding</dt> |
<dt>Character Encoding</dt> |
121 |
<dd>(none)</dd> |
<dd>(none)</dd> |
122 |
</dl> |
</dl> |
123 |
|
</div> |
124 |
|
|
125 |
<div id="source-string" class="section"> |
<div id="source-string" class="section"> |
126 |
|
<h2>Document Source</h2> |
127 |
]; |
]; |
128 |
|
push @nav, ['#source-string' => 'Source']; |
129 |
print_source_string (\$t); |
print_source_string (\$t); |
130 |
print STDOUT qq[ |
print STDOUT qq[ |
131 |
</div> |
</div> |
135 |
|
|
136 |
<ul> |
<ul> |
137 |
]; |
]; |
138 |
|
push @nav, ['#parse-errors' => 'Parse Error']; |
139 |
|
|
140 |
my $onerror = sub { |
my $onerror = sub { |
141 |
my $err = shift; |
my $err = shift; |
158 |
print STDOUT qq[ |
print STDOUT qq[ |
159 |
</dl> |
</dl> |
160 |
|
|
161 |
|
<div id="result-summary" class="section"> |
162 |
<p><em>Media type <code class="MIME" lang="en">@{[htescape $input_format]}</code> is not supported!</em></p> |
<p><em>Media type <code class="MIME" lang="en">@{[htescape $input_format]}</code> is not supported!</em></p> |
163 |
|
</div> |
164 |
]; |
]; |
165 |
|
push @nav, ['#result-summary' => 'Result']; |
166 |
} |
} |
167 |
|
|
168 |
|
|
171 |
<div id="document-tree" class="section"> |
<div id="document-tree" class="section"> |
172 |
<h2>Document Tree</h2> |
<h2>Document Tree</h2> |
173 |
]; |
]; |
174 |
|
push @nav, ['#document-tree' => 'Tree']; |
175 |
|
|
176 |
print_document_tree ($el || $doc); |
print_document_tree ($el || $doc); |
177 |
|
|
183 |
|
|
184 |
<ul> |
<ul> |
185 |
]; |
]; |
186 |
|
push @nav, ['#document-errors' => 'Document Error']; |
187 |
|
|
188 |
require Whatpm::ContentChecker; |
require Whatpm::ContentChecker; |
189 |
my $onerror = sub { |
my $onerror = sub { |
206 |
} |
} |
207 |
|
|
208 |
## TODO: Show result |
## TODO: Show result |
209 |
|
|
210 |
print STDOUT qq[ |
print STDOUT qq[ |
211 |
|
<ul class="navigation" id="nav-items"> |
212 |
|
]; |
213 |
|
for (@nav) { |
214 |
|
print STDOUT qq[<li><a href="$_->[0]">$_->[1]</a></li>]; |
215 |
|
} |
216 |
|
print STDOUT qq[ |
217 |
|
</ul> |
218 |
</body> |
</body> |
219 |
</html> |
</html> |
220 |
]; |
]; |