• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Sample DTD Question #3

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)>]>
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic