/[suikacvs]/test/html-webhacc/WebHACC/Language/Base.pm
Suika

Diff of /test/html-webhacc/WebHACC/Language/Base.pm

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

revision 1.1 by wakaba, Sun Jul 20 14:58:24 2008 UTC revision 1.2 by wakaba, Sun Jul 20 16:53:10 2008 UTC
# Line 5  sub new ($) { Line 5  sub new ($) {
5    die "$0: No constructor is defined for " . ref $_[0];    die "$0: No constructor is defined for " . ref $_[0];
6  } # new  } # new
7    
8    ## NOTE:
9    ## Language ->input, ->output, ->result
10    ## Input
11    ## Output ->input
12    ## Result ->output
13    
14  sub input ($;$) {  sub input ($;$) {
15    if (@_ > 1) {    if (@_ > 1) {
16      if (defined $_[1]) {      if (defined $_[1]) {
# Line 54  sub onsubdoc ($;$) { Line 60  sub onsubdoc ($;$) {
60  } # onsubdoc  } # onsubdoc
61    
62  sub generate_syntax_error_section ($) {  sub generate_syntax_error_section ($) {
63    die "$0: Syntactical checking for " . ref $_[0] . " is not supported";    die "$0: Syntactical checking for " . (ref $_[0]) . " is not supported";
64  } # generate_syntax_error_section  } # generate_syntax_error_section
65    
66  sub generate_structure_dump_section ($) {  sub generate_structure_dump_section ($) {
# Line 160  sub generate_url_section ($) { Line 166  sub generate_url_section ($) {
166      $out->start_tag ('dt');      $out->start_tag ('dt');
167      $out->url ($url);      $out->url ($url);
168      $out->start_tag ('dd');      $out->start_tag ('dd');
169      $out->link ('Check conformance of this document',      $out->link_to_webhacc ('Check conformance of this document', url => $url);
                 url => _get_cc_url ($url));  
170      $out->html ('<dd>Found in: <ul>');      $out->html ('<dd>Found in: <ul>');
171      for my $entry (@{$urls->{$url}}) {      for my $entry (@{$urls->{$url}}) {
172        $out->html (qq[<li>] . $result->get_node_link ($input, $entry->{node}));        $out->html (qq[<li>] . $result->get_node_link ($input, $entry->{node}));
# Line 189  sub generate_url_section ($) { Line 194  sub generate_url_section ($) {
194    $out->end_section;    $out->end_section;
195  } # generate_url_section  } # generate_url_section
196    
 sub _encode_url_component ($) {  
   require Encode;  
   my $s = Encode::encode ('utf8', shift);  
   $s =~ s/([^0-9A-Za-z_.~-])/sprintf '%%%02X', ord $1/ge;  
   return $s;  
 } # _encode_url_component  
   
 sub _get_cc_url ($) {  
   return './?uri=' . _encode_url_component ($_[0]);  
 } # _get_cc_url  
   
197  1;  1;

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24