Unal wrote:
Hi,
I have couple of simple questions about XML that I cannot find answers
to in the book I looked at and in the search I did on internet. Can
anyone help me with these?
Did you try reading the FAQ at http://www.ucc.ie/xml ?
1- Why is XML case sensitive?
So that languages using alphabets which have no case can be used. If we had
allowed case-insensitivity, it would preclude some people from using it.
(Actually it was more complex than that, but it will suffice).
2- Why does not XML allow tag minimization?
To make it easier to write programs for.
3- Why must XML document elements be properly nested?
Ditto.
4- Can you put binary data in a CDATA section?
No. Use UUencoding or Base64 or something like.
5- Is there any limit to the length of an element or attribute name?
In theory, no. In the formal definitions, 999999999 I think. In practice, I
suspect many systems will explode into little pieces of pink goo if you try
to make them read strings longer than their virtual memory maxima.
6- Where do you declare entities?
In the DTD or internal subset.
7- In XML, which takes precedence, the internal DTD or the external
DTD?
The internal subset is read and processed before the external subset.
That way you can include declarations (eg of entities) which will
prevent others of the same name from being used, and thus take precedence.
Many large DTDs use this to allow on-the-fly modifications by overriding
portions of the external subset whose use or non-use is controlled by a
Parameter Entity.
///Peter
--
"The cat in the box is both a wave and a particle"
-- Terry Pratchett, introducing quantum physics in _The Authentic Cat_