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

Best Content Model

 
ZEESHAN AZIZ
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have come across this question. Answer given is B. I can not understand this question at all. Will be greatful if anyone explain the answer.
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 * >
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way to create a DTD fragment that can be used in multiple DTDs is by using a parameter entity. That leaves us with B,C and D. Out of these three, B is the only one which is syntactically correct.
Cheers,
Dan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic