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

Thanks a lot everybody!! I got the answer.
Thanks again
----- Original Message -----
Sent: Wednesday, June 13, 2001 2:21 PM
Subject: RE: Non-deterministic content model

Seems deterministic to me.
When hitting upon 'a' there is a choice to be made between the parts '(x,y)' and '(y,x)'. This choice can be made as the next tag is either 'x' or 'y'. If it is 'x' the "path" to follow is the one described by '(x,y)'. If it is 'y' the "path" to follow is the one described by '(y,x)'.
That is, by "looking what we have now" we can decide the path, and the rest of the path is clearly deterministic.
And therefore the whole expression is deterministic.
Compare to the non-deterministic example "(a,b) | (a, c)". Here, when "what we have now" is an 'a'. It is now impossible to make the choice for the appropriate path as we need to "look ahead" to see either an 'b' or a 'c'.
When yopu encounter the need for "looking ahead" your content model is non-deterministic.
Regards, Wilco.
-----Original Message-----
From: Purvesh Sharma [mailto:purvesh@whizlabs.com]
Sent: 13 June 2001 09:54
To: xml-dev@lists.xml.org
Subject: Non-deterministic content model

Hi all,
Can anybody tell me whether the following content model is deterministic or non-deterministic? and why?
<!ELEMENT a ((x, y) | (y, x))?>
Waiting to hear from you people...