This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Succeeding with AI and have Veljko Krunic on-line!
See this thread for details.
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

Mock Exam question from certificationguru's site

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The Following question is from Mock exam available from Certificationguru's site.
15. Which one of the following is the BEST content model for a DTD fragment that will be used in multiple DTDs?

A. <!element TableCell (P | UL | OL)* >
B. <!entity % TableCell "(P | UL | OL)*" >
<!element TableCell %TableCell; >
C. <!entity % TableCell "P | UL | OL" >
<!element TableCell (%TableCell; ) * >
D. <!entity % TableCell "" >
<!element TableCell (P | UL | OL %TableCell; ) * >
Given answer is 'B'.
But i don't see any problem with option 'C'. i wrote a small test code and resulting xml file is valid.

Please help me to avoid this confusion. may be i am doing something wrong or my understanding of the question is wrong.
Thanks
[ February 03, 2003: Message edited by: Vivek Saxena ]
[ February 03, 2003: Message edited by: Vivek Saxena ]
[ February 03, 2003: Message edited by: Vivek Saxena ]
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is asking for the BEST content model, not all correct content models.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody move this to the Cert forum, please. Thanks.
- madhav
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I don't know a whole lot about DTDs. So, why is B the best answer vs C?
Thanks,
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm not sure if this is the correct reason, just my guess...
B is the best answer becoz the whole content model of TableCell is defined by the Parameter Entity. As in the Q stated, when used in multiple DTDs scenario, you can "re-define" the parameter entity in another DTD which "include/import" this DTD, so as to re-define the "whole content model" of TableCell. In other words, this is more flexible!
Actually, all options are correct and valid ones. But as (B) provides maximum flexibility, it seems to be the best one.
Correct me if I'm wrong.
Cheers,
Kenneth
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic