Re: FORM content in DTD (Again)

Daniel W. Connolly (connolly@hal.com)
Thu, 27 Oct 94 00:24:00 EDT

In message <199410270133.AA16734@char.vnet.net>, Stan Newton writes:
>
>I sorry but I wasn't very clear.

Discussing technical issues over email is painful enough. We will
all be able to communicate much more effectively if we use specific,
concrete, illustrative examples.

I recommend this when asking questions, and if I could, I would
_require_ it when giving answers.

>the special FORM
>tags like SELECT and INPUT are not valid inside ordinary containers like P.

Ah! Here is where your confusion lies.

SELECT and INPUT are allowed inside FORM by way of a nifty hack called
inclusion exceptions. This means that they are allowed inside FORM,
and inside any element contained in FORM.

So the way to do text in a form is, for example:

-----
Input

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<HEAD> <title>form example</title> </head>

<BODY>
<form action="dummy">
<p>some text and an <input type=text> thingy
</form>
</body>

Parsed Output (Element Structure Information Set)

AVERSION CDATA -//IETF//DTD HTML//EN//2.0
(HTML
(HEAD
(TITLE
-form example
)TITLE
)HEAD
(BODY
AACTION CDATA dummy
AMETHOD TOKEN GET
AENCTYPE CDATA application/x-www-form-urlencoded
(FORM
(P
-some text and an
ATYPE TOKEN TEXT
ANAME IMPLIED
AVALUE IMPLIED
ASRC IMPLIED
ACHECKED IMPLIED
ASIZE IMPLIED
AMAXLENGTH IMPLIED
AALIGN IMPLIED
(INPUT
)INPUT
- thingy
)P
)FORM
)BODY
)HTML
C
-----

Dan