diff -ru MarekPodHtml-0.49-orig/lib/Marek/Pod/HTML.pm MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm
--- MarekPodHtml-0.49-orig/lib/Marek/Pod/HTML.pm 2003-01-16 21:49:00.000000000 +0100
+++ MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm 2004-05-16 21:08:32.000000000 +0200
@@ -170,6 +170,25 @@
When using the default customization, this flag enables or disables
the navigation in the header of each Pod document.
+=item B<-title> I
+
+The string that is used for the document title.
+Default is the name of the file, or 'POD'.
+
+=item B<-lang> I
+
+The language of the document, specified using the corresponding
+ISO-639 two-letters code and an optional subcode. For example
+use C to specify French, C for British English. Check
+the section 8.1 of the HTML-4.01 specification for more information.
+
+=item B<-encoding> I
+
+The encoding of the document, specified using the corresponding
+code. For example use C to specify this encoding.
+Default is 'ISO-8859-1'. Check the section 5.2 of the HTML-4.01
+specification for more information.
+
=item B<-toc> I
If true, a table of contents is built from the processed Pod documents.
@@ -406,8 +425,8 @@
my @index;
# propagate some of the options
my %conv_opts;
- for(qw(-suffix -navigation -localtoc -toc -tocname -toctitle -idx
- -idxname -idxtitle -idxopt -stylesheet -verbose -banner)) {
+ for(qw(-suffix -navigation -title -localtoc -toc -tocname -toctitle -idx
+ -idxname -idxtitle -idxopt -stylesheet -verbose -banner -lang -encoding)) {
$conv_opts{$_} = $opts{$_};
}
@@ -784,7 +803,7 @@
if($self->{-toc}) {
my $td = HTML::Element->new('td', align => 'right', width => '1%');
- my $anchor = HTML::Element->new('a', CLASS => 'POD_NAVLILNK',
+ my $anchor = HTML::Element->new('a', CLASS => 'POD_NAVLINK',
href => _construct_file_name($self->{-tocname}, $self->depth(), $self->{-suffix}));
my $text = '['.$self->{-toctitle}.']';
$text =~ s/\s+/$NBSP/g;
@@ -899,7 +918,7 @@
my $self = shift;
($self->{_html}, $self->{_head}, $self->{_body}) =
- _basic_html();
+ _basic_html($self->{-encoding}, $self->{-lang});
$self->{_current} = $self->{_body};
$self->{_current_head1_title} = '';
}
@@ -1484,11 +1503,14 @@
# setup the basic frame for a HTML tree
sub _basic_html
{
+ my($encoding,$lang) = @_;
my $html = HTML::Element->new('html');
+ $html->attr(lang => $lang, 'xml:lang' => $lang);
my $head = HTML::Element->new('head');
+ $encoding ||= 'ISO-8859-1';
$head->push_content("\n",
HTML::Element->new('meta', 'http-equiv' => 'Content-Type',
- content => 'text/html; charset=ISO-8859-1'), "\n",
+ content => "text/html; charset=$encoding"), "\n",
HTML::Element->new('meta', 'http-equiv' => 'Content-Style-Type',
content => 'text/css'), "\n",
HTML::Element->new('meta', 'name' => 'GENERATOR',
@@ -1617,8 +1639,10 @@
my $self = shift;
if(defined $self->{_toc}) {
my $level = 1;
- my @hier = ( HTML::Element->new('ul') );
- $hier[0]->push_content("\n");
+ my @hier = ( HTML::Element->new('ul', id => 'PODTOC') );
+ $hier[0]->push_content("\n",
+ HTML::Element->new('li', id => 'PODTOC_TITLE'),
+ $self->{-toctitle}, "\n");
$self->{_body}->unshift_content("\n", $hier[0], "\n",
HTML::Element->new('hr'));
foreach(@{$self->{_toc}}) {
diff -ru MarekPodHtml-0.49-orig/scripts/mpod2html.PL MarekPodHtml-0.49/scripts/mpod2html.PL
--- MarekPodHtml-0.49-orig/scripts/mpod2html.PL 2003-01-16 21:48:59.000000000 +0100
+++ MarekPodHtml-0.49/scripts/mpod2html.PL 2004-05-16 20:56:43.000000000 +0200
@@ -46,6 +46,9 @@
filesuffix=s
dir=s
libpods=s
+ title=s
+ lang=s
+ encoding=s
navigation!
localtoc!
toc!
@@ -183,6 +186,9 @@
-dir => $opt{dir},
-libpods => $opt{libpods},
-navigation => $opt{navigation},
+ -title => $opt{title},
+ -lang => $opt{lang},
+ -encoding => $opt{encoding},
-localtoc => $opt{localtoc},
-toc => $opt{toc},
-idx => $opt{idx},
@@ -220,6 +226,9 @@
S<[ B<-dir> I ]> S<[ B<-libpods> I ]>
S<[ B<->(B)B ]>
S<[ B<->(B)B ]>
+S<[ B<-title> I ]>
+S<[ B<-lang> I ]>
+S<[ B<-encoding> I ]>
S<[ B<->(B)B ]> S<[ B<-tocname> I ]>
S<[ B<-toctitle> I ]>
S<[ B<->(B)B ]> S<[ B<-idxopt> I ]>
@@ -313,6 +322,25 @@
the navigation in the header of each Pod document (next/previous doc,
table of contents, index).
+=item B<-title> I
+
+The string that is used for the document title.
+Default is the name of the file, or 'POD'.
+
+=item B<-lang> I
+
+The language of the document, specified using the corresponding
+ISO-639 two-letters code and an optional subcode. For example
+use C to specify French, C for British English. Check
+the section 8.1 of the HTML-4.01 specification for more information.
+
+=item B<-encoding> I
+
+The encoding of the document, specified using the corresponding
+code. For example use C to specify this encoding.
+Default is 'ISO-8859-1'. Check the section 5.2 of the HTML-4.01
+specification for more information.
+
=item B<-toc> | B<-notoc>
If true, a table of contents is built from the processed Pod documents.