Re: [xml-dev] SGML default attributes.

From
Norman Gray <>
To
John Cowan <>
Date
2016-05-04T11:16:26Z
ID
<>
Thread
Re: [xml-dev] SGML default attributes.
Greetings.

(catching up ...)

On 29 Apr 2016, at 17:58, John Cowan wrote:

> On Fri, Apr 29, 2016 at 8:54 AM, Norman Gray <> 
> wrote:
>
> In the XML world, the DTD is just for validation
>
>
> That turns out not to be the case.  There are a number of XML DTD 
> features
> which affect the infoset returned by a compliant parser.  If they are 
> in
> the internal subset, the parser MUST respect them;

I stand corrected; I was sloppy.  I think this doesn't change my 
original point, however, which was that in SGML the DTD was integral to 
the document, and to the parse of the document, and that it's easy to 
forget this after one has got used to two decades of XML[1].  I can't 
remember if there was a trivial or default DTD which was assumed in the 
absence of a declared one, in the same way that there was a default SGML 
Declaration, but taking advantage of that would probably have been 
regarded as a curiosity, rather than normal practice.

In XML, in contrast, the DTD has a more auxiliary role, and at a first 
conceptual look, that role is validation (even though -- footnote! -- it 
may change other things about the parse as well).  Thus _omitting_ an 
XML DTD (or XSchema) is neither perverse nor curious.

Practical aspect: When I'm writing XML, I use a DTD (in whatever syntax) 
to help Emacs tell me if the document is valid, but I don't even know 
whether the XML parsers I use are capable of using a DTD external 
subset.  That careless ignorance would be impossible with SGML.

The rational extension of that attitude, of course, is MicroXML, which 
(as you of course know) doesn't use any external resources at all, and 
doesn't care about validation.

Best wishes,

Norman


[1] Hang on, _two_ decades?!  I've just checked and ... 1996 doesn't 
seem that long ago.


-- 
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK