• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTD mock questions

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain the answers to these questions.
Thanks

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)>]>


Which of the following code is valid
a) <!ENTITY test "(#PCDATA)" >
<!ELEMENT elm1 &test;>
b) <!ENTITY lt "*(&5;#">
c) <!ENTITY test elm "elm1">
d) <!ENTITY test SYSTEM "elm">
e) <!ENTITY %test "(#PCDATA)">
<!ELEMENT elm1 %test;>


Dhiren
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic