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 |
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 { |
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). |
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 |
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 { |