Re: [relax-ng] Mixed and compact syntax

From
John Cowan <>
Date
2002-07-05T18:03:43+00:00
ID
Thread
Re: [relax-ng] Mixed and compact syntax
Eric van der Vlist scripsit:

> I would expect
> 
>     <element name="title">
>      <mixed>
>       <attribute name="xml:lang"/>
>       <zeroOrMore>
>        <element name="a">
>         <attribute name="href"/>
>         <text/>
>        </element>
>       </zeroOrMore>
>      </mixed>
>     </element>
> 
> and 
> 
> element title {
>   mixed {
>    attribute xml:lang {text}&
>    element a {attribute href {text}, text}
>   }
> }
> 
> to be the same schema, 

You omitted the "*" after the element declaration corresponding to
the "zeroOrMore"; an easy mistake to make, I find, especially when
translating XML to compact syntax by hand.

> Also, I don't see if mixed{foo, bar} and mixed{foo|bar} are allowed or
> not and wonder what would be their meanings...

They are, and they mean text & (foo, bar) and text & (foo|bar) respectively.

-- 
John Cowan <>     http://www.reutershealth.com
I amar prestar aen, han mathon ne nen,    http://www.ccil.org/~cowan
han mathon ne chae, a han noston ne 'wilith.  --Galadriel, _LOTR:FOTR_