• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sample DTD Question #3

 
Jeff X Williams
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following question is from the sample DTD exam on this site. It gives (a) and (c) as the correct answers. I don't think (c) is correct because the ] is misplaced. Am I wrong?
3. Which of the following code is valid?
a) <!DOCTYPE test [ <!ELEMENT test (#PCDATA)>]>
b) <!DOCTYPE test [ <!ELEMENT test.dtd
(elm1|elm2|#PCDATA) >]>
c) <!DOCTYPE test [ <!ELEMENT test.dtd
(#PCDATA|elm1|elm2)* >]>
<!ELEMENT elm1 (#PCDATA)>
<!ELEMENT elm2 (#PCDATA)>
d) <!DOCTYPE test [ <!ELEMENT test test (#PCDATA)>]>
e) <!DOCTYPE test [ <!ELEMENT test "test" (#PCDATA)>]>
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right - C doesn't look right. Even after placing the ]> in the correct place, the root element test.dtd does not match the DOCTYPE declaration.
Cheers,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic