W3C home > Mailing lists > Public > www-validator@w3.org > August 2007

"Root Element" problems

From: <invalid@csc.jp>
Date: Sat, 4 Aug 2007 18:59:51 +0900
Message-ID: <e71474010708040259lafa728wfe046bc422e86b@mail.gmail.com>
To: www-validator@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:25 GMT