23 |
|
|
24 |
## NOTE: Commants and PIs are not explicitly allowed. |
## NOTE: Commants and PIs are not explicitly allowed. |
25 |
|
|
26 |
|
our $IsInHTMLInteractiveContent; # See Whatpm::ContentChecker. |
27 |
|
|
28 |
our $AttrChecker; |
our $AttrChecker; |
29 |
|
|
30 |
## Any element MAY have xml:base, xml:lang |
## Any element MAY have xml:base, xml:lang |
107 |
check_child_element => sub { |
check_child_element => sub { |
108 |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
109 |
$child_is_transparent, $element_state) = @_; |
$child_is_transparent, $element_state) = @_; |
110 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
111 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
112 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
113 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
114 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
187 |
check_child_element => sub { |
check_child_element => sub { |
188 |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
189 |
$child_is_transparent, $element_state) = @_; |
$child_is_transparent, $element_state) = @_; |
190 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
191 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
192 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
193 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
194 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
391 |
|
|
392 |
## NOTE: metadata elements, followed by atom:entry* (no explicit MAY) |
## NOTE: metadata elements, followed by atom:entry* (no explicit MAY) |
393 |
|
|
394 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
395 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
396 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
397 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
398 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
553 |
|
|
554 |
## NOTE: metadata elements, followed by atom:entry* (no explicit MAY) |
## NOTE: metadata elements, followed by atom:entry* (no explicit MAY) |
555 |
|
|
556 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
557 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
558 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
559 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
560 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
753 |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
754 |
$child_is_transparent, $element_state) = @_; |
$child_is_transparent, $element_state) = @_; |
755 |
|
|
756 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
757 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
758 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
759 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
760 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
1130 |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
1131 |
$child_is_transparent, $element_state) = @_; |
$child_is_transparent, $element_state) = @_; |
1132 |
|
|
1133 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
1134 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
1135 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
1136 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
1137 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
1279 |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
my ($self, $item, $child_el, $child_nsuri, $child_ln, |
1280 |
$child_is_transparent, $element_state) = @_; |
$child_is_transparent, $element_state) = @_; |
1281 |
|
|
1282 |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and |
1283 |
|
$IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) { |
1284 |
$self->{onerror}->(node => $child_el, |
$self->{onerror}->(node => $child_el, |
1285 |
type => 'element not allowed:minus', |
type => 'element not allowed:minus', |
1286 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |