W3C home > Mailing lists > Public > www-validator@w3.org > October 2011

Re: [VE][html5] internal error from xmlns=""

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 05 Oct 2011 14:17:33 +0300
Message-ID: <4E8C3CCD.3090800@cs.tut.fi>
To: Phil Blackburn <phil.blackburn@arabis.co.uk>
CC: omkar.chandrasekhar@wipro.com, www-validator@w3.org
5.10.2011 12:53, Phil Blackburn wrote:

> BTW.  The test example I posted earlier was hand-crafted - my lazy typing
> meant it wasn't well-formed.  So before anyone spots the error here it is
> again with the proper closing tags.

I'm rather confused now with all the samples and snippets. Your 
_original_ problem report mentioned just one tag, and as I wrote 
earlier, if I wrap e.g. a minimal XHTML document around it, there no 
oddity, just a report about a syntax error (there is no attribute "xmlns"):
http://www.cs.tut.fi/~jkorpela/test/xmlns.html

This is one of the reasons why it is important to post a URL of problem 
document, not a snippet of code.

> <!DOCTYPE html>
> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>Test</title>
> </head>
> <body>
>    <p xmlns="">Example of breaking validator</p>
> </body>
> </html>

Yes, that causes the behavior you described. If the doctype is changed 
to an XHTML 1.0 doctype, it doesn't happen.

So it's apparently the combined effect of the following that triggers 
the bug:
1) <!DOCTYPE html> (which causes HTML5-mode "validation")
2) XML serialization, with <html ... xmlns="http://www.w3.org/1999/xhtml">
3) xmlns attribute on some other element.

Without item 2, i.e. with HTML serialization, the bug does not appear. 
Instead, the following error message appears:

"Bad value for the attribute xmlns (only http://www.w3.org/1999/xhtml 
permitted here)."

... with the following more cryptic warning:

"Attribute xmlns is not serializable as XML 1.0."

I hope this analysis helps to isolate the buggy part of the code.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 5 October 2011 11:18:14 GMT

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