[relaxng-user] missing start element
David Tolpin
dvd at davidashen.net
Sat Nov 29 00:51:40 ICT 2003
>
> 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.
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)*
?
David Tolpin
More information about the relaxng-user
mailing list