"Root Element" problems

Hi,

When the Validator checks the following XML document:

====================
<?xml version="1.0"?>
<A/> <!-- U+0041, LATIN CAPITAL LETTER A -->
====================

The result page says (among other things):

   Root Element: a/

Of course,

 1. the element name is "A", not "a"
 2. "/" is not part of an element name

Now,  when the Validator checks the following XML document:

====================
<?xml version="1.0"?>
<Α/> <!-- U+0391, GREEK CAPITAL LETTER ALPHA -->
====================

Then the Validator doesn't recognize the root element at all.
Likewise, the Validator doesn't recognize the root element of
the following XML document, either.

====================
<?xml version="1.0"?>
<א/>  <!-- U+05D0, HEBREW LETTER ALEF -->
====================

On the other hand, when the Validator checks the following
XML document:

====================
<?xml version="1.0"?>
<Aא/> <!-- U+0041, U+05D0 -->
====================

It says the root element is "aא/" - again that's wrong in several
respects, but at least the Validator tried to recognize something.
Looks like if an element name doesn't start with [A-Za-z],
the Validator fails to recognize the root element name.

Even worse,  when the Validator checks the following XML document:

====================
<?xml version="1.0"?>
<À>    <!-- U+00C0, LATIN CAPITAL LETTER A WITH GRAVE -->
 <A/> <!-- U+0041 -->
</À>
====================

It says the root element is "a/".  That's wrong in all respects.
IMHO the code to recognize the root element needs serious rework.

Received on Saturday, 4 August 2007 09:59:54 UTC