*** /cygdrive/e/HOME/src/hns-2.10-pl1/public_html/diary/lib/HNS/Hnf/Command.pm Sun Dec 24 17:26:14 2000 --- /cygdrive/e/HOME/public_html/diary/lib/HNS/Hnf/Command.pm Fri Apr 6 00:06:34 2001 *************** *** 32,41 **** $Entities{'Inline'} = [$Entities{'Link'}, $Entities{'Decoration'}, $Entities{'Image'}, $Entities{'Replace'}, ! $Entities{'Comment'}]; $Entities{'Cite'} = ['CITE', 'PRE','INCLUDE']; ! $Entities{'List'} = ['UL', 'OL', 'DL']; $Entities{'Block'} = [$Entities{'Cite'}, $Entities{'List'}, 'P', 'DIV']; $Entities{'Flow'} = [$Entities{'Inline'}, $Entities{'Block'}]; --- 32,41 ---- $Entities{'Inline'} = [$Entities{'Link'}, $Entities{'Decoration'}, $Entities{'Image'}, $Entities{'Replace'}, ! $Entities{'Comment'},'TAG']; #added $Entities{'Cite'} = ['CITE', 'PRE','INCLUDE']; ! $Entities{'List'} = ['UL', 'OL', 'DL' ,'TABLE']; #added $Entities{'Block'} = [$Entities{'Cite'}, $Entities{'List'}, 'P', 'DIV']; $Entities{'Flow'} = [$Entities{'Inline'}, $Entities{'Block'}]; *************** *** 357,362 **** --- 357,363 ---- $OmittableEnd = 1; # or 0 $Template = "

\n"; $EndTemplate = "

\n"; + $CountName = 'p'; #added # DIV command package HNS::Hnf::Command::DIV; *************** *** 890,895 **** --- 891,992 ---- *%fn:%content); $AllowCommands = ['LINK', 'STRIKE']; + + ################################################### + # Table Commands + # TABLE + package HNS::Hnf::Command::TABLE; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + + @ISA = qw(HNS::Hnf::Command::List); + # $Template = "\n"; + # $Template = qq(
%content
\n); + $Template = qq(
%content
\n); + + $EndTemplate = "
%content
\n"; + $AllowCommands = ['TR', 'TD', 'TH']; + $NumAttr = 2; + + sub AsHTML ($$$) + { + my ($self, $start, $params) = @_; + my %loc = (r=>'align="right"', c=>'align="center"', l=>'align="left"' , n=>'' ); + my $align = $loc{$self->{attr}->[1]}; + + $params->{align} = $align; + return $self->SUPER::AsHTML($start, $params); + } + + + + # TR + package HNS::Hnf::Command::TR; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + + @ISA = qw(HNS::Hnf::Command::List); + $Template = q(); + $EndTemplate = "\n"; + $OmittableEnd = 1; + # $AllowCommands = [$HNS::Hnf::Command::Entities{'Inline'}]; + $AllowCommands = [$HNS::Hnf::Command::Entities{'Flow'}]; + $AllowCommands = ['TD','TH']; + + + # TD + package HNS::Hnf::Command::TD; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + + @ISA = qw(HNS::Hnf::Command::Block); + $Template = q(%content); + $EndTemplate = ""; + $OmittableEnd = 1; + $AllowCommands = [$HNS::Hnf::Command::Entities{'Flow'}]; + + # TH + package HNS::Hnf::Command::TH; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + + @ISA = qw(HNS::Hnf::Command::Block); + $Template = q(%content); + $EndTemplate = ""; + $OmittableEnd = 1; + $AllowCommands = [$HNS::Hnf::Command::Entities{'Flow'}]; + + # TAG + package HNS::Hnf::Command::TAG; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + @ISA = qw(HNS::Hnf::Command::Inline); + $AllowCommands = ['']; + $Template = "%term"; + $OmittableEnd = 1; + sub AsHTML ($$$) + { + my ($self, $start, $params) = @_; + my $term = $self->{arg_content}; + $term =~ s/&/&/g; + $term =~ s/<//g; + $params->{term} = $term; + $self->SUPER::AsHTML($start, $params); + } + + + + # RAW + package HNS::Hnf::Command::RAW; + use vars qw(@ISA $Template $EndTemplate $NumAttr $IsOneline $AllowCommands + $IsBeginSection $CountName $OmittableEnd); + @ISA = qw(HNS::Hnf::Command::Block); + $AllowCommands = ['']; + $Template = "\n%content"; + $EndTemplate = ""; + $OmittableEnd = 1; + 1;