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

I'm sorry about the confusion.

Unfortunately I don't have a public facing document since it lives on an
intranet. So the only option I have is to use the Direct Input.

However, I've uploaded the test document to:
http://www.arabis.co.uk/temp/breakingW3cValidator.html
This *will* work as expected when using the "Validate by URI" - that is, we
get the correct error message: "Bad value for the attribute xmlns".  
But take the source of the document and paste it into the "Validate by
Direct Input" and it fails with: "Oops. That was not supposed to happen. A
bug manifested itself in the application internals. Unable to continue.
Sorry. The admin was notified"


Phil




-----Original Message-----
From: Jukka K. Korpela [mailto:jkorpela@cs.tut.fi] 
Sent: 05 October 2011 12:18
To: Phil Blackburn
Cc: omkar.chandrasekhar@wipro.com; www-validator@w3.org
Subject: Re: [VE][html5] internal error from xmlns=""

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:42:55 UTC