/[suikacvs]/markup/html/whatpm/Whatpm/ContentChecker.pm
Suika

Diff of /markup/html/whatpm/Whatpm/ContentChecker.pm

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

revision 1.36 by wakaba, Mon Jul 16 14:28:35 2007 UTC revision 1.37 by wakaba, Tue Jul 17 13:54:57 2007 UTC
# Line 56  my $AttrChecker = { Line 56  my $AttrChecker = {
56        if ($self->{id}->{$value}) { ## NOTE: An xml:id error        if ($self->{id}->{$value}) { ## NOTE: An xml:id error
57          $self->{onerror}->(node => $attr, level => 'error',          $self->{onerror}->(node => $attr, level => 'error',
58                             type => 'duplicate ID');                             type => 'duplicate ID');
59            push @{$self->{id}->{$value}}, $attr;
60        } else {        } else {
61          $self->{id}->{$value} = 1;          $self->{id}->{$value} = [$attr];
62        }        }
63      },      },
64    },    },
# Line 951  my $HTMLAttrChecker = { Line 952  my $HTMLAttrChecker = {
952      if (length $value > 0) {      if (length $value > 0) {
953        if ($self->{id}->{$value}) {        if ($self->{id}->{$value}) {
954          $self->{onerror}->(node => $attr, type => 'duplicate ID');          $self->{onerror}->(node => $attr, type => 'duplicate ID');
955            push @{$self->{id}->{$value}}, $attr;
956        } else {        } else {
957          $self->{id}->{$value} = 1;          $self->{id}->{$value} = [$attr];
958        }        }
959        if ($value =~ /[\x09-\x0D\x20]/) {        if ($value =~ /[\x09-\x0D\x20]/) {
960          $self->{onerror}->(node => $attr, type => 'space in ID');          $self->{onerror}->(node => $attr, type => 'space in ID');
# Line 2220  $Element->{$HTML_NS}->{map} = { Line 2222  $Element->{$HTML_NS}->{map} = {
2222        if (length $value > 0) {        if (length $value > 0) {
2223          if ($self->{id}->{$value}) {          if ($self->{id}->{$value}) {
2224            $self->{onerror}->(node => $attr, type => 'duplicate ID');            $self->{onerror}->(node => $attr, type => 'duplicate ID');
2225              push @{$self->{id}->{$value}}, $attr;
2226          } else {          } else {
2227            $self->{id}->{$value} = 1;            $self->{id}->{$value} = [$attr];
2228          }          }
2229        } else {        } else {
2230          ## NOTE: MUST contain at least one character          ## NOTE: MUST contain at least one character
# Line 2837  $Element->{$HTML_NS}->{menu} = { Line 2840  $Element->{$HTML_NS}->{menu} = {
2840        if (length $value > 0) {        if (length $value > 0) {
2841          if ($self->{id}->{$value}) {          if ($self->{id}->{$value}) {
2842            $self->{onerror}->(node => $attr, type => 'duplicate ID');            $self->{onerror}->(node => $attr, type => 'duplicate ID');
2843              push @{$self->{id}->{$value}}, $attr;
2844          } else {          } else {
2845            $self->{id}->{$value} = 1;            $self->{id}->{$value} = [$attr];
2846          }          }
2847        } else {        } else {
2848          ## NOTE: MUST contain at least one character          ## NOTE: MUST contain at least one character
# Line 2989  sub check_element ($$$) { Line 2993  sub check_element ($$$) {
2993    $self->{menu} = {};    $self->{menu} = {};
2994    $self->{has_link_type} = {};    $self->{has_link_type} = {};
2995    $self->{return} = {    $self->{return} = {
2996      table => [], term => $self->{term},      id => $self->{id}, table => [], term => $self->{term},
2997    };    };
2998    
2999    my @todo = ({type => 'element', node => $el});    my @todo = ({type => 'element', node => $el});

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24