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

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

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

revision 1.9 by wakaba, Thu Mar 20 05:59:55 2008 UTC revision 1.10 by wakaba, Thu Mar 20 07:37:00 2008 UTC
# Line 476  $Element->{$ATOM_NS}->{entry} = { Line 476  $Element->{$ATOM_NS}->{entry} = {
476          $self->{onerror}->(node => $item->{node},          $self->{onerror}->(node => $item->{node},
477                             type => 'element missing:atom|author',                             type => 'element missing:atom|author',
478                             level => $self->{must_level});                             level => $self->{must_level});
479            $item->{parent_state}->{has_no_author_entry} = 1;#for atom:feed's check
480        } # A        } # A
481      }      }
482    
# Line 517  $Element->{$ATOM_NS}->{feed} = { Line 518  $Element->{$ATOM_NS}->{feed} = {
518      } elsif ($self->{plus_elements}->{$child_nsuri}->{$child_ln}) {      } elsif ($self->{plus_elements}->{$child_nsuri}->{$child_ln}) {
519        #        #
520      } elsif ($child_nsuri eq $ATOM_NS) {      } elsif ($child_nsuri eq $ATOM_NS) {
       ## TODO: MUST author+ unless all entry child has author+.  
521        my $not_allowed;        my $not_allowed;
522        if ($child_ln eq 'entry') {        if ($child_ln eq 'entry') {
523          $element_state->{has_element}->{entry} = 1;          $element_state->{has_element}->{entry} = 1;
# Line 583  $Element->{$ATOM_NS}->{feed} = { Line 583  $Element->{$ATOM_NS}->{feed} = {
583    check_end => sub {    check_end => sub {
584      my ($self, $item, $element_state) = @_;      my ($self, $item, $element_state) = @_;
585    
586        if ($element_state->{has_no_author_entry}) {
587          $self->{onerror}->(node => $item->{node},
588                             type => 'element missing:atom|author',
589                             level => $self->{must_level});
590        }
591    
592      ## TODO: If entry's with same id, then updated SHOULD be different      ## TODO: If entry's with same id, then updated SHOULD be different
593    
594      unless ($element_state->{has_element}->{id}) { # MUST      unless ($element_state->{has_element}->{id}) { # MUST

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24