* Almiro Perez
| Now Iīve got another doubt related to xml. Is it possible redifining
It is not. To declare the same element twice is considered a validity
<URL: http://www.w3.org/TR/REC-xml#EDUnique >
| I would understand it if so, but my REAL PROBLEM IS this then:
| <!ELEMENT A(B, C)>
| <!ELEMENT B (#PCDATA)>
| <!ELEMENT C (#PCDATA)>
| <!ELEMENT A (A*)>
| What does A (A*) mean?
Simply that any A element may contain any number of A child elements.
The declaration in itself is perfectly fine, but your example is not
correct since there are two declarations for A.
A DTD that consists of nothing but
<!ELEMENT A (A*)>
is formally perfectly OK, but of course meaningless. You can make
documents which are valid according to it, however, and also
successfully validate them.
| A new declaration of A or making A element recursive?
It's a new declaration of A, and that declaration would have made A
recursive if there were no other declarations of A in the DTD. As it
is the new declaration causes an error because only one declaration is
| So I think it had to be this way:
| <!ELEMENT LIST (QUESTION, ANSWER*)+>
| <!ELEMENT ANSWER (ANSWER*)>
This is fine, except that you probably want
<!ELEMENT ANSWER (#PCDATA | ANSWER)*>
| But the problem is if itīs possible redifining elements.
It is not, but I don't understand why you would want to. Why not just
take out the old declaration and thus have only one?