Hi everyone,
The questions given below are taken from the sample exam given for XML DTD at our site.
Since some answers lack explanation, I am posting this here.
Can someone please explain?
Q1. Which of the following dtd code is valid?
a)<!ELEMENT
test (#CDATA)>
b)<!ELEMENT test (#PCDATA)>
c)<!ELEMENT test (#ANY)>
d)<!ELEMENT test (this,that)*>
<!ELEMENT this(#PCDATA)>
<!ELEMENT that(#PCDATA)>
I hope for the above question the answers are b and d. But the site shows only b. Am I correct?
Q3. 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)>]>
I hope for the above question the answer is a alone, whereas the site shows a and c. Can you please explain why?
Q6.
Is the following declaration valid?
<!ENTITY lt "*(&5;#">
Thanks in advance,
T.Kingsly