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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Other whitespace problems was Re: Whitespace rules (v2)

[ Lists Home | Date Index | Thread Index ]
  • From: Trevor Jenkins <tfj@apusapus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Tue, 2 Sep 1997 00:07:40 +0000 (GMT)

> At 09:52 PM 18/08/97 +0000, Trevor Jenkins wrote:
> > I'm 
> >convinced that as they stand the separator rules in XML are 
> >ambiguous.
> Yes; Michael Sperberg-McQueen and I both agree that these need
> some more work.

Only "some". ;-)

> If it weren't for the $#*!@#%#!ing Parameter Entities, ...

These do seem to be allowed in some very odd places. Even for 
compatibility I see no reason to allow them in element declarations 
where %Name occurs. In SGML these was a useful feature; in XML these 
are obscurantist.

> all this would be simple and straightforward - designing a grammar
> for the SGML element declaration language is not exactly rocket
> science.

But it is computing science. I know some adherents of this list
despise computing scientists (I heard one of you say so publicly a
few months ago) but we can fix this problem.

> But when you try to pollute the grammar by saying where you can
> and can't replace chunks of it with PE references, it all of a
> sudden gets hideously difficult.

I've been on holiday since my original posting and relaxed by trying
to define an equivalent grammar to describe XML that does not have
the convolutions of the existing BNF one.

> ... SGML gets around this with the clever device ...

I get around this with the cunning plan of using a W-grammar rather
than BNF. Some may recall W-grammars as the formalism used to define
the Algol-68 programming language.

> ...

> Anyhow, further grammar engineering is in order.  One thing to 
> think about is simply to drop the 'S' (space) nonterminal, write
> a couple of simple tokenization rules, and take it that way.  CMSMcQ
> has investigated this at length, but it has problems too.

My equivalent W-grammar for XML does not have any S nonterminals at 
all. The number of rules is roughly the same as the "official" BNF 
set. I think that mine are simpler and correct. However, I did add 
some meta-productions and hyper-rules to accommodate the 
parameter entity problem and to enforce the quoting rules. This 
increase in size is justified as I also made the grammar LL(1), 
which the official one is not.

> Pardon me for whining; I'm sure we'll figure out something. -Tim

Any one interested in my version of the grammar should email me 
and I'll gladly send you a copy. Be warned though you have to be a 
computing scientist to understand it. :-) If there's enough interst 
I'll post it to the list.

Regards, Trevor.


"Real Men don't Read Instruction Manuals"
   Tim Allen, Home Improvement

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@ic.ac.uk)


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

Copyright 2001 XML.org. This site is hosted by OASIS