Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question to Shashanks mock exam  RSS feed

 
Marc D. Green
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

in my opinion (and in the opinion of my xml editor) question 23 isn't answered correctly. How can in answer b the <root1> element occur twice ? Is that really possible?

In my opinion answer b and d will both not get successfully validated against the DTD. Does anybody agree?

Regards,
Marc
[ July 14, 2004: Message edited by: Marc D. Green ]
 
Vidya Ravi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marc,

The mock answer is correct and here is why -

Look at the question again - it stipulates that after root1, root2 may or may not appear and root3 must appear 0 or more times. The whole (root1,root2, root3) sequence may appear 0 or more times

Option a will qualify because root1 occurs once, and root2 occurs once

Option b will be correct because root1 has to occur, but root2 and root3 are optional and the whole sequence can appear 0 or more times

Option c is correct since the whole sequence may appear 0 or more times

Option d will NOT qualify since root2 appears after root3. Root3 can appear multiple times but should have been followed by root1 to be correct.

HTH,
Vidya
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!