Re: XML Typo?

Thanks for your note.  You wrote:

>Date: Mon, 19 Oct 1998 11:05:58 -0400
>From: Joel Bender <joel@spooky.emcs.cornell.edu>
>
>
>Section 2.1 contains the following definition of a well-formed document:
>
>    document ::= prolog element Misc*
>
>Right below that mentions that matching the document production implies
>that "It contains one of more elements."  If this is what is intended, then
>the definition should read (assuming I understand this BNF-like notation):
>
>    document ::= prolog element+ Misc*
>
>Most of the examples I've seen have only one element, so I think the 2.1
>section should be changed to "...contains an element."

Hmm.  You're right about the potential for misunderstanding here,
but I'm not sure how to fix it.  The problem is that well-formed
documents may indeed contain more than one element, even though
the grammar is correct as written.  In the following document,
I count three elements:

  <greetings>
  <greeting lang='en'>Hello, world!</greeting>
  <greeting lang='de'>Gru&uuml;&szlig; Gott!</greeting>
  </greetings>

So I lean toward the view that the document's current wording is less
confusing than the alternative.

best regards,

-C. M. Sperberg-McQueen
 Senior Research Programmer, University of Illinois at Chicago
 cmsmcq@uic.edu, tei@uic.edu

Received on Thursday, 22 October 1998 17:29:30 UTC