398 |
rights => 1, |
rights => 1, |
399 |
source => 1, |
source => 1, |
400 |
summary => 1, |
summary => 1, |
|
## TODO: MUST if child::content/@src | child::content/@type = IMT, !text/ !/xml !+xml |
|
401 |
title => 1, |
title => 1, |
402 |
updated => 1, |
updated => 1, |
403 |
}->{$child_ln}) { |
}->{$child_ln}) { |
508 |
$self->{onerror}->(node => $item->{node}, |
$self->{onerror}->(node => $item->{node}, |
509 |
type => 'element missing:atom|link|alternate'); |
type => 'element missing:atom|link|alternate'); |
510 |
} |
} |
511 |
|
|
512 |
|
if ($element_state->{require_summary} and |
513 |
|
not $element_state->{has_element}->{summary}) { |
514 |
|
$self->{onerror}->(node => $item->{node}, |
515 |
|
type => 'element missing:atom|summary', |
516 |
|
level => $self->{must_level}); |
517 |
|
} |
518 |
}, |
}, |
519 |
}; |
}; |
520 |
|
|
645 |
my ($self, $attr, $item, $element_state) = @_; |
my ($self, $attr, $item, $element_state) = @_; |
646 |
|
|
647 |
$element_state->{has_src} = 1; |
$element_state->{has_src} = 1; |
648 |
|
$item->{parent_state}->{require_summary} = 1; |
649 |
|
|
650 |
## NOTE: There MUST NOT be any white space. |
## NOTE: There MUST NOT be any white space. |
651 |
Whatpm::URIChecker->check_iri_reference ($attr->value, sub { |
Whatpm::URIChecker->check_iri_reference ($attr->value, sub { |
702 |
} elsif ($value =~ m!^(?>message|multipart)/!i) { |
} elsif ($value =~ m!^(?>message|multipart)/!i) { |
703 |
$self->{onerror}->(node => $attr, type => 'IMT:composite', |
$self->{onerror}->(node => $attr, type => 'IMT:composite', |
704 |
level => $self->{must_level}); |
level => $self->{must_level}); |
705 |
|
$item->{parent_state}->{require_summary} = 1; |
706 |
|
} else { |
707 |
|
$item->{parent_state}->{require_summary} = 1; |
708 |
} |
} |
709 |
|
|
710 |
$element_state->{type} = $value; |
$element_state->{type} = $value; |
785 |
$self->{onerror}->(node => $item->{node}, |
$self->{onerror}->(node => $item->{node}, |
786 |
type => 'attribute missing:type', |
type => 'attribute missing:type', |
787 |
level => $self->{should_level}); |
level => $self->{should_level}); |
788 |
} |
} elsif ($element_state->{type} eq 'text' or |
789 |
if ($element_state->{type} eq 'text' or |
$element_state->{type} eq 'html' or |
790 |
$element_state->{type} eq 'html' or |
$element_state->{type} eq 'xhtml') { |
|
$element_state->{type} eq 'xhtml') { |
|
791 |
$self->{onerror} |
$self->{onerror} |
792 |
->(node => $item->{node}->get_attribute_node_ns (undef, 'type'), |
->(node => $item->{node}->get_attribute_node_ns (undef, 'type'), |
793 |
type => 'not IMT', level => $self->{must_level}); |
type => 'not IMT', level => $self->{must_level}); |