/[suikacvs]/test/html-webhacc/cc.cgi
Suika

Diff of /test/html-webhacc/cc.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Wed Jun 27 12:35:24 2007 UTC revision 1.3 by wakaba, Wed Jun 27 13:30:15 2007 UTC
# Line 33  my $http = SuikaWiki::Input::HTTP->new; Line 33  my $http = SuikaWiki::Input::HTTP->new;
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="">&lt;<a href="@{[htescape $input_uri]}">@{[htescape $input_uri]}</a>&gt;</code></dd>      <dd><code class="URI" lang="">&lt;<a href="@{[htescape $input_uri]}">@{[htescape $input_uri]}</a>&gt;</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;
# Line 73  my $http = SuikaWiki::Input::HTTP->new; Line 69  my $http = SuikaWiki::Input::HTTP->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>
# Line 85  my $http = SuikaWiki::Input::HTTP->new; Line 84  my $http = SuikaWiki::Input::HTTP->new;
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) = @_;
# Line 120  my $http = SuikaWiki::Input::HTTP->new; Line 120  my $http = SuikaWiki::Input::HTTP->new;
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>
# Line 132  my $http = SuikaWiki::Input::HTTP->new; Line 135  my $http = SuikaWiki::Input::HTTP->new;
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;
# Line 154  my $http = SuikaWiki::Input::HTTP->new; Line 158  my $http = SuikaWiki::Input::HTTP->new;
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    
# Line 164  my $http = SuikaWiki::Input::HTTP->new; Line 171  my $http = SuikaWiki::Input::HTTP->new;
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    
# Line 175  my $http = SuikaWiki::Input::HTTP->new; Line 183  my $http = SuikaWiki::Input::HTTP->new;
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 {
# Line 197  my $http = SuikaWiki::Input::HTTP->new; Line 206  my $http = SuikaWiki::Input::HTTP->new;
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  ];  ];

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24