summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-06-07 06:46:36 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-06-07 06:46:36 +0000
commitb8d90b7104a1258854c90e6391bbf37db900cbf3 (patch)
tree4d228ee34d915939eb8007d5192afd2a1cf19764
parenteff186ba302455501f86ae9c5c923891220f3b82 (diff)
downloadi2c-tools-b8d90b7104a1258854c90e6391bbf37db900cbf3.tar.gz
decode-dimms: Generate XHTML 1.1 compliant markup
In HTML output mode, generate XHTML 1.1 compliant markup. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6183 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES2
-rwxr-xr-xeeprom/decode-dimms24
2 files changed, 14 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index d163de0..750d090 100644
--- a/CHANGES
+++ b/CHANGES
@@ -37,7 +37,7 @@ SVN HEAD
Add support for Load Reduced DIMM (LRDIMM) DDR3 modules
Fully decode the DDR3 SDRAM Device Type field
Encode "degrees" to HTML degree symbol
- Generate HTML 4.01 compliant markup
+ Generate XHTML 1.1 compliant markup
i2cdetect: Do a best effort detection if functionality is missing
Clarify the SMBus commands used for probing by default
i2c-dev.h: Minimize differences with kernel flavor
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index eb7900e..e1de338 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -413,7 +413,7 @@ sub html_encode($)
$text =~ s/</\&lt;/sg;
$text =~ s/>/\&gt;/sg;
$text =~ s/ degrees C/\&deg;C/sg;
- $text =~ s/\n/<br>\n/sg;
+ $text =~ s/\n/<br\/>\n/sg;
return $text;
}
@@ -438,11 +438,11 @@ sub real_printl($$) # print a line w/ label and values
if ($opt_html) {
$label = html_encode($label);
@values = map { html_encode($_) } @values;
- print "<tr><td valign=top>$label</td>";
+ print "<tr><td style=\"vertical-align: top;\">$label</td>";
if (!$opt_merge) {
print "<td>$_</td>" foreach @values;
} elsif ($same_values) {
- print "<td colspan=".(scalar @values).">$values[0]</td>";
+ print "<td colspan=\"".(scalar @values)."\">$values[0]</td>";
} else {
# For HTML output, merge adjacent cells even if
# the whole line cannot be merged.
@@ -451,7 +451,7 @@ sub real_printl($$) # print a line w/ label and values
$colcnt++;
my $value = shift @values;
next if (@values && $value eq $values[0]);
- print "<td" . ($colcnt > 1 ? " colspan=$colcnt" : "") .">$value</td>";
+ print "<td" . ($colcnt > 1 ? " colspan=\"$colcnt\"" : "") .">$value</td>";
$colcnt = 0;
}
}
@@ -508,7 +508,7 @@ sub real_prints($) # print separator w/ given text
$ncol = 1 unless $ncol;
if ($opt_html) {
$label = html_encode($label);
- print "<tr><td align=center colspan=".(1+$ncol)."><b>$label</b></td></tr>\n";
+ print "<tr><td style=\"font-weight: bold; text-align: center;\" colspan=\"".(1+$ncol)."\">$label</td></tr>\n";
} else {
print "\n---=== $label ===---\n";
}
@@ -2167,11 +2167,13 @@ if (!$opt_igncheck) {
if ($opt_html && !$opt_bodyonly) {
- print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n",
- "<html><head>\n",
- "\t<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n",
- "\t<title>PC DIMM Serial Presence Detect Tester/Decoder Output</title>\n",
- "</head><body>\n";
+ print "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n\n",
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\">\n",
+ "<head>\n",
+ "\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n",
+ "\t<title>PC DIMM Serial Presence Detect Tester/Decoder Output</title>\n",
+ "</head>\n\n",
+ "<body>\n";
}
printc("decode-dimms version $revision");
@@ -2355,7 +2357,7 @@ for $current (0 .. $#dimm) {
printl2("\n\nDecoding EEPROM", $dimm[$current]->{file},
"text-decoration: underline; font-weight: bold;");
}
- print "<table border=1>\n" if $opt_html;
+ print "<table border=\"1\">\n" if $opt_html;
my @output = @{$dimm[$current]->{output}};
for (my $line = 0; $line < @output; $line++) {