| 77 |
able to detect all the errors in the DOM tree, and it I<might> |
able to detect all the errors in the DOM tree, and it I<might> |
| 78 |
detect an error for a node that is conforming in fact. |
detect an error for a node that is conforming in fact. |
| 79 |
|
|
| 80 |
|
=head1 NOTES ON IMPLEMENTATION DETAILS |
| 81 |
|
|
| 82 |
|
I<This section is not complete.> |
| 83 |
|
|
| 84 |
|
This section describes various internal constructions used in |
| 85 |
|
L<Whatpm::ContentChecker> and relevant modules. These data structures |
| 86 |
|
are not public interfaces -- they should not be accessed or modified |
| 87 |
|
by applications. They are documented here for the convenience of |
| 88 |
|
development only. |
| 89 |
|
|
| 90 |
|
=head2 The C<< $self->{flag} >> Structure |
| 91 |
|
|
| 92 |
|
=over 4 |
| 93 |
|
|
| 94 |
|
=item C<< $self->{flag}->{has_label} >> |
| 95 |
|
|
| 96 |
|
This flag is set to a true value if and only if there is a C<label> |
| 97 |
|
element ancestor of the current node. |
| 98 |
|
|
| 99 |
|
=item C<< $self->{flag}->{has_labelable} >> |
| 100 |
|
|
| 101 |
|
This flag is set to C<1> if and only if a nearest ancestor C<label> |
| 102 |
|
element has the C<for> attribute and there is no labelable |
| 103 |
|
form-associated element that is a descendant of the C<label> element |
| 104 |
|
and precedes the current node in tree order. This flag is set to C<2> |
| 105 |
|
if and only if there is a labelable form-associated element that is a |
| 106 |
|
descendant of the nearest ancestor C<label> element of the current |
| 107 |
|
node and precedes the current node in tree order. This flag is |
| 108 |
|
otherwise set to a false value. B<However>, when there is no ancestor |
| 109 |
|
C<label> element of the current node, i.e. when |
| 110 |
|
C<< $self->{flag}->{has_label} >> is false, the value of the |
| 111 |
|
C<< $self->{flag}->{has_labelable} >> flag is I<undefined>. |
| 112 |
|
|
| 113 |
|
=back |
| 114 |
|
|
| 115 |
|
=head2 The C<$element_state> Structure |
| 116 |
|
|
| 117 |
|
=over 4 |
| 118 |
|
|
| 119 |
|
=item C<< $element_state->{has_label_original} >> |
| 120 |
|
|
| 121 |
|
Used to preserve the value of C<< $self->{flag}->{has_label} >> at the |
| 122 |
|
time of invocation of the method C<element_start> for the element |
| 123 |
|
being checked. |
| 124 |
|
|
| 125 |
|
=item C<< $element_state->{has_labelable_original} >> |
| 126 |
|
|
| 127 |
|
Used to preserve the value of C<< $self->{flag}->{has_labelable} >> at |
| 128 |
|
the time of invocation of the method C<element_start> for the element |
| 129 |
|
being checked. |
| 130 |
|
|
| 131 |
|
=back |
| 132 |
|
|
| 133 |
=head1 SEE ALSO |
=head1 SEE ALSO |
| 134 |
|
|
| 135 |
L<Whatpm::ContentChecker::Atom> |
L<Whatpm::ContentChecker::Atom> |
| 144 |
|
|
| 145 |
=head1 LICENSE |
=head1 LICENSE |
| 146 |
|
|
| 147 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
Copyright 2007-2008 Wakaba <w@suika.fam.cx> |
| 148 |
|
|
| 149 |
This library is free software; you can redistribute it |
This library is free software; you can redistribute it |
| 150 |
and/or modify it under the same terms as Perl itself. |
and/or modify it under the same terms as Perl itself. |