Gee, this is a good question! It may look simple, but it is quite deep and the best thing, when we go the next level of depth "problem" switches to "non-problem" and vice versa. I believe that if you correct letter case as Mr. Brogden suggested, it will fix the problem. Um... Not really. Next level of depth bring us to XML specification, which claim <!ELEMENT Book ((Title, Author) | (Title, Price))> to be "non-deterministic content model" "This requirement is for compatibility with SGML (which calls deterministic content models "unambiguous"); XML processors built using SGML systems may flag non-deterministic content models as errors."
IBM 140 mock exam had a question on it, <!element Customer ((Name, Ship-to-address) | (Name, Bill-to-address))> was said to be an error. However, if we go to the next level of inquiry, we will learn that parsers are quite happy with such syntax and do not report any problem. So is it an error or not? Here is what Joe English thinks about it: > I understand that the XML 1.0 spec prohibits non-deterministic (or, > ambiguous) content models (for compatibility, to be precise). > Are all xml 1.0 compliant xml processing software required to reject > DTDs with such content models? No: a processor can ignore the DTD entirely and still be compliant. And since the prohibition against non-deterministic content models appears in a non-normative appendix, I would presume that conforming DTD-aware processors are not required to detect this condition either. Even in full SGML, ambiguous content models are a "non-reportable markup error", i.e., parser don't need to detect this condition. http://www.oasis-open.org/cover/ambiguousContentModels200101.html Now if we want to go even deeper and learn more, "In fact, there is a very simple algorithm available that handles non-determinism just fine (it doesn't require you to construct a NFA and then do the subset construction). See http://www.flightlab.com/~joe/sgml/validate.html (TREX uses a variation on this). Can any non-deterministic content model be converted to deterministic? The answer seem to be "no". "Sam Willmott from OmniMark released a white paper on content model algebra in the early nineties. He concluded that there was only one content model that cannot be disambiguated and I have yet to see proof to the contrary. The model is: (x, (y, x)*, y?) " Well, here I stopped, but if you still didn't have enough, you can go and read popular among content model developers Sam Wilmott's Content Model Algebra. I wish I could enjoy such a prose... :roll: Here is a nice collection of links for your examination: http://www.oasis-open.org/cover/topics.html#ambiguity Now back to your question, ELEMENT should solve the problem, yes. [ July 23, 2002: Message edited by: Mapraputa Is ]