Re: [relax-ng] Compact syntax: double parenthesis needed?

From
John Cowan <>
Date
2002-07-10T21:52:39+00:00
ID
Thread
Re: [relax-ng] Compact syntax: double parenthesis needed?
Eric van der Vlist scripsit:

> jing complains if I don't use double parenthesis and write:
> 
>    element person {
>     attribute id {text},
>     element name {text},
>     element born {text},
>     (
>      attribute type {"author"},
>      element dead {text}?
>     ) | (
>      attribute type {"character"},
>      element qualification {text}
>     )
>    }
> 
> I get a "syntax error" on the line with ") | (".

Yes, because you have mixed , and | at the same level.
The top level of person's content model is:

	@id. name, born, (...) | (...)

whereas you need

	@id, name, born, ((...) | (...))

to make the top level all commas.

-- 
John Cowan                                <>     
http://www.reutershealth.com              http://www.ccil.org/~cowan
Yakka foob mog.  Grug pubbawup zink wattoom gazork.  Chumble spuzz.
    -- Calvin, giving Newton's First Law "in his own words"