/[suikacvs]/markup/html/whatpm/Whatpm/HTML.pm.src
Suika

Diff of /markup/html/whatpm/Whatpm/HTML.pm.src

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.158 by wakaba, Sun Aug 31 12:11:42 2008 UTC revision 1.159 by wakaba, Fri Sep 5 17:57:47 2008 UTC
# Line 708  sub new ($) { Line 708  sub new ($) {
708    my $class = shift;    my $class = shift;
709    my $self = bless {    my $self = bless {
710      level => {must => 'm',      level => {must => 'm',
711                  should => 's',
712                warn => 'w',                warn => 'w',
713                info => 'i',                info => 'i',
714                uncertain => 'u'},                uncertain => 'u'},
# Line 3154  sub _tree_construction_initial ($) { Line 3155  sub _tree_construction_initial ($) {
3155        ## language.        ## language.
3156        my $doctype_name = $token->{name};        my $doctype_name = $token->{name};
3157        $doctype_name = '' unless defined $doctype_name;        $doctype_name = '' unless defined $doctype_name;
3158        $doctype_name =~ tr/a-z/A-Z/;        $doctype_name =~ tr/a-z/A-Z/; # ASCII case-insensitive
3159        if (not defined $token->{name} or # <!DOCTYPE>        if (not defined $token->{name} or # <!DOCTYPE>
           defined $token->{public_identifier} or  
3160            defined $token->{system_identifier}) {            defined $token->{system_identifier}) {
3161          !!!cp ('t1');          !!!cp ('t1');
3162          !!!parse-error (type => 'not HTML5', token => $token);          !!!parse-error (type => 'not HTML5', token => $token);
3163        } elsif ($doctype_name ne 'HTML') {        } elsif ($doctype_name ne 'HTML') {
3164          !!!cp ('t2');          !!!cp ('t2');
         ## ISSUE: ASCII case-insensitive? (in fact it does not matter)  
3165          !!!parse-error (type => 'not HTML5', token => $token);          !!!parse-error (type => 'not HTML5', token => $token);
3166          } elsif (defined $token->{public_identifier}) {
3167            if ($token->{public_identifier} eq 'XSLT-compat') {
3168              !!!cp ('t1.2');
3169              !!!parse-error (type => 'XSLT-compat', token => $token,
3170                              level => $self->{level}->{should});
3171            } else {
3172              !!!parse-error (type => 'not HTML5', token => $token);
3173            }
3174        } else {        } else {
3175          !!!cp ('t3');          !!!cp ('t3');
3176            #
3177        }        }
3178                
3179        my $doctype = $self->{document}->create_document_type_definition        my $doctype = $self->{document}->create_document_type_definition

Legend:
Removed from v.1.158  
changed lines
  Added in v.1.159

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24