Dear all,
I'd like to be sure.
I just was going through the certification primer for XML and related technologies written by Pradeep Chopra, especially
the sample test:
I've got a problem with question 3 relative to DTD:
Given the following XML document:
Which of the following DTDs will successfully validate the XML document below?
...
Reponse B:
...
Pradeep says this answer B is false because:
root4 is not a part of the given XML document, and as per the DTD at least one instance of the root4 element must be present in any XML document that conforms to the DTD.
For me - I've tested it only with xerces and may be I am wrong .. - the error does not deal with root 4 element but with cardinal operator of root3 element that must be changef from ? to * (because root3 element appears twice).
So, the following code, with element root4 mentionned in the DTD but not in th instance is perfectly valid (at least with xerces):
AM i missing something here or the answer in primer is really not correct?
Thanks in advance for your response,
Cyril.
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287