Re: Form Content Models [was: HTML 3.2 Content Models ]

As I stated earlier, issue tracking will be simplified if you
keep to one issue per message. I'll address your points

In message <>, "Dianne Gorman" writ
>Yesterday I commented very vaguely  (sorry) on a couple of problems
>in the HTML 3.2 DTD.  I'm more precise this time:
>1. Forms
>HTML Features at a Glance at
> states " INPUT, SELECT and
>TEXTAREA are only allowed within FORM elements. "  But according to 
>the DTD, these are merely text-level tags which are in no way 
>confined to the FORM element:
><!ELEMENT FORM - - %body.content -(FORM)>
><!ENTITY % text "#PCDATA | %font | %phrase | %special | %form">
>The HTML 2.0 DTD has:
>Is there a logical reason for INPUT|SELECT|TEXTAREA being moved to
>%text in the HTML 3.2 DTD?

We wrestled for hours over this one. We're pretty sure there's
no good answer, but we'd be pleased as punch to see one.

SGML isn't sufficiently expressive to say exactly what we want to say,
so "INPUT, SELECT and TEXTAREA are only allowed within FORM
elements. " is an application convention.

The screw cases are these:


	<h2>Input in option in select</h2>

	<form action="/dev/null">
	<select name=xxx>
	<option>xyz <input name=trouble>

	<h2>Input outside Form</h2>

	<p>stuff <input name=orphan>

The former is valid according to the HTML 2.0 DTD, and there's
no application convention in the spec that says anything about it.

The latter is valid according to the SGML part of the HTML 3.2
DTD, but prohibited by the application conventions.

For background, see some of the comp.text.sgml archives regarding
inclusion exceptions:

Subject: The case against inclusion exceptions (again)
From:           David Megginson <>
Organization:   University of Ottawa
Date:           29 Apr 1996 07:34:53 -0400
Newsgroups:     comp.text.sgml
Message-ID:     <>

From: Christoph Altenhofen ( ) 
Date: 12 Aug 1994 12:12:38 UT 

For the selection of elements, allowed to include, I recommend Goldfarb

  - Inclusions should not be used for contextual subelements.
    They should be used only for elements that are not logically
    part of the content at that part where they occur in the
    document [...].

From: Erik Naggum ( ) 
Date: 13 Aug 1994 19:02:53 UT 

exclusion exceptions are almost obviously useful.  to halt recursion is
just one use.  another is to allow larger content models than will be used
in all contexts, then let some element higher up exclude unwanted elements.
this allows a form is generic/specific separation that is not tied to the
element, but rather to its relationship to other elements.  this is a very
powerful mechanism that requires the exclusion exception to work.

inclusion exceptions are _not_ useful, but probably not obviously so.
nothing can be done with inclusion exceptions that cannot be done without,
and the methods used without inclusions are better than those used with.


Received on Friday, 10 May 1996 12:38:56 UTC