Re: Proposal for <INC SRC="URI"> Element for Compound HTML Documents.

Terry Allen (terry@ora.com)
Fri, 9 Dec 94 20:26:20 EST

| From brian@wired.com Fri Dec 9 16:43:53 1994
| From: Brian Behlendorf <brian@wired.com>
| On Fri, 9 Dec 1994, Terry Allen wrote:
| > In what contexts would you like to use INC? For example, you
| > probably wouldn't want to INC another document within an H1.
| I would. I'd like to be able to make the header of my document the
| result of some script somewhere. I'd like to make the default value for
| a form entry where I ask the user to give an email address to be by
| default set to the HTTP_FROM CGI environment variable. I'd like to do
| many things which right now I can only do with server-side includes (oh
| yeah, and we dish out 300K web hits a day with server-side parsing turned
| on for all HTML docs, so nyah nyah nyah! :) but a formal way of doing
| that which would not require parsing the documents would be really nice.

What you want to do can be done with SUBDOC and the ability to declare
entities in the internal subset in the doctype declaration. The
subdocuments should be valid HTML docs, though, properly nested.

Also, you don't really need an element; you could just
invoke the &entity;. See a post by Eliot Kimber to comp.text.sgml
(ftp://ftp.ifi.uio.no/pub/SGML/comp.text.sgml/1993/):

Message-ID: <19931112.102615.443@almaden.ibm.com>
Date: Fri, 12 Nov 93 12:27:01 EST
Subject: Re: SUBDOC and (SGMLS) ESIS

| > An INC'd document could be treated as an SGML SUBDOC entity, but
| > that means that it would parse just fine no matter what it contains.
| > Maybe this is desirable; would you propose that a browser indicate
| > that an INC'd doc is some sort of inclusion, or treat it as a
| > transparent part of the parent doc?
| I'd like it as transparant as possible. A benefit/drawback of server-side
| creation is that the client can't tell which part was dynamically generated
| and which was static.

One could have it both ways by providing a switch; one reason for preferring
an element.

However, either server-side includes or subdoccing allows some
apparently nonsensical documents to be created unintentionally;
the user ought to inspect the output, or in your case, find a
way to test the output, to avoid that. Subdoc, you might say,
is a power so great it can be used only for good or for evil.


-- 
Terry Allen  (terry@ora.com)   O'Reilly & Associates, Inc.
Editor, Digital Media Group    103A Morris St.
			       Sebastopol, Calif., 95472
A Davenport Group sponsor.  For information on the Davenport 
  Group see ftp://ftp.ora.com/pub/davenport/README.html
	or  http://www.ora.com/davenport/README.html