a need for in C, but I include it here on the off chance that someone might find it of use: When we see a "EpE" token, we go lookup up the lineage for a p element we might have to minimize. At first sight, we might say that if there's a p anywhere in the lineage of this new p, it should be closed. But that's wrong. Consider this document: foo

foo
foo

bar

The second p is quite legally inside a much higher p. My formalization of the reason why this is legal, but this:

foo

bar

isn't, is that something about the table constitutes a "barrier" to the application of the rule about what p must minimize. So C<@HTML::Tagset::p_closure_barriers> is the list of all such barrier-tags. =cut @p_closure_barriers = qw( li blockquote ul ol menu dir dl dt dd td th tr table caption div ); # In an ideal world (i.e., XHTML) we wouldn't have to bother with any of this # monkey business of barriers to minimization! =head2 hashset %isCDATA_Parent This hashset includes all elements whose content is CDATA. =cut %isCDATA_Parent = map {; $_ => 1 } qw(script style xmp listing plaintext); # TODO: there's nothing else that takes CDATA children, right? # As the HTML3 DTD (Raggett 1995-04-24) noted: # The XMP, LISTING and PLAINTEXT tags are incompatible with SGML # and derive from very early versions of HTML. They require non- # standard parsers and will cause problems for processing # documents with standard SGML tools. =head1 CAVEATS You may find it useful to alter the behavior of modules (like C or C) that use C's data tables by altering the data tables themselves. You are welcome to try, but be careful; and be aware that different modules may or may react differently to the data tables being changed. Note that it may be inappropriate to use these tables for I HTML -- for example, C<%isHeadOrBodyElement> lists the tagnames for all elements that can appear either in the head or in the body, such as "script". That doesn't mean that I am saying your code that produces HTML should feel free to put script elements in either place! If you are producing programs that spit out HTML, you should be I familiar with the DTDs for HTML or XHTML (available at C), and you should slavishly obey them, not the data tables in this document. =head1 SEE ALSO L, L, L =head1 COPYRIGHT & LICENSE Copyright 1995-2000 Gisle Aas. Copyright 2000-2005 Sean M. Burke. Copyright 2005-2008 Andy Lester. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 ACKNOWLEDGEMENTS Most of the code/data in this module was adapted from code written by Gisle Aas for C, C, and C. Then it was maintained by Sean M. Burke. =head1 AUTHOR Current maintainer: Andy Lester, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =cut 1;