299
299
my ( $title ) = $chap->getChildrenByTagName( "title" );
300
300
my ( $ttlabbr ) = $chap->getChildrenByTagName( "titleabbrev" );
301
301
my $str = $ttlabbr->string_value() . " - ".$title->string_value();
302
$self->{OFILE}->print( "=head1 NAME\n\n$str\n\n" );
302
$str=~s/^\s+|\s+$//g;
303
$self->{OFILE}->print( "=head1 NAME\n\n$str\n" );
303
304
my ($synopsis) = $chap->findnodes( "sect1[title='Synopsis']" );
304
305
my @funcs = $chap->findnodes( ".//funcsynopsis" );
305
306
if ($synopsis or scalar @funcs) {
306
$self->{OFILE}->print( "=head1 SYNOPSIS\n\n" )
307
$self->{OFILE}->print( "\n=head1 SYNOPSIS\n\n" )
309
310
$self->dump_pod( $synopsis );
409
411
my ( $term ) = $node->findnodes( "term" );
410
412
$self->{OFILE}->print( "=item " );
411
413
if ( defined $term ) {
412
$self->{OFILE}->print( "B<".$term->string_value().">" );
414
$self->dump_pod( $term );
414
416
$self->{OFILE}->print( "\n\n" );
415
417
my @nodes =$node->findnodes( "listitem" );
422
424
my $str = $node->string_value();
423
425
$str =~ s/^\s+|\s+$//g;
424
426
$str =~ s/\n/\n /g;
427
$str=~s/(^|\n)[ \t]+($|\n)/$1$2/g;
425
428
$self->{OFILE}->print( "\n\n" );
426
429
$self->{OFILE}->print( " ". $str );
427
430
$self->{OFILE}->print( "\n\n" );
453
456
my $str = $node->string_value() ;
454
457
my $url = $node->getAttribute('url');
455
458
$str =~ s/\n/ /g;
456
$self->{OFILE}->print( "L<<<<<< $str|$url >>>>>>" );
460
$self->{OFILE}->print( "L<<<<<< $url >>>>>>" );
462
$self->{OFILE}->print( "$str (L<<<<<< $url >>>>>>)" );
457
464
} elsif( $node->nodeName() eq "xref" ) {
458
465
my $linkend = $node->getAttribute('linkend');
459
my ($target) = $node->findnodes(qq(//*[\@id="$linkend"]/title));
466
my ($target) = $node->findnodes(qq(//*[\@id="$linkend"]/titleabbrev));
467
($target) = $node->findnodes(qq(//*[\@id="$linkend"]/title)) unless $target;
461
469
my $str = $target->string_value() ;
462
470
$str =~ s/\n/ /g;
463
$self->{OFILE}->print( "L<<<<<< $str|$str >>>>>>" );
471
$self->{OFILE}->print( "L<<<<<< $str >>>>>>" );
465
473
warn "WARNING: Didn't find any section with id='$linkend'\n";
466
474
$self->{OFILE}->print( "$linkend" );
468
476
} elsif( $node->nodeName() eq "olink" ) {
469
477
my $str = $node->string_value() ;
470
my $url = $node->getAttribute('target');
478
my $url = $node->getAttribute('targetdoc');
480
warn $node->toString(1),"\n";
471
482
$str =~ s/\n/ /g;
472
$self->{OFILE}->print( "L<<<<<< $str|$url >>>>>>" );
484
$self->{OFILE}->print( "L<<<<<< $url >>>>>>" );
486
$self->{OFILE}->print( "$str (L<<<<<< $url >>>>>>)" );
474
489
print STDERR "Ignoring ",$node->nodeName(),"\n";
475
490
$self->dump_pod($node);