W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > October 1996

Re: A28: syntax of markup declarations?

From: Charles F. Goldfarb <Charles@SGMLsource.com>
Date: Tue, 08 Oct 1996 08:09:17 GMT
To: lee@sq.com
Cc: U35395@UICVM.CC.UIC.EDU, w3c-sgml-wg@w3.org
Message-ID: <325a0628.2561177@mail.alink.net>
On Tue, 8 Oct 96 02:07:02 EDT, lee@sq.com wrote:

>| If XML is a conforming profile of SGML, it can be
>| the core of SGML97 -- the basic conformance level. The rest of SGML would be
>| defined as a delta on the core SGML; core XML/SGML users would never have to
>| read it.
>(I have commented on this point in sequence below, but I have reproduced
>it here in case people missed it.  I did not think that changing SGML itself
>was a possible goal of a W3C working group -- what did I miss?

It can't be an *official* goal of W3C, but if an idea is good for SGML, WG8
should consider it as a user requirement. I think a Core SGML conformance level
is a good idea. I think a simplified presentation of 8879 in which the Core can
stand by itself is a good idea. Therefore I am going to propose those things to
WG8. Ideally, the Core SGML and XML would be identical.

>| 1. The necessary subset is small, clean, and easily explained.
>This is spurious, since if you didn't use that grammar, you would not have
>to explain it at all.  I xcertainly would not accuse the SGML DTD grammar
>of being clean -- you can't even put comments everywhere you can put
>white space.  It is quirky, idiosyncratic, and hard to explain.
>Perhaps I am not a good teacher.  It is true that with OMITTAG NO,
>you get rid of the "- -", and if there is no CDATA, we don't have the
>problem that CDATA means different things in different contexts.

I was following Tim's MGML proposal. I assumed that *no* comments were allowed
*within* declarations; only standalone comment declarations *between* markup
declarations. That is easy to explain.

>| I have attached the grammar to this note. It has fewer than 30 productions.
>| (SGML has almost 200.)
>Well, that's true.  I have turned it into a YACC-style grammar that can
>be read by we mortal C-programmers :-), and appended that below.  Actually
>I am rusty with yacc and have not tested it for reduce/reduce conflicts,
>but I think it's probably OK.  I wouldn't bet my socks on it, though.
>I have done this so that people can judge more easily its value; the
>SGML-style form is harder to turn directly into a parser using normal
>compiler-writing tools.

I would expect Core SGML to have a standard YACC definition that could be turned
directly into a parser.

>| 2. 20,000 or so people already know the DTD language.
>| That is 20,000 more than know MGML.
>And considerably more than 980,000 fewer than know HTML.
>I.e. hardly anyone knows SGML by comparison.  Since it is hoped that
>XML will be used by non-SGML users (no?), this is spurious.

We are talking about the DTD language. HTML users don't, by and large, know
about DTDs. If they do, then they know the SGML DTD syntax because that's what
HTML DTDs are written in.

>| 3. It is the semantics of markup declarations that presents learning
>| difficulties, not the syntax. The semantics will be the same in any case.
>No, the syntax hinders it -- but only slightly, I agree.
>There are a few gotchas -- e.g. you can't put comments in model groups,
>and it's impossible to remember whether it's #CDATA or #EMPTY or not,
>and when you need brackets, because it's so inconsistent.  So it would be
>very nice to have something cleaner.

My proposal removes these inconsistencies.

>| 8. There is no problem putting markup declarations in "XML masquerading as
>| HTML". Declarations just look like long unknown tags.
>| (HTML users may even find them familiar for that reason.)
>Er, have you tried this?  You are in for some interesting surprises :-)
Yes, with Netscape 2.

>| 9. XML needs to be a conforming subset of SGML; otherwise it will be seen
>| as a competitor to SGML whatever our good intentions to the contrary.
>I don't believe this.
>If it is a problem, call it SGML Lite.  0.5 :-)

To call it SGML Lite, it has to be an SGML subset. That is my point. 

>| 10. Our objective for XML is to increase the SGML market by making is
>| easier to understand and implement. We only get this result if XML *is* SGML;
>| otherwise, SGML doesn't change at all.
>| If XML is a conforming profile of SGML, it can be
>| the core of SGML97 -- the basic conformance level. The rest of SGML would be
>| defined as a delta on the core SGML; core XML/SGML users would never have to
>| read it.
>I think this is the first really strong point you've made here, but it is
>a good one.  If these are your objectives, though, this task should be
>done by WG8 and *not* by the W3C.  The W3C is not a standards body, and
>can only make recommendations to standards bodies such as the IETF or ISO.
>If you want to change SGML, this is not, and cannot be, the forum.
>I _do_ agree that your point number 10 is a good one.

If XML is a conforming subset of SGML, then *by definition* it does not require
a change in the standard. If it is anything but a conforming subset, then *by
definition* it competes with the standard.

I have proposed an example of a conforming subset that is much simpler than the
full DTD syntax. Your BNF has added back complex things that I took out (like
comments within declarations).

Your notes address design questions as to what to include in the subset, which
is a separate issue. 
Charles F. Goldfarb * Information Management Consulting * +1(408)867-5553
           13075 Paramount Drive * Saratoga CA 95070 * USA
  International Standards Editor * ISO 8879 SGML * ISO/IEC 10744 HyTime
 Prentice-Hall Series Editor * CFG Series on Open Information Management
Received on Tuesday, 8 October 1996 04:22:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:04 UTC