224 |
## NOTE: |check_start| is invoked before anything on the element's |
## NOTE: |check_start| is invoked before anything on the element's |
225 |
## attributes and contents is checked. |
## attributes and contents is checked. |
226 |
check_start => sub { }, |
check_start => sub { }, |
227 |
## NOTE: |check_attrs| is invoked after |check_start| and before |
## NOTE: |check_attrs| and |check_attrs2| are invoked after |
228 |
## anything on the element's contents is checked. |
## |check_start| and before anything on the element's contents is |
229 |
|
## checked. |check_attrs| is invoked immediately before |
230 |
|
## |check_attrs2|. |
231 |
check_attrs => sub { |
check_attrs => sub { |
232 |
my ($self, $item, $element_state) = @_; |
my ($self, $item, $element_state) = @_; |
233 |
for my $attr (@{$item->{node}->attributes}) { |
for my $attr (@{$item->{node}->attributes}) { |
262 |
$self->_attr_status_info ($attr, $status); |
$self->_attr_status_info ($attr, $status); |
263 |
} |
} |
264 |
}, |
}, |
265 |
|
check_attrs2 => sub { }, |
266 |
## NOTE: |check_child_element| is invoked for each occurence of |
## NOTE: |check_child_element| is invoked for each occurence of |
267 |
## child elements. It is invoked after |check_attrs| and before |
## child elements. It is invoked after |check_attrs| and before |
268 |
## |check_end|. |check_child_element| and |check_child_text| are |
## |check_end|. |check_child_element| and |check_child_text| are |
655 |
my @new_item; |
my @new_item; |
656 |
push @new_item, [$eldef->{check_start}, $self, $item, $element_state]; |
push @new_item, [$eldef->{check_start}, $self, $item, $element_state]; |
657 |
push @new_item, [$eldef->{check_attrs}, $self, $item, $element_state]; |
push @new_item, [$eldef->{check_attrs}, $self, $item, $element_state]; |
658 |
|
push @new_item, [$eldef->{check_attrs2}, $self, $item, $element_state]; |
659 |
|
|
660 |
my @child = @{$item->{node}->child_nodes}; |
my @child = @{$item->{node}->child_nodes}; |
661 |
while (@child) { |
while (@child) { |