/[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.97 by wakaba, Sun Sep 21 09:45:02 2008 UTC revision 1.98 by wakaba, Sun Sep 21 11:55:49 2008 UTC
# Line 121  our $AttrChecker = { Line 121  our $AttrChecker = {
121        ## no author requirement on conformance in the XML Base specification.        ## no author requirement on conformance in the XML Base specification.
122      },      },
123      id => sub {      id => sub {
124        my ($self, $attr) = @_;        my ($self, $attr, $item, $element_state) = @_;
125        my $value = $attr->value;        my $value = $attr->value;
126        $value =~ s/[\x09\x0A\x0D\x20]+/ /g;        $value =~ s/[\x09\x0A\x0D\x20]+/ /g;
127        $value =~ s/^\x20//;        $value =~ s/^\x20//;
# Line 135  our $AttrChecker = { Line 135  our $AttrChecker = {
135          push @{$self->{id}->{$value}}, $attr;          push @{$self->{id}->{$value}}, $attr;
136        } else {        } else {
137          $self->{id}->{$value} = [$attr];          $self->{id}->{$value} = [$attr];
138            $self->{id_type}->{$value} = $element_state->{id_type} || '';
139        }        }
140      },      },
141    },    },
# Line 558  sub check_element ($$$;$) { Line 559  sub check_element ($$$;$) {
559    $self->{plus_elements} = {};    $self->{plus_elements} = {};
560    $self->{minus_elements} = {};    $self->{minus_elements} = {};
561    $self->{id} = {};    $self->{id} = {};
562      $self->{id_type} = {}; # 'menu' / 'labelable'
563    $self->{form} = {};    $self->{form} = {};
564    $self->{term} = {};    $self->{term} = {};
565    $self->{usemap} = [];    $self->{usemap} = [];
# Line 565  sub check_element ($$$;$) { Line 567  sub check_element ($$$;$) {
567    $self->{template} = []; # datatemplate template references    $self->{template} = []; # datatemplate template references
568    $self->{contextmenu} = [];    $self->{contextmenu} = [];
569    $self->{map} = {};    $self->{map} = {};
   $self->{menu} = {};  
570    $self->{has_link_type} = {};    $self->{has_link_type} = {};
571    $self->{flag} = {};    $self->{flag} = {};
572    #$self->{has_uri_attr};    #$self->{has_uri_attr};
# Line 778  next unless $code;## TODO: temp. Line 779  next unless $code;## TODO: temp.
779    }    }
780    
781    for (@{$self->{contextmenu}}) {    for (@{$self->{contextmenu}}) {
782      unless ($self->{menu}->{$_->[0]}) {      if ($self->{id}->{$_->[0]} and
783            $self->{id_type}->{$_->[0]} eq 'menu') {
784          #
785        } else {
786        $self->{onerror}->(node => $_->[1], type => 'no referenced menu',        $self->{onerror}->(node => $_->[1], type => 'no referenced menu',
787                           level => $self->{level}->{must});                           level => $self->{level}->{must});
788      }      }
# Line 788  next unless $code;## TODO: temp. Line 792  next unless $code;## TODO: temp.
792    delete $self->{minus_elements};    delete $self->{minus_elements};
793    delete $self->{onerror};    delete $self->{onerror};
794    delete $self->{id};    delete $self->{id};
795      delete $self->{id_type};
796    delete $self->{form};    delete $self->{form};
797    delete $self->{usemap};    delete $self->{usemap};
798    delete $self->{ref};    delete $self->{ref};

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24