W3C home > Mailing lists > Public > www-html@w3.org > April 2003

Inclusions: XML versus SGML

From: Etan Wexler <ewexler@stickdog.com>
Date: Thu, 10 Apr 2003 02:54:36 -0700
To: David Woolley <david@djwhome.demon.co.uk>, www-html@w3.org
Message-id: <BABA867E.DA6%ewexler@stickdog.com>

David Woolley wrote to <mailto:www-html@w3.org> on 9 April 2003 in "Re:
Object and New Insert Code Element"

>> I say one thing XHTML 2 desperately needs is a new element called
>> insert. We would use it sort of like object except this would be for
>> inserting code, (not images or applications!) from an external file
>> source. This is something myself and many others NEED.
> This already exists, for all XML languages, but browsers are not required
> to honour it, and as far as I know, none do.

You mean entities and entity references. In XML, those won't do the job. In
XML, general entities are parsed for markup at the point of reference.
Arbitrary text is likely to cause errors. Machine-readable code is still
more likely to cause errors.

SGML provides multiple ways to include arbitrary text with minimal parsing
or with no parsing.

> In the DOCTYPE, you call in entity definition files,

One declares entities. They are not "called in" within the document type
declaration, they are merely identified. And there is no requirement for the
involvement of files. The system may avoid files altogether or extract parts
of files as the text of an entity.

> and in the body of the document you use  &NameOfInsertion;.
> This is actually the same mechanism as used for named characters

In XML, your equation holds reasonably, but not in SGML. SGML actually has
named characters, like RE (the record end role, typically U+000D, carriage
return), RS (the record start role, typically U+000A, line feed), and SPACE
(the space role, typically U+0020, space).

Character reference by name is possible in SGML (like &#SPACE;) and has a
meaning that differs from that of numeric character reference and from that
of entity reference.

> the difference there is that the included character definition files
> are included by the primary DTD and are known to the browser.

What does "primary DTD" mean?

Etan Wexler <mailto:ewexler@stickdog.com>.
Goldfarb, Mosher, and Lorie, oh my!
And a heartfelt thanks to Jan Roland Eriksson, my favorite Swede.
[Pavement lyric respectfully suppressed.]
Received on Thursday, 10 April 2003 05:55:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:03 UTC