"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
Up vote 0 down vote favorite share g+ share fb share tw.
I can't figure out how to write DTD for XML file which can contain same elements in mixed order. Small example which shows the problem is below: My DTD: I found a similar topic but the solution does not work in my case (and I'm not sure what is wrong with my DTD at the moment). I get this error message: xmllint: Content model of Instructors is not determinist: ((one* , two*) | (two* , one*)) xml dtd link|improve this question edited Oct 19 '11 at 21:13 asked Oct 19 '11 at 21:08afaf128541316 100% accept rate.
In XMLSpy the DTD and the XML file are valid. Maybe a bug in xmllint? – H-Man2 Oct 19 '11 at 21:24.
It appears you are not as rusty as you thought :) Thanks. – afaf12 Oct 19 '11 at 21:40 @afaf12 Occasionally I can remember something actually useful ;) – Dave Newton Oct 19 '11 at 21:51.
Your solution is not deterministic, because is one of the cases that matches both of the branches: (one*, two*) and (two*, one*). Like @Cristopher noted, @Dave's answer allows mixed ordering and his answer fixes that problem. But actually Christopher's answer is not deterministic either, because when validating input and the validator encounters the first it doesn't know which branch it should select.
It only knows this after all of the elements are read. To keep the order consistent while keeping the model deterministic, use Key points here are: 1) keeping the model deterministic by beginning each branch with a different mandatory element 2) but still allowing empty with the? In the end which makes the content model optional.
The DTD as given is not determinist, and an xml parser may error on that. (Cf. Section 3.2.1 (normative) and Appendix E (non-normative) of the XML spec.
The reason is compatibility with SGML, if anyone remembers that. ) In your DTD, the empty element would match both branches. Dave's solution changes the meaning of the DTD in that it accepts If you don't want that, make sure that at every “or”-branch, you'd know exactly which one to take by only looking one token ahead, e.g. , by writing.
This is not deterministic, so it again causes the same problem that this question was about. – jasso Dec 16 '11 at 9:56 @jasso: You're right of course. I've corrected that (I believe).
– Christopher Creutzig Dec 21 '11 at 10:11 Nope, you cannot use keyword EMPTY this way. Now you are allowing structure but not – jasso Dec 21 '11 at 19:15 Stupid me. Sorry for the line noise.
– Christopher Creutzig Jan 8 at 18:51.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.