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 ]
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
-----------------------------------<br />-- Learning is a never-ending story: the more u learn, the less u found u've known
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