--- test/html-webhacc/WebHACC/Result.pm	2008/08/22 13:08:12	1.15
+++ test/html-webhacc/WebHACC/Result.pm	2008/09/14 06:33:27	1.20
@@ -117,6 +117,8 @@
       $column = $opt{column};
     }
   }
+  $line += $opt{line_diff} || 0 if defined $line;
+  $column += $opt{column_diff} || 0 if defined $column;
   $line = $line - 1 || 1
       if defined $line and not (defined $column and $column > 0);
 
@@ -170,7 +172,37 @@
 
   if (defined $opt{value}) {
     $out->html (' ');
-    $out->code ($opt{value});
+    if (defined $opt{pos_start}) {
+      $out->start_tag ('code');
+      $out->text (substr $opt{value}, 0, $opt{pos_start});
+      $out->start_tag ('mark');
+      $out->text (substr $opt{value}, $opt{pos_start},
+                      $opt{pos_end} - $opt{pos_start} + 1);
+      $out->end_tag ('mark');
+      $out->text (substr $opt{value}, $opt{pos_end} + 1)
+          if $opt{pos_end} < length $opt{value};
+      $out->end_tag ('code');
+    } elsif ($opt{value_mark_end}) {
+      $out->start_tag ('code');
+      $out->text ($opt{value});
+      $out->start_tag ('mark');
+      $out->end_tag ('mark');
+      $out->end_tag ('code');
+    } elsif (defined $opt{value_mark}) {
+      $out->start_tag ('code');
+      for (split /($opt{value_mark})/, $opt{value}) {
+        if (/$opt{value_mark}/) {
+          $out->start_tag ('mark');
+          $out->text ($_);
+          $out->end_tag ('mark');
+        } else {
+          $out->text ($_);
+        }
+      }
+      $out->end_tag ('code');
+    } else {
+      $out->code ($opt{value});
+    }
     $has_location = 1;
   }
 
@@ -205,7 +237,8 @@
   ## Error message
   my $error_type_text = $opt{type};
   $out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text},
-                 value => $opt{value});
+                 value => $opt{value}, char => $opt{char},
+                 octets => $opt{octets});
   
   ## Link to a long description
 
@@ -290,8 +323,9 @@
        target => 'parse-errors', score_base => 10,
        parent_status => $maindoc_status},
       {label => 'Char L.', status => $self->{layers}->{charset},
-       score_base => 10,
+       target => 'parse-errors', score_base => 10,
        parent_status => $maindoc_status},
+      ## TODO: char semantics layer
       {label => 'Syntax L.', status => $self->{layers}->{syntax},
        target => 'parse-errors', score_base => 20,
        parent_status => $maindoc_status},