Questionable DTD for "form" tag

Karl Zilles <[email protected]> Fri, 21 Jan 2005 17:59:22 -0800
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Organization 1969 Communications, Inc.
Message-ID <[email protected]>
Hi,

I've used ocamlnet for a few project, and I like the code.

I have been using nethtml lately to parse an html page with a form, and 
I noticed that it never seemed to correctly parse the form element in my 
html pages.  I traced this back to the DTD:

"form",  (`Block, `Sub_exclusions( ["form"],
		`Block |. `Elements ["script"]));

So this says that <form> elements are only allowed to contain block and 
<script> elements.

This makes no sense to me.. for example, the <input> tag is an inline 
element:

"input", (`Inline, `Empty);

The result is that the form element doesn't contain the sub-elements 
that it should.

perhaps,

"form",  (`Block, `Sub_exclusions( ["form"], `Flow ) );

would make more sense?

Karl


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl