[relaxng-user] Re: Jing and libxml2 is right, Trang is wrong

Eric van der Vlist vdv at dyomedea.com
Sat Mar 6 10:25:35 ICT 2004


On Sat, 2004-03-06 at 10:03, David Tolpin wrote:
> > Misusing and implicit <group/> for a <choice/> would leave to schemas
> > that would be valid but behave in an unexpected manner (for the author
> > who would have made the error) while this restriction raises a schema
> > error which cannot be ignored and that can be considered safer.
> 
> 1) Only in nested grammars. In top-level grammars this will be cut off
> by restrictions on start pattern immediately.

Sure.

> 2) As well as any other implicit grouping. Why do you think
> 
> <define name="contact-info">
>   <ref name="phone-no"/>
>   <ref name="e-mail"/>
> </define>
> 
> is less confusing than the same in <start>
> 
> ?

Because <start/> is associated with the concept of root element in
top-level grammars and that this may confuse some users.

> 3) Group can be taken for choice, not the other way; which means
> that the pattern fails for a simple context, not for a complex one.
> Thus this confusion will be easily discovered.

Less easily than with the current restriction.

> Has there been a single real case of this confusion?

I don't think so.

Note that I am not in favour of this restriction but just trying to
understand the motivation. 

Also, now that RELAX NG is an ISO standard, I don't think that the
consequences of this choice are big enough to justify an update.

Eric
-- 
If you have a XML document, you have its schema.
                                                  http://examplotron.org
Upcoming XML schema languages tutorial:
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



More information about the relaxng-user mailing list