Validate XHTML with SOAP anyone?

Ben Hammersley: Now, if the XHTML validator had the same thing, we could start seeing self-validating blogging tools, that use the SOAP interface (or a REST one, whatever) to check their own output.  OK, I've inquired on the list to see if I can help.  Furthermore, I will assert that this is a REST interface.


"Furthermore, I will assert that this is a REST interface."

And you'd be wrong, by the commonly used definition of REST.

It's like calling a country with faked elections a democracy: it may be technically true, but the people don't get any of the benefits that are commonly associated with democracy.

Posted by Aaron Swartz at

Aaron. Tell me more, I am willing to learn. What would a rest interface look like?

Posted by Sam Ruby at


It would look something like:

http://validator.w3.org/check?uri=http%3A%2F%2Fintertwingly.net%2Fblog%2F&output=

Posted by Aaron Swartz at

The validator already supports

http://feeds.archive.org/validator/check?url=http://www.intertwingly.net/blog/index.rss

This is not the problem I am trying to solve.

And I am trying to do so in a way that eliminates any need for the server to maintain an awareness of the client state beyond the current request.

Suggestions welcome.


Posted by Sam Ruby at


Double oops!

First, it looks like the "earl" got cut off of the URL I submitted. Let's try again:

Examples: <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fintertwingly.net%2Fblog%2F&output=earl">valid</a>, <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.aaronsw.com%2Fweblog%2F&output=earl">invalid</a>

Second, you're right, I missed the bit about sending the full contents of the page. My apologies.

Still, the validator already has one of those too with the file-upload interface on the main page. I haven't tried it, but I bet if you add an output=earl thing to your POST you'll get RDF/XML back.

Posted by Aaron Swartz at

Aaron, I am not trying to put words in your mouth, but I am trying to understand the point you are trying to make.

Are you saying that, in your opinion, a POST with an Content-type of "multipart/form-data" is a REST interface, and that a POST with a Content-type of "text/xml" is not?

Posted by Sam Ruby at

I'd be surprised if having to make your test data available to the validator via a URI is a requirement for RESTfulness ... as Sam implied, this service is for where you have local data that you want to test.

On the Content-Type question, I'm sure that neither you nor Aaron meant that. That said, regarding the content of the message, I do wonder about the SOAP wrapping, although I think I'm supposed to wonder, looking at the seeds you've been planting recently :-)

Sam - since you put up the POST version of the validator, I've been musing on "what would be a good RESTful approach" to this (beyond what you already provide) inbetween Christmas activities. I haven't reached a conclusion yet. It feels good to admit (temporary) failure ;-)

(I've also posted a reply to your question on the rest-discuss list).

Posted by DJ at

DJ - having read Dr. Fielding's dissertation, I am quite confident that it is in accordance with the principles of REST for the client to have state that needs to be transferred. What REST proscribes is simply that all such state be transferred in the request itself, without needing to resort to out of band knowledge or coordination.

As to what Aaron meant, I am still at a loss. I have intentionally chosen an example that is insidiously close to one that is commonly accepted as in compliance with the principles of REST, and yet Aaron feels compelled to reject it out of hand, complete with allusions to the practices of third world dictators.

Posted by Sam Ruby at

Sorry, let me try to make my position more clear.

I misunderstood the original comment. I thought Sam wanted to build something where you POSTed a URL with SOAP and got back a SOAP response about validity. I do not think such a thing is RESTful.

When I realized he wanted to post the whole document I withdrew my comment about being RESTful but pointed out that the validator already did have one of these, and it was much more cleanly designed than some muck involving SOAP.

Hope this helps. (Anyway to get email or RSS feeds for these discussions?)

Posted by Aaron Swartz at

Sam - "all such state be transferred in the request itself, without needing to resort to out of band knowledge or coordination". Indeed, although I'm assuming your definition of "band" here extends beyond the specific message-body of any one HTTP request (or response). State may be also available "out of band" in other related URIs, as shown in this hypothetical example.

Posted by DJ at

Aaron, I do believe that posting a URL is in accordance with the principles of REST. A trackback ping is one such example. This previously had been specified as a GET, but when I implemented this, I chose to support POST too, and alerted Paul Prescod who was instrumental in getting the spec changed.

And if you take a look at the Python code that makes use of the RSS validation SOAP interface, you will see that the SOAP "muck" is totally unobtrusive.

You can get an RSS feed for all comments by clicking on the comments: rss link on the top right of this blog. You can get an rss feed for a specific blog entry by changing the extension from html to rss. Or rss2. Or txt (for rss3). I don't support rss 1.0 for the same reasons that Rael doesn't.

Posted by Sam Ruby at

DJ, hyperlinks are certainly cool from a REST perspective.

Beyond that, I'm not sure how to respond to Paul's example. He almost makes it look like conversations are OK from a REST perspective, when what he is really trying to say is that you can achieve the same results as a conversation would without needing to resort to having the client and/or server maintain an implicit knowledge of the state of the other.

Posted by Sam Ruby at

Sam, I didn't say POSTing a URL wasn't RESTful in all instances. I merely said that it wasn't in the instance where you got back a response about validity of the URL.

Posted by Aaron Swartz at

Aaron, fair enough. I personally don't see anything unRESTful about such a scenario, but I'll concede the point as it really isn't the relevant to the existing RSS validator web service interface.

Posted by Sam Ruby at


RSS validation with SOAP

The orginal posting....

Excerpt from Ben Hammersley.com: "RSS validation with SOAP" at


OK, I've inquired on the list to see if I can help. Furthermore, I will assert that this is a REST interface....

Excerpt from BHDP: RSS validation with SOAP at

Add your comment












Nav Bar