The Well-Formed Web

Exploring the limits of XML and HTTP

Should you use Content Negotiation in your Web Services?

Should you use Content Negotiation when building your web service? The short answer is no. There are definite problems with conneg and I can give some examples of problems I have run into and also point to problems other have run into.

Continue reading...

2003-09-06 21:54 Comments (15)

Google2Atom

Welcome to the Google2Atom web service. Just enter your search and your Google key below. Once you press "Search" you will get an Atom feed of the search results.

Google Key:


Note: The Google Key is no longer mandatory, if it's not supplied it will use my own key. In light of that please feel free to use my key for experimentation, but if you start making heavy use of this service please get your own Google API Key to avoid limiting others use of this service.

This is a REST based reformulation of the Google API. As such it uses query parameters in a GET based HTTP request to do the search. That is, it works just like the regular google web page, but this form returns a well-formed XML document instead of a web page. Why is this better?

Simplicity
It works just like the google web page, so it is conceptually easier to understand.
Composability
Since the request is just a simple GET the results of a query can be composed with other web services. For example, the results could be transformed using XSLT or fed into a validator.

Bonus Features

One feature found in this interface that is not found in the original Google API is the well-formedness of the results content. PyTidy is used to transform the HTML snippets from the Google API into well-formed XML and place those into 'content' elements with type='text/html' and mode='xml'.

Colophon

Google2Atom is written in Python and uses both the pyTidy and pyGoogle libraries.

2003-11-22 01:18 Comments (0)

wfw namespace elements

The wfw namespace, /CommentAPI/ contains multiple elements. As more are added in various places I will endeavor to keep the list here updated.

Continue reading...

2003-10-10 13:11 Comments (1)

The HTTP verb PUT under Apache: Safe or Dangerous?

"Is the HTTP verb PUT under Apache safe or dangerous?" This is a question I come across often, and have now run into it twice in the work on Atom. So is it safe? The answer is maybe.

Continue reading...

2003-08-23 00:45 Comments (4)

Six Plus One

Previously I talked about the six different places there are to store information in an HTTP transaction. This is slightly misleading.

Continue reading...

2003-08-03 01:34 Comments (0)