Re: The X in HTML

"Philip TAYLOR [PC335/O-XP]" <P.Taylor@Rhul.Ac.Uk> writes:

> (after an admittedly brief reading), the underlying
> idea is that an XHTML document shall always be statically
> parseable for validity by reference to the DTD, whereas 
> with the "Xtensibility through macros" idea which I was 
> postulating, parsing for validity wouldn't be possible until 
> after all macros had been expanded (which isn't necessarily
> a finite process).

There are two layers.  (1) eXtensibility through macros and (2)
eXtensiblity through document type (let's put aside here the somewhat
synonymous term "DTD" for technical reasons).

A document type amounts to, for our purposes, the namespace of XML
elements along with their attributes.  The XML namespaces formalism is
relevant for this.  A document type has value to me only to the extent
that from my vantage point there are available processors that know
the vocabulary in its namespace.

XML entity definitions provide a mechanism that is more or less
functionally equivalent to TeX macros _without_ arguments.  But
neither XML (nor SGML) provide a functionality equivalent to LaTeX's
"\newcommand" _with_ arguments.

GNU Emacs run in batch (or interactive) mode with the function
gellmu-xml of gellmu.el is able to provide that functionality because
it is compatible with the use of LaTeX-like markup to write directly
for an XML document type.  (I have not given hard thought to whether
there might be a way to add such functionality to XML-style notation,
but IMHO if there is, it should not be allowed out of the house.)

Note that GELLMU's "\newcommand" is file-local by design in order to
protect downstream processors.  (Still document instances may be
assembled from multiple files at the XML level.)  When gellmu.el spins
out the corresponding XML instance, all newcommands are recursively
expanded into the namespace of the document type.  If you then later
want to extend your XML document type, you may simply back the
corresponding newcommand definitions out of your instance (or also
leave them if you want).

                                    -- Bill

Received on Monday, 12 August 2002 13:23:49 UTC