Re: Validation issue with the xsi namespace

> If the W3C validator returns an error when the xsi XML namespace is not
> well defined, then I would expect the same for the xsd XML namespace.
> However both
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
> validate in XHTML+RDFa.

The W3C validator doesn't really understand namespaces - in general it
simply ignores them - as is happening with "xmlns:xsd" in your example.

However, in some DTDs, certain namespaces are hardcoded to certain
prefixes. This is supposed to be helpful, but in real life is at best
confusing and at worst a pain in the arse.

"xmlns:xsi" is one such namespace. It's hard-coded in
http://www.w3.org/MarkUp/DTD/xhtml-qname-1.mod, so any DTDs which
reference that module (which is most XHTML DTDs) end up with this strange
requirement - that if you decide to define "xmlns:xsi" in your document,
then you must define it as "http://www.w3.org/2001/XMLSchema-instance".

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 26 January 2009 13:48:24 UTC