W3C home > Mailing lists > Public > www-html@w3.org > September 1999

Re: Include pieces of code in an HTML file

From: Will Wilson <lantic@mindless.com>
Date: Wed, 29 Sep 1999 10:24:36 +1000
Message-ID: <006d01bf0a23$9bf4ad60$b7b010cb@lantic>
To: <75819671@it.ibm.com>, <www-html@w3.org>
> Is there a way in XHTML 1.0 or HTML 4.0 to include a piece of code in an
> file from another file? Let us suppose that I have a legal statement that
> go in various pages, but not always in the same position, and that I wish
> keep one copy of that statement so that when I update it all pages are
> automatically updated. I do not want to use server-side tags, cgi or
> to do that. How can I do that? What's about
> <INCLUDE SRC="legal/rightsnotices.html" RESOLVENT="yes" />
> RESOLVENT requires that entities are resolved in the current HTML. So, if
> piece of code contains &year; , that entity is resolved to different texts
> depending on what that entity means in the file where code is imported.

There really is no easy way of doing this other then using either an
<iframe src="protocol://host/file.html">alternative content</iframe> or by
using some sort of server or client scripting based solution. Be aware
however that <iframe> still does not have significant support across

By a resolvent attribute I can only assume you are looking for some sort of
mail-merging technique. In such a case XSL & XML could provide the sort of
dynamic presentation you desire, however you may be waiting more then a
while for such a solution to become viable on the open internet.

Cheers, Will.
Received on Tuesday, 28 September 1999 22:37:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:51 UTC