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

Re: [VE][html5] Different results between direct-input and by-URI for the same code

From: Michael[tm] Smith <mike@w3.org>
Date: Mon, 6 Jun 2011 12:56:38 +0900
To: Peter Murray <jester@dltj.org>
Cc: www-validator@w3.org
Message-ID: <20110606035624.GA331@sideshowbarker>
Peter Murray <jester@dltj.org>, 2011-06-03 11:44 -0400:

> I am testing the validity of the newly proposed schema.org markup -- and
> in particular the validity of a bare (no value) attribute ('itemscope' in
> the case of schema.org).  I am getting different results based on whether
> I use the direct-input method versus the by-URI method of getting the
> markup to the validator.  If I use direct-input with the contents of the
> URI below the validator returns
>   Line 8, Column 16: required character (found i) (expected =)
> If I use the by-URI or file-upload methods with
>   http://dltj.org/wp-content/uploads/2011/06/schema-event-html5.html
> ....the validation passes.  I can't find a way to account for this
> different result based on the input being fed to the validator.

I tried with direct input but I can't reproduce the error you quote above.
Have you made a change to the source after you reported this?

One thing to note is that if you give the W3C Markup validator some source
with an instance of xmlns="http://www.w3.org/1999/xhtml" on the html start
tag, and you use direct input, the validator assumes you want the document
parsed as well-formed XHTML/XML, not as HTML. So if you have any XML
well-formedness errors in your source, it will fail to parse as XML, and
will report an error like the one you quoted above.

For validating HTML5 documents, if you instead use the front-end here:


...and click the Options button, it will show you an option for manually
choosing which parser you want to use. I think by default it always parses
direct input as text/html, and doesn't make any assumptions based on
instances of xmlns="http://www.w3.org/1999/xhtml" or anything else. If you
want XML parsing, you have to manually select it.


Michael[tm] Smith
Received on Monday, 6 June 2011 03:56:42 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 November 2015 11:01:37 UTC