OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] SGML default attributes.

On 05/04/2016 04:23 PM, Eliot Kimber wrote:
> The conceptual mistakes that SGML made was conflating the notion of an
> abstract "document type" with the grammar definition for (partially)
> validating documents against that document type. That is, SGML saw the DTD
> as being equal to the definition of the "document type" as an abstraction.
> But of course that is nonsense.

I think you're being unnecessarily harsh here. A DTD only declares that
the abstraction "document type X" shall consist of {some specified
intermixture of element types with their attributes etc}.

If we (those of us doing this stuff at the time) saw fit to assume for
practical purposes that a given DTD *was the* definition of "document
type X" then that was sufficient to get our software cranked into action.

To say that SGML was in some way to blame for this may be mathematically
correct, but fails to take into account that a lot of this was
relatively new at the time (not that markup was anything new, but having
an ISO standard and a shedload of software *was*).

> There was (remains today) the misguided
> notion that a reference to an external DTD subset somehow told you
> something actionable about the document you had. 

This is correct post hoc (modulo default attributes :-) But reference to
an external DTD subset does tell me lots of actionable things about the
document that I am sitting down to create: the names and valid placement
of element types being not the least of these.

> Consider this SGML document:
> <!DOCTYPE notdocbook PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" [
>   <!ELEMENT notdocbook ANY >
>   <!ELEMENT bogus ANY >
> ]>
> <notdocbook>
>   <bogus><para>This is not a DocBook document</para></bogus>
> </notdocbook>
> This document will be taken as a DocBook document by any tool that thinks
> the public ID means something. But obviously it is not a DocBook document.
> It is, however, 100% DTD valid. QED DTDs are useless as tools of document
> type definition. 

Please don't fall into this trap as I don't think it advances the
argument. All elephants are grey. Mice are grey. Therefore all mice are
elephants. DTDs are only useless as tools of document type definition if
you insist on deliberately misleading the parser (and the user).

> The only reason the SGML (and now XML world) didn't
> collapse under this fact is that the vast majority of SGML and XML
> authoring and management tools simply refused to preserve internal subsets

This was at the core of our decision to use Emacs and psgml-mode. It has
many flaws, but What You Write Is What You Get.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS