Re: HTML 4.0/SGML, (#PCDATA)* problem in TEXTAREA

Paul Prescod (
Tue, 29 Jul 1997 13:26:50 -0400

Message-ID: <>
Date: Tue, 29 Jul 1997 13:26:50 -0400
From: Paul Prescod <>
Subject: Re: HTML 4.0/SGML, (#PCDATA)* problem in TEXTAREA

Neil St.Laurent wrote:
> Firstly here is my HTML snippet:
> <TEXTAREA><HELLO> <P>&amp; out there in <TEXTAREA> land</TEXTAREA>
> </FORM>
> According to HTML 4.0 TEXTAREA has a content of #PCDATA, yet both IE
> and Netscape put the <HELLO><P> and <TEXTAREA> in the TEXTAREA field
> on the page, yet these are markup...

I don't think that <HELLO> and <P> are allowed in <TEXTAREA> so your
document is invalid and any rendering is as appropriate as another. The
HTML spec. does not specify the behaviour of incorrect documents.
> Additionally, the (#PCDATA)* in the DTD seems incorrect:
> SGML (ISO 8879)
> rep   Optional and repeatable (0 or more times)
> ... The "#PCDATA" content toekn is regarded as having an occurance
> indicator of rep.
> -
> Putting the additional * on seems to break the content model because
> now technically we're allowed zero or more and an already possibly
> empty PCDATA.

I don't see any problem with 0 or more of 0 or more characters. This is
also valid:

<!element TEST - - ((((#PCDATA)*)*)*)>

 Paul Prescod