Hi,
the HTML::Tagset manual defines the array
@HTML::Tagset::p_closure_barriers. I don't understand the rationale
behind this. The given example:
<html>
<head>
<title>foo</title>
</head>
<body>
<p>foo
<table>
<tr>
<td>
foo
<p>bar
</td>
</tr>
</table>
</p>
</body>
</html>
_isn't_ legal. In SGML elements, that have optional end-tags are
implicitly closed, if an element, that could not be contained inside the
element (i.e. that is not part of the content model) occurs. Try to
validate the example at [1] and you'll get
Line 17, character 8:
</p>
^Error: end tag for element P which is not open; try removing the
end tag or check for improper nesting of elements
The parse tree of the document is something like
<html>
<head>
<title>
foo
</title>
</head>
<body>
<p>
foo
</p>
<table>
<tbody>
<tr>
<td>
foo
<p>
bar
</p>
</td>
</tr>
</tbody>
</table>
</p>
^^^^
error, the element was already closed
</body>
</html>
[1] http://www.htmlhelp.com/tools/validator/direct.html
--
Björn Höhrmann ^ mailto:[EMAIL PROTECTED] ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
-- listen, learn, contribute -- David J. Marcus