51 |
<html lang="en"> |
<html lang="en"> |
52 |
<head> |
<head> |
53 |
<title>HTML5 Table Structure Viewer</title> |
<title>HTML5 Table Structure Viewer</title> |
54 |
|
<!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]--> |
55 |
<script src="../table-script.js" type="text/javascript"></script> |
<script src="../table-script.js" type="text/javascript"></script> |
56 |
</head> |
</head> |
57 |
<body> |
<body> |
58 |
<noscript><p>How great the world without any script were!</p></noscript> |
<noscript><p>How great if there were no script at all!</p></noscript> |
59 |
'; |
'; |
60 |
|
|
61 |
my $i = 0; |
my $i = 0; |
63 |
$i++; print STDOUT "<h1>Table $i</h1>\n"; |
$i++; print STDOUT "<h1>Table $i</h1>\n"; |
64 |
|
|
65 |
my $table = Whatpm::HTMLTable->form_table ($table_el); |
my $table = Whatpm::HTMLTable->form_table ($table_el); |
66 |
|
Whatpm::HTMLTable->assign_header ($table); |
67 |
|
|
68 |
for (@{$table->{column_group}}, @{$table->{column}}) { |
delete $table->{element}; |
69 |
|
|
70 |
|
for (@{$table->{column_group}}, @{$table->{column}}, $table->{caption}, |
71 |
|
@{$table->{row}}) { |
72 |
next unless $_; |
next unless $_; |
73 |
delete $_->{element}; |
delete $_->{element}; |
74 |
} |
} |
85 |
for (@{$_}) { |
for (@{$_}) { |
86 |
next unless $_; |
next unless $_; |
87 |
for (@$_) { |
for (@$_) { |
88 |
|
$_->{id} = ''.$_->{element} if defined $_->{element}; |
89 |
delete $_->{element}; |
delete $_->{element}; |
90 |
|
$_->{is_header} = $_->{is_header} ? 1 : 0; |
91 |
} |
} |
92 |
} |
} |
93 |
} |
} |
94 |
|
|
95 |
print STDOUT '<script type="text/javascript"> |
print STDOUT '<script type="text/javascript"> |
96 |
tableToCanvas ( |
tableToCanvas ( |
97 |
'; |
'; |
98 |
print STDOUT objToJson ($table); |
print STDOUT objToJson ($table); |
99 |
print STDOUT '); |
print STDOUT ', document.body, ""); |
100 |
</script>'; |
</script>'; |
101 |
} |
} |
102 |
|
|
113 |
|
|
114 |
=head1 LICENSE |
=head1 LICENSE |
115 |
|
|
116 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
Copyright 2007-2008 Wakaba <w@suika.fam.cx> |
117 |
|
|
118 |
This library is free software; you can redistribute it |
This library is free software; you can redistribute it |
119 |
and/or modify it under the same terms as Perl itself. |
and/or modify it under the same terms as Perl itself. |