## March 16, 2007

### Validator Face-Off

Can someone please point me to an online Validation Service that deals correctly with the following following three documents? They are not, by any stretch of the imagination, torture tests. They’re about as simple a trio of examples as I could cook up.

But I’ve yet to find an online Validator that handles all three correctly (so far, I’ve only found one that handles two of the three correctly).

Results in popular online validators
XHTML + MathML + Ruby XHTML + MathML + SVG Invalid XHTML
W3C Validator
Validome
WDG Validator
Henri Sivonen’s Validator
Page Valet
Posted by distler at March 16, 2007 10:52 AM

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/1206

### Re: Validator Face-Off

Jacques,

Have you sent these test cases to any of the developer of the validators you mention? Three of them are open source, and it would be constructive to report bugs and send test cases, more so than sadly reporting it on a blog which, probably, neither of them reads.

That said: 1. your first test case is correct 2. I don’t think your second test case is correct. I trust the validators here. At least, you’re using namespaces in a way that is not compatible with XML DTD-based validation, and since the “XHTML + MathML + SVG Profile” is precisely that, a DTD, your document is wrong. 3. your “Invalid XHTML” document is a very pathological case of a limitation of OpenSP, which is still the very best parser for HTML, the most useful and usable and reliable… except for some XML constructs. The next version of the W3C Markup Validator in development , which will go into Beta test in a few weeks, features an additional XML-WF check… based, actually, on an idea found on your blog. You can test the invalid XHTML test case on that dev version of the validator and see that it properly reports it as invalid.

Would you give us your permission to use (and distribute under w3c license) the three documents in our test suite? (Just saying “yes” here should do).

Thank you.

olivier @ W3C / qa-dev

Posted by: olivier Thereaux on March 18, 2007 8:17 PM | Permalink | Reply to this

### Re: Validator Face-Off

Have you sent these test cases to any of the developer of the validators you mention?

Yes I have. Though, to be fair to Henri Sivonen, the first test-case doesn’t really apply to his Validator, as the schema it supports is “XHTML 1.0 + MathML + SVG”, and I was testing a specifically XHTML 1.1 feature.

2. I don’t think your second test case is correct. I trust the validators here. At least, you’re using namespaces in a way that is not compatible with XML DTD-based validation, and since the “XHTML + MathML + SVG Profile” is precisely that, a DTD, your document is wrong.

The document is an example of a perfectly conformant usage of XML Namespaces. Schema-based Validators (Validome and Henri Sivonen’s Validator1) have no problem with it.

It’s true that the DTD places an artificial additional constraint that the SVG-namespaced content be prefixed. But that (in my opinion) is a shortcoming of the DTD (and DTD-based validation).

3. your “Invalid XHTML” document is a very pathological case of a limitation of OpenSP…

But one that is terribly important to me (and to anyone else attempting to follow the W3C’s recommendation and serve XHTML with the proper MIME-type). After all, the error in question is a very easy one to make by mis-typing, and is absolutely fatal, since it renders the page ill-formed.

The next version of the W3C Markup Validator in development , which will go into Beta test in a few weeks, features an additional XML-WF check… based, actually, on an idea found on your blog. You can test the invalid XHTML test case on that dev version of the validator and see that it properly reports it as invalid.

That’s very cool! Thank you.

And I’m glad that, occasionally, something that I write here on this blog proves useful to y’all.

Would you give us your permission to use (and distribute under w3c license) the three documents in our test suite? (Just saying “yes” here should do).

Yes.

(Though I should say that test-cases are best if they test one and only one feature at a time. For dramatic effect, I combined several features into each of my files.)

1 Henri’s Validator has a completely unrelated problem with colons in ID values.

Posted by: Jacques Distler on March 18, 2007 10:58 PM | Permalink | PGP Sig | Reply to this

### Re: Validator Face-Off

Yes I have. Though, to be fair to Henri Sivonen, the first test-case doesn’t really apply to his Validator, as the schema it supports is “XHTML 1.0 + MathML + SVG”, and I was testing a specifically XHTML 1.1 feature.

It would be a great help if I had a pointer to a real list of differences between XHTML 1.0 Strict and the XHTML part of the XHTML 1.1 plus MathML 2.0 plus SVG 1.1 profile. It seems to me that I cannot trust the delta information in the XHTML 1.1 spec. It doesn’t mention target for instance.

Henri’s Validator has a completely unrelated problem with colons in ID values.

I blame this on XSD arbitrarily changing the lexical space of ID from Name to NCName. I intend to implement a proper datatype library for this in due course.

In addition, it appears that I have to make my Billion Laughs defense less aggressive.

Posted by: Henri Sivonen on March 28, 2007 6:16 AM | Permalink | Reply to this

### Re: Validator Face-Off

Yes I have. Though, to be fair to Henri Sivonen, the first test-case doesn’t really apply to his Validator, as the schema it supports is “XHTML 1.0 + MathML + SVG”, and I was testing a specifically XHTML 1.1 feature.

It would be a great help if I had a pointer to a real list of differences between XHTML 1.0 Strict and the XHTML part of the XHTML 1.1 plus MathML 2.0 plus SVG 1.1 profile. It seems to me that I cannot trust the delta information in the XHTML 1.1 spec. It doesn’t mention target for instance.

I still haven’t taken the time to develop a proper XHTML 1.1 + SVG 1.1 + MathML 2.0 schema. However, I’m offering a schema for XHTML 1.0 Strict + Ruby + SVG 1.1 + MathML 2.0 + RDF hole + OpenMath hole + Inkscape hole + some HTML5 datatyping.

Both cases now validate.

Henri’s Validator has a completely unrelated problem with colons in ID values.

I blame this on XSD arbitrarily changing the lexical space of ID from Name to NCName. I intend to implement a proper datatype library for this in due course.

I now have a datatype for XML Name.

Posted by: Henri Sivonen on December 19, 2007 9:32 AM | Permalink | Reply to this

### Re: Validator Face-Off

the XHTML + MathML + SVG Profile spec has instructions and examples for you to fix your second doc.

Posted by: olivier Thereaux on March 18, 2007 8:28 PM | Permalink | Reply to this

### Re: Validator Face-Off

Hi Jacques,

I’ve just seen your posting (thank you for the mail). We will take a look during the next days and answer. As Olivier mentionned, it will be nice, if we could use your test cases for the upcomming framework. The “Beta” will become public during the next three days.
Best regards,
Alex

Posted by: Alex on March 18, 2007 11:06 PM | Permalink | Reply to this

### Re: Validator Face-Off

It’s bit ironic but I would not be too serious about validators other than w3c’s one.

Posted by: Henry, web application developer on May 29, 2007 1:12 PM | Permalink | Reply to this

### Re: Validator Face-Off

w3c’s said something like href=”#” is valid, but validome was not

Posted by: dani on March 15, 2009 6:29 PM | Permalink | Reply to this
Read the post Inline SVG and Valid XHTML on WordPress
Weblog: Dani Iswara .Net
Excerpt: In previous post, I tried to serve users with inline SVG (Scalable Vector Graphics) which valid XHTML (Extensible HyperText Markup Language) on WordPress engine. But I failed. Yes, I know that valid XHTML is not a must for some users, and it’s an...
Tracked: April 19, 2009 4:53 AM

Post a New Comment