W3C home > Mailing lists > Public > www-validator@w3.org > February 2015

Empty namespace example from xml-names11 fails to validate

From: roger peppe <rogpeppe@gmail.com>
Date: Mon, 2 Feb 2015 09:43:55 +0000
Message-ID: <CAJhgachFcxVPczkEzgfWvL_Rfq18D1g7C2O2rHnrfh8Dmx3pXw@mail.gmail.com>
To: www-validator@w3.org
I tried to validate the following example from section 6.1 of
http://www.w3.org/TR/xml-names11/

(Note that I removed the "illegal" line from the example, not
that it makes a difference)

<?xml version="1.1"?>
<x xmlns:n1="http://www.w3.org">
    <n1:a/>               <!-- legal; the prefix n1 is bound to
http://www.w3.org -->
    <x xmlns:n1="">
        <x xmlns:n1="http://www.w3.org">
            <n1:a/>       <!-- legal; the prefix n1 is bound again -->
        </x>
    </x>
</x>

The example fails with the error:

    Line 4, Column 18: xmlns:n1: Empty XML namespace is not allowed

But this example is from the section that explicitly allows
the empty XML namespace in xmlns: declarations.

So it appears to me that the XML validator is probably at fault here.

Could someone please confirm or deny this, please?

  cheers,
    rog.
Received on Monday, 2 February 2015 15:30:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:12 UTC