[relaxng-user] missing start element
Eric van der Vlist
vdv at dyomedea.com
Fri Nov 28 22:03:17 ICT 2003
On Fri, 2003-11-28 at 21:53, David Tolpin wrote:
> >
> > A reason (maybe not the only one) why this is illegal is that this would
> > be simplified as :
> >
> > start = element foo {}
> >
> > and that "element foo {}" is illegal.
>
> This is simply not that what is written in the specification. The specification says
> that
>
> 1) a grammar element can be empty. The grammar, both in EBNF and in RNG says so.
> 2) In the simplification rule for 'grammar', it says: "Next, move all define
> elements to be children of the top-level grammar element, replace each nested
> grammar element by the child of its start element and rename each parentRef
> element to ref."
>
> It does not say what to do with an empty grammar element at all.
Well, then that's just my interpretation of "replace each nested
grammar element by the child of its start element" to think that in that
case this is just nothing!
> Besides, nXML validates against the grammar above as though element foo {grammar {}}
> is the same as element {empty}, while jing rejects the grammar. No behaviour
> is defined in the specification and either behaviour can be accepted as an extension
> of the currently specified behaviour.
>
> Which one is the correct one? Should the grammar for RNG be modified so that
> grammar is
>
> start & (define|include|div)*
>
> instead of
>
> (start|define|include|div)*
No, because you can define a grammar without start pattern that you
include in other grammars which have a start pattern.
Eric
--
Read me on XMLhack.
http://xmlhack.com/author.php?id=8
Upcoming XML schema languages tutorials:
- Philadelphia -full day- ( 7/12/2003) http://masl.to/?V28612FC5
- Santa Clara -half day- (15/03/2004) http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
More information about the relaxng-user
mailing list