• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

certification primer error?

 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've just made a test with IE6 and msxml3 and validation of the code:

is valid too...
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cyril,
My apologies for the delayed response.
Yes, you are correct. Choice B is incorrect because there should be * as an operator on root3 instead of ?. There is no problem with root4 element missing in the document. The DTD doesn't say that there should be at least 1 instance of root4. Thanks for valuable feedback.
Hope this helps.
Best wishes,
Pradeep
 
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic