W3C home > Mailing lists > Public > xml-editor@w3.org > April to June 2017

Re: Definition of the grammar syntax

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Mon, 8 May 2017 21:27:30 -0600
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xml-editor@w3.org
Message-Id: <E88A3C56-A787-4124-9E67-9E79B0EDE6D0@blackmesatech.com>
To: Roy Walmsley <roy.walmsley@ntlworld.com>

> On May 8, 2017, at 7:18 AM, Roy Walmsley <roy.walmsley@ntlworld.com> wrote:
> Hi,
> I was looking at the production rules in the XML specification (http://www.w3.org/TR/xml11). I wanted to fully understand the grammar used, so reviewed the opening sections of the document to look for a reference to the syntax / semantics that the grammar definitions are based on. For one who has limited familiarity with grammars, I do not fully understand, for example, the following:
> Production rule [1] document – see https://www.w3.org/TR/2004/REC-xml11-20040204/#NT-document
> Production rule [10] AttValue – see https://www.w3.org/TR/2004/REC-xml11-20040204/#NT-AttValue
> Nowhere in clause 1 could I find the normative reference to the grammar for these rules. Fortunately, I happened to scroll down to look at the references at the bottom of the document, and chanced upon clause 6 Notation. Please can a forward reference to this clause be added to clause 1.2 Terminology, so that readers are immediately aware where to locate this information. This would then align with  the other terminological details, such as, for example, the use of verbal forms and the reference to IETF RFC 2119.

That may be a good idea; the absence of a forward reference in 1.2 is
(I suppose) based on the assumption that the reference to section 6
Notation in the table of contents already serves as a forward pointer
of the necessary kind.  But your report provides evidence that for at
least some readers the TOC is not enough.

As regards production 1 in XML 1.1, I share your confusion:  I do
not know what it means.  Or rather, I am pretty sure that it means

[1] document ::= (prolog element Misc*) - (Char* RestrictedChar Char*)

and not

[1] document ::= prolog element (Misc* - Char*) RestrictedChar Char*

but I don't see anything in the section on Notation that one could use
to prove either interpretation; I have the impression that somewhere
along the way the responsible WG lost sight of the fact that the
description of the grammar notation does not define a full precedence
hierarchy, and that parentheses are necessary to avoid ambiguity and
to keep the notation simple.

As for production 10, are you still confused or did section 6 answer
your questions?

C. M. Sperberg-McQueen
Black Mesa Technologies LLC
Received on Tuesday, 9 May 2017 03:27:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:12:55 UTC