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

Eric van der Vlist vdv at dyomedea.com
Sat Mar 6 08:50:44 ICT 2004


David,

On Sat, 2004-03-06 at 08:29, David Tolpin wrote:
> Hi,
> 
> after looking at the spec, I admit that both Jing and libxml2 are right
> reporting the above Relax NG XML Syntax grammar as wrong; the production
> rules for the XML Syntax require that start element only has one child.
> 
> So, Trang should have transformed the compact syntax into the XML syntax
> by wrapping the contents of 'start' element into a group.
> 
> However, I have a doubt regarding the specification logic. Disallowing
> implicit grouping in <start>, while it is allowed in other contents,
> does not seem right to me.
> 
> Restrictions on the start element are checked after the simplification,
> thus this syntactic restriction does not actually help anything.
> 
> Shouldn't the production for start be 
> 
> start ::= <start [combine="method"]> pattern+ </start>

It's done on purpose because

<quote src="
http://lists.oasis-open.org/archives/relax-ng/200301/msg00006.html">

The reason why the latter is forbidden is that there's a tendency to use
it assuming it means

<start>
  <choice>
    <ref name="foo"/>
    <ref name="bar"/>
  </choice>
</start>

</quote>

Eric
-- 
Carnet web :
           http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais
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