Re: client side includes

On Thu, 25 Jan 2001, Ignacio Javier wrote:

> I now think that the real semantics for client side includes are XML
> entities.

Note that (parsed) entities in XML are subject to restrictions that
don't apply in SGML - they must be well-formed in their own right.  
(In SGML, the contents of an entity can cross element boundaries -
e.g. you can have the start-tag in one entity and the end-tag in
another - but not in XML.)  Also, as has been noted already, XML
parsers aren't obliged to use (and parse) the replacement text in the
case of an external entity, which severely diminishes the utility of
the mechanism.  (There are good reasons for this exception, so it's
unfortunate that it can/will be exploited to excuse lack of support.)

> Could be this a "hello world" of them?:

Much too complex.  Think text macros (an entity reference isn't one
exactly, but the analogy is pretty close.)

<!DOCTYPE html PUBLIC "etc etc" [
  <!ENTITY head SYSTEM "http://www.my.com/my/content/head.sgm">
  <!ENTITY body SYSTEM "http://www.my.com/my/content/body.sgm">
]>
<html>
&head;
&body;
</html>

See:

  http://www.uic.edu/orgs/tei/sgml/teip3sg/SG17.htm


Arjun

Received on Friday, 26 January 2001 01:49:22 UTC