validation of undefined prefixes

Hello,

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 
string."

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?

Regards,
Wacek

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