This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whizlabs, you drive me mad

 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, we've bought Whizlabs XML Simulator. I run diagnostic exam, and something went wrong. Some questions don't make any sense, and some seemed to be incorrect.
Guys, we pay you money! The money for the tests, not for this nice look & feel!
Later i read some another complaints about Whizlabs, and that they dont pay to much attention to these complaints. Maybe this forum is a better place. Who knows.
Let's look at their "sample questions" article at http://www.whizlabs.com/articles/xml-questions.html:

Question 3:
Which of the following DTDs will successfully validate the XML document below?
<root> <root1/> <root2> root2 data </root2> <root3> root3 data </root3> <root3/> </root>

one of the choices (marked as incorrect one, and it is true)
B.
<!ELEMENT root1 (#PCDATA)>
<!ELEMENT root2 (#PCDATA)>
<!ELEMENT root3 (#PCDATA)>
<!ELEMENT root4 (#PCDATA)>
<!ELEMENT root (root1+,root2+,root3?)+>


But the description is wrong!
"Choice B is incorrect since 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."

In fact, choice B is incorrect because of incorrect number of root3 elements in the source document. Agree?

Ok, that's all for now. I will post some more later, just to let the people know
 
Dhananjay Goswami
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey buddy!
Whats wrong with the DTD? It seems fine to me.
The element root4 is defined in the DTD but its not specified in the 'root' element as a child. So, it shouldn't be there in the xml source.
The definition of the 'root' element has (root1+, root2+, root3?)+. So, there can be 1 root1, 1 root2 and 1 root3. But since this whole set can be repeated, the 2nd root3 occurance becomes a part of the 2nd set with root1 and root2 omitted (since they're anyway optional).
Hope this clears up the fog somewhat.
Cheers,
Dhananjay
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm... Interesting. Should not it be :



or

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic