W3C home > Mailing lists > Public > www-validator@w3.org > November 2010

validation of undefined prefixes

From: Waclaw Kusnierczyk <waku@idi.ntnu.no>
Date: Tue, 16 Nov 2010 13:53:19 -0600
Message-ID: <4CE2E12F.7090004@idi.ntnu.no>
To: www-validator@w3.org

I note that the following trivial code:

<?xml version="1.1"?>
<foo:bar xmlns:foo="" />

successfully validates in your online validator.  However, the W3C XML 
1.1 specification version 2 states

"The namespace prefix, unless it is xml or xmlns, must have been 
declared in a namespace declaration attribute in either the start-tag of 
the element where the prefix is used or in an ancestor element (i.e. an 
element in whose content the prefixed markup occurs). Furthermore, the 
attribute value in the innermost such declaration must not be an empty 

and the above code seems to violate this requirement.  In the tag 
foo:bar, the prefix foo is explicitly undefined, and then used to refer 
to a namespace.

Could you please comment on this?

Received on Wednesday, 17 November 2010 09:52:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:19 UTC