LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: How to specify sequence (variable number)
From: Lars Marius Garshol <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Mon, 26 Jun 2000 17:58:44 +0200

text/plain (43 lines)

* Andrew Webber
| Part of the problem is that if an eighth "x" appears in the
| instance, there's no way to know if a ninth is allowed (was that
| eighth "x" right after the last required one, or was the first
| required one ommitted?).

* Lars Marius Garshol
| This is actually incorrect.  The only problem with the above
| [original] content model is that it is not compatible with SGML.

* Andrew Webber
| If the only problem is that it's SGML-incompatible, why does the
| validator complain about it?

Because it may (see below). It's a validator, so I assume its makers
wanted it to be as picky as possible, to help people weed out any
potential problems in their documents. Most XML parsers will, as far
as I know, not complain about this at all.

From the XML recommendation, section 3.2.1:

  "The content of an element matches a content model if and only if it
  is possible to trace out a path through the content model, obeying
  the sequence, choice, and repetition operators and matching each
  element in the content against an element type in the content model.
  For compatibility, it is an error if an element in the document can
  match more than one occurrence of an element type in the content
  model. For more information, see "E. Deterministic Content Models"."

From the XML recommendation, non-normative appendix E:

  "For compatibility, it is required that content models in element type
  declarations be deterministic.

  SGML requires deterministic content models (it calls them
  "unambiguous"); XML processors built using SGML systems may flag
  non-deterministic content models as errors."

--Lars M.

Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager