Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Whizlabs, you drive me mad

 
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
 
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
 
Rancher
Posts: 3601
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm... Interesting. Should not it be :



or

 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic