OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-deterministic content model

Purvesh Sharma wrote:

> Can anybody tell me whether the following content model is
> deterministic or non-deterministic? and why? <!ELEMENT a ((x, y) | (y,
> x))?>

It's deterministic, because the parser always knows what element it can
expect next. Element a will be followed by either element x, element y
or nothing. It would be non-deterministic if it the processor was faced
with element x in two contexts (for example), such as:

<!ELEMENT a ((x, y) | (x, x))?>


Marcus Carr                      email:  mrc@allette.com.au
Allette Systems (Australia)      www:    http://www.allette.com.au
"Everything should be made as simple as possible, but not simpler."
       - Einstein