|
RepresentationsThe are currently two different representation formats available at this website: HTML and XML. The HTML representation is intended for human viewing via a browser. The XML representation is intended for programmatic access. The two formats have been designed to be isomorphic, which means that they are similar in structure, content and links. Format specificationThere are two different ways of specifying which format the response should have. The URL can be made to specify the format directly. A suffix '.xml' or '.html' is simply appended to the end of the URL. It must be added to the path part of the URL, i.e. before the query parameters, if any. This design was chosen to look like the file extension used in ordinary computer file systems. The alternative way is to rely on HTTP content negotiation. The client software sends an 'Accept' header to the server, which specifies what MIME types the client can handle. In our case, this is of interest only when the client is a user program. In most HTTP libraries it is possible to set the headers explicitly. If there is a conflict, i.e. both methods are used simultaneously, then the explicit URL specifier takes precedence. Some browsers send an 'Accept' header claiming they would prefer XML to HTML, which does not make sense. This is ignored; the response will be HTML if that format is mentioned (regardless of its priority) in the 'Accept' header. This is non-standard, but unfortunately necessary behaviour. Gzip compressionClient software may be configured to retrieve the representations in compressed form to save transfer bandwidth. The 'Accept-Encoding' and 'Content-Encoding' headers are supported, currently only for gzip compression. XML representationThe XML format was designed to be easy to traverse and search using standard technologies such as DOM, SAX and Xpath. The format currently has no formal definition, but it is likely that an XML Schema definition will be presented here at a later stage. In the meanwhile, a few excerpts of XML documents are shown below. For better viewing, the indentation has been edited slightly, and a few very long lines have been deleted. NOTE: The GO/wr XML format is different from the official RDF-XML and OWL-XML formats provided by the Gene Ontology consortium. Representation for term XXXRequest URL: http://www.avatar.se/GO/wr/term/XXX.xml
|
| GO/wr 0.9 copyright 2007-2008 © Avatar Software AB |