/[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.10 by wakaba, Thu Mar 20 07:37:00 2008 UTC revision 1.11 by wakaba, Thu Mar 20 08:04:58 2008 UTC
# Line 587  $Element->{$ATOM_NS}->{feed} = { Line 587  $Element->{$ATOM_NS}->{feed} = {
587        $self->{onerror}->(node => $item->{node},        $self->{onerror}->(node => $item->{node},
588                           type => 'element missing:atom|author',                           type => 'element missing:atom|author',
589                           level => $self->{must_level});                           level => $self->{must_level});
590          ## ISSUE: If there is no |atom:entry| element,
591          ## there should be an |atom:author| element?
592      }      }
593    
594      ## TODO: If entry's with same id, then updated SHOULD be different      ## TODO: If entry's with same id, then updated SHOULD be different
# Line 617  $Element->{$ATOM_NS}->{content} = { Line 619  $Element->{$ATOM_NS}->{content} = {
619    check_start => sub {    check_start => sub {
620      my ($self, $item, $element_state) = @_;      my ($self, $item, $element_state) = @_;
621      $element_state->{type} = 'text';      $element_state->{type} = 'text';
622        $element_state->{text} = '';
623    },    },
624    check_attrs => $GetAtomAttrsChecker->({    check_attrs => $GetAtomAttrsChecker->({
625      src => sub {      src => sub {
# Line 746  $Element->{$ATOM_NS}->{content} = { Line 749  $Element->{$ATOM_NS}->{content} = {
749        }        }
750      }      }
751    
752      ## type=html      $element_state->{text} .= $child_node->data;
       ## TODO: SHOULD be suitable for handling as HTML [HTML4]  
       # markup MUST be escaped  
       ## TODO: HTML SHOULD be valid as if within <div>  
753    
754      ## NOTE: type=text/* has no further restriction (i.e. the content don't      ## NOTE: type=text/* has no further restriction (i.e. the content don't
755      ## have to conform to the definition of the type).      ## have to conform to the definition of the type).
# Line 778  $Element->{$ATOM_NS}->{content} = { Line 778  $Element->{$ATOM_NS}->{content} = {
778                             type => 'element missing:div',                             type => 'element missing:div',
779                             level => $self->{must_level});                             level => $self->{must_level});
780        }        }
781        } elsif ($element_state->{type} eq 'html') {
782          ## TODO: SHOULD be suitable for handling as HTML [HTML4]
783          # markup MUST be escaped
784          $self->{onsubdoc}->({s => $element_state->{text},
785                               container_node => $item->{node},
786                               media_type => 'text/html',
787                               inner_html_element => 'div',
788                               is_char_string => 1});
789      } elsif ($element_state->{type} eq 'xml') {      } elsif ($element_state->{type} eq 'xml') {
790        ## NOTE: SHOULD be suitable for handling as $value.        ## NOTE: SHOULD be suitable for handling as $value.
791        ## If no @src, this would normally mean it contains a        ## If no @src, this would normally mean it contains a
# Line 788  $Element->{$ATOM_NS}->{content} = { Line 796  $Element->{$ATOM_NS}->{content} = {
796                           value => $item->{node}->get_attribute_ns                           value => $item->{node}->get_attribute_ns
797                               (undef, 'type'));                               (undef, 'type'));
798      } elsif ($element_state->{type} eq 'text' or      } elsif ($element_state->{type} eq 'text' or
              $element_state->{type} eq 'html' or  
799               $element_state->{type} eq 'mime-text') {               $element_state->{type} eq 'mime-text') {
800        #        #
801      } else {      } else {

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24