Re: assorted HTML and SGML questions

I was going to reply privately, but some of this might be useful to others,
and I don't have al the answers ;-)

> Q: (("text/html" Internet Media Type)) Does text/html forbid including the
>    SGML declaration (<!SGML ...>)?  I know it forbids including a document
>    type declaration subset, but the standard is unclear on whether the
>    SGML declaration is allowed.

This should be fixed -- it's not allowed.

> Q: ((Internet Media Types for SGML))
SoftQuad Panorama uses text/x-sgml -- see http://www.sq.com/ for more info.

> Q: ((HTML and Empty P Elements)) What are the semantics of an empty P
>    element in HTML?  The standard doesn't really seem to deal with this.

If by an empty P you mean
    <P></P>
then what do you want the RFC to say?
If you mean the use of <P> without a </P>, a conforming application inserts
the </P> automatically at an appropriate place, as determined by the
SGML OMITTAG rules.

> Q: ((SGML Mixed Content)) I'm not sure if I understand the mixed content
>    rules properly.  Let me state what I guess the rules are so that you
>    can tell me if I got it right or wrong.  Here is what I think the rules
>    are:
>      
>      * If a content model contains #PCDATA anywhere, the the entire
>        element has "mixed content".
No, only if the element can contain both elements and #PCDATA.

>      * If an element does _not_ have mixed content, then a sequence of
>        characters between two tags that is solely composed of whitespace
>        (SPACE, TAB, RS, RE) is ignored, otherwise the whitespace is
>        treated as ordinary data characters and must correspond to an
>        occurrence of #PCDATA in the content model.
>    
>    Is this right?
Yes.  Actually, RS/RE processing is more complex than that; send a message
to mail@exoterica.com to get a paper on Record Start and End in SGML if
you are writing software to deal with it.

> Q: ((SGML LITLEN)) Is the SGML limit on attribute value lengths (LITLEN)
>    applied to the attribute value after parsing and entity replacement or
>    before?

dunno.  Sorry.  My references are in the office and I'm at home, and
it's snowing too much for barefooted Liam :-)

> Q: ((HTML PRE Containing FORM)) RFC 1866 says this:
>      For example, a <PRE> element may contain a <FORM> element, ...
>    
>    This doesn't make any sense because it contradicts the DTD given in the
>    same document.  What's the story here?
Probably an error in the DTD.

> Q: ((HTML INPUT and SELECT Attributes)) Why is the SIZE attribute of the
>    INPUT element specified to have type CDATA while the SIZE attribute of
>    element SELECT is specified to have type NUMBER?  Is this to allow
>    dimension units to be specified?  It doesn't say in the standard.

No answer, sorry.
> 

Received on Saturday, 18 November 1995 23:30:42 UTC