Re: <http:Response> [status code]

On 05/02/07, Johannes Koch <johannes.koch@fit.fraunhofer.de> wrote:
>
> Hi Alan
>
> Alan Dean schrieb:
> > How should the status code of an HTTP Response be represented in the
> > <http:Response> element? I can't find any reference to this in
> > http://www.w3.org/WAI/ER/HTTP/WD-HTTP-in-RDF-20061201 or in
> > http://lists.w3.org/Archives/Public/public-wai-ert/
>
> See the http:responseCode property in
> <http://www.w3.org/WAI/ER/HTTP/WD-HTTP-in-RDF-20061201#response>.

The doc appears to be silent on how the status code themselves should
be represented. If they're just a string literal then there's not a
lot can be said about them. So given that this is a known set of
important things which have a couple of attributes, I'd suggest
creating a class for them:

:StatusCode a rdfs:Class .

giving the individual codes URIs, e.g.

<http://www.w3.org/2006/12/http#200>

with the current schema extended a little:

<rdf:Property rdf:about="&http-ns;responseCode">
  <rdfs:label xml:lang="en">Response code</rdfs:label>
  <rdfs:comment xml:lang="en">An HTTP response code</rdfs:comment>
  <rdfs:domain rdf:resource="&http-ns;Response"/>
  <rdfs:range rdf:resource="&http-ns;StatusCode"/>
</rdf:Property>

individual codes could be described something like this:

<http://www.w3.org/2006/12/http#200>
   a :StatusCode ;
   rdf:value "200" ;
   rdfs:label "200 OK" ;
   dc:description "The HTTP 200 OK response code "
   rdfs:isDefinedBy
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1> .

There may be other constraints available (making the list a
collection? using OWL property restriction on responseCode?) but I
think just giving the things URIs would be useful in itself.

Cheers,
Danny.

-- 

http://dannyayers.com

Received on Monday, 5 February 2007 09:56:31 UTC