W3C home > Mailing lists > Public > public-wai-ert@w3.org > June 2009

Re: [HTTP-in-RDF] new editor's fraft

From: Michael A Squillace <masquill@us.ibm.com>
Date: Thu, 18 Jun 2009 09:22:48 -0500
To: public-wai-ert@w3.org
Message-ID: <OFF3475524.39585914-ON852575D9.004ED33B-862575D9.004F00E8@us.ibm.com>

Group:
It would be personally easier for me both in terms of reading the document
and of uploading it to CVS if we attached html/xhtml documents rather than
inline in the notes. Johannes - do you mind doing this for this and the
Content doc?
Thanks,

--> Mike Squillace
IBM Human Ability and Accessibility Center

W:512.286.8694
M:512.970.0066

External: http://www.ibm.com/able
Internal: http://w3.ibm.com/able


                                                                           
             Johannes Koch                                                 
             <johannes.koch@fi                                             
             t.fraunhofer.de>                                           To 
             Sent by:                  ERT WG <public-wai-ert@w3.org>      
             public-wai-ert-re                                          cc 
             quest@w3.org                                                  
                                                                   Subject 
                                       [HTTP-in-RDF] new editor's fraft    
             06/18/2009 09:06                                              
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           




Hi group,

please find attached a new editor's draft of HTTP-in-RDF.

BTW, I found out that there's an RDF schema at
<http://www.w3.org/2006/http.rdfs> and at
<http://www.w3.org/2008/http.rdfs>. The namespace we use is
"http://www.w3.org/2006/http#".

--
Johannes Koch
Fraunhofer Institute for Applied Information Technology FIT
Web Compliance Center
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628    Fax: +49-2241-142065
[attachment "http.rdf" deleted by Michael A Squillace/Austin/IBM] W3C




HTTP Vocabulary in RDF
Editor's Working Draft 18 June 2009
This version:
      http://www.w3.org/WAI/ER/HTTP/WD-HTTP-in-RDF-20090618
Latest published version:
      http://www.w3.org/TR/HTTP-in-RDF/
Latest internal version:
      http://www.w3.org/WAI/ER/HTTP-in-RDF/
Previous published version:
      http://www.w3.org/TR/2008/WD-HTTP-in-RDF-20080908/
Previous internal version:
      http://www.w3.org/WAI/ER/HTTP/WD-HTTP-in-RDF-20090514
Editors:
      Johannes Koch, Fraunhofer-Gesellschaft (Fraunhofer Institute for
      Applied Information Technology FIT)
      Carlos A Velasco, Fraunhofer-Gesellschaft (Fraunhofer Institute for
      Applied Information Technology FIT)


The terms defined by this document are also provided in RDF Schema format.


Copyright  2008 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C
liability, trademark and document use rules apply.



Abstract


The identification of resources on the Web by a Uniform Resource Identifier
(URI) alone may not be sufficient, as other factors such as HTTP content
negotiation might come into play. This issue is particularly significant
for quality assurance testing, conformance claims, and reporting languages
like the W3C Evaluation And Report Language (EARL). This document provides
a representation of the HTTP vocabulary in the Resource Description
Framework (RDF), to allow quality assurance tools to record the HTTP
headers that have been exchanged between a client and a server. The RDF
terms defined by this document represent the core HTTP specification
defined by RFC 2616, as well as additional HTTP headers registered by the
Internet Assigned Numbers Authority (IANA). These terms can also be used to
record HTTPS exchanges.


Status of this document


This section describes the status of this document at the time of its
publication. Other documents may supersede this document. A list of current
W3C publications and the latest revision of this technical report can be
found in the W3C technical reports index at http://www.w3.org/TR/.


This Working Draft of the HTTP Vocabulary in RDF document was published on
8 September 2008 by the Evaluation and Repair Tools Working Group (ERT WG).
It is an update of the previous HTTP Vocabulary in RDF Working Draft of 23
March 2007, and addresses the comments received since (see history of
document changes). This document is part of the W3C Evaluation And Report
Language (EARL). It is expected to be the last working draft before
publication as a W3C Working Group Note.


[Editor's note: change text appropriately]


The RDF terms defined by this document can be used to extend the Evaluation
And Report Language (EARL) 1.0 Schema, but can also be used separately to
record an HTTP exchange between a client and a server for any purpose. The
Working Group encourages feedback about the approach, as well as about the
completeness and maturity of this document by developers and researchers
who have interest in a representation of the HTTP vocabulary in RDF format.
Feedback from the W3C Quality Assurance Interest Group, the W3C Semantic
Web Interest Group, and the Protocol for Web Description Resources Working
Group is particularly welcome. Please send comments on this document by @@@
CHANGE @@@29 September 2008 to the public mailing list of the working group
public-wai-ert@w3.org. The archives of the working group mailing list are
publicly available.


[Editor's note: change date for comments]


Publication as a Working Draft does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite this
document as other than work in progress.


This document was produced by a group operating under the 5 February 2004
W3C Patent Policy. The group does not expect this document to become a W3C
Recommendation. W3C maintains a public list of any patent disclosures made
in connection with the deliverables of the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains Essential
Claim(s) must disclose the information in accordance with section 6 of the
W3C Patent Policy.



Table of Contents
   1. Introduction
            1.1 Namespaces
            1.2 Use Cases
            1.3 Limitations
   2. Classes
            2.1 Connection Class
            2.2 Message Class
                  2.2.1 Request Class
                  2.2.2 Response Class
            2.3 MessageHeader Class
            2.4 HeaderElement Class
            2.5 Parameter Class
            2.6 Method Class
            2.7 StatusCode Class
            2.8 HeaderName Class
   3. Properties
            3.1 body Property
            3.2 connectionAuthority Property
            3.3 elementName Property
            3.4 elementValue Property
            3.5 fieldName Property
            3.6 fieldValue Property
            3.7 headers Property
            3.8 headerElements Property
            3.9 hdrName Property
            3.10 httpVersion Property
            3.11 mthd Property
            3.12 methodName Property
            3.13 params Property
            3.14 paramName Property
            3.15 paramValue Property
            3.16 reasonPhrase Property
            3.17 requests Property
            3.18 requestURI Property
                  3.18.1 absoluteURI Property
                  3.18.2 abs_path Property
                  3.18.3 authority Property
            3.19 resp Property
            3.20 sc Property
            3.21 statusCodeNumber Property
   4. Conformance
            4.1 Conforming HTTP-in-RDF graphs
            4.2 Conforming Producers
            4.3 Conforming Consumers
Appendices
   A. A practical Example
   B. Terms
   C. References
   D. Document Changes

1 Introduction


This document defines a representation of the Hypertext Transfer Protocol
(HTTP) using the Resource Description Framework (RDF). It defines a
collection of RDF classes and properties that represent the HTTP vocabulary
as defined by the HTTP specification. These RDF terms can be used to record
HTTP or secure HTTP request and response messages in RDF format, such as by
automated Web accessibility evaluation tools that want to describe Web
resources, including the various headers exchanged between the client and
server during content negotiation. More usage examples for these terms are
described in section 1.2 Use Cases.


This document is not intended to be a clarification or extension of the
different concepts of the HTTP specification. The HTTP specification is
defined by a series of Request for Comments (RFC) publications and other
documentation, including RFC 2616 and RFC 4229. These are listed in
Appendix C: References.


Additionally this document assumes the following background knowledge:
      Basic knowledge of the Extensible Markup Language (XML) [XML] and its
      associated technologies.
      Basic knowledge about the Semantic Web and RDF. For references,
      consult [RDF], [RDF-PRIMER] and [RDFS].


By default, the vocabulary introduced by this document uses names starting
with upper-case letters for classes and names starting with lower-case
letters for properties. The keywords must, required, recommended, should,
may, and optional are used in accordance with [RFC2119].


1.1 Namespaces


The RDF representation of the HTTP vocabulary defined by this document uses
the namespace http://www.w3.org/2006/http#. The prefix http is used
throughout this document to denote this namespace. Table 1 presents the
namespaces used by this document. The prefix notation presents the typical
conventions used in the Web and in this document to denote a given
namespace, and can be freely modified. Table 2 presents additional RDF data
used by this document.


|-----------------+                                                       
|Table 1:         |                                                       
|namespaces used  |                                                       
|by this document.|                                                       
|                 |                                                       
|-----------------+------------------------------------------------------ 
|Namespace prefix |       Namespace URI        |       Description       |
|-----------------+----------------------------+-------------------------|
|http             |http://www.w3.org/2006/http#|Namespace for the core   |
|                 |                            |terms of HTTP vocabulary |
|                 |                            |in RDF.                  |
|-----------------+----------------------------+-------------------------|
|cnt              |http://www.w3.org/2008/conte|Namespace for            |
|                 |nt#                         |Representing Content in  |
|                 |                            |RDF [Content-in-RDF].    |
|-----------------+----------------------------+-------------------------|
|dct              |http://purl.org/dc/terms/   |Namespace for the Dublin |
|                 |                            |Core Metadata Terms.     |
|-----------------+----------------------------+-------------------------|
|rdf              |http://www.w3.org/1999/02/22|Namespace for RDF [RDF]. |
|                 |-rdf-syntax-ns#             |                         |
|-----------------+----------------------------+-------------------------|


|---------------------------+                                              
|Table 2: RDF data used by  |                                              
|this document.             |                                              
|---------------------------+--------------------------------------------- 
|            URI            |                 Description                 |
|---------------------------+---------------------------------------------|
|http://www.w3.org/2008/http|HTTP headers as registered by the IANA (see [|
|-headers                   |RFC4229], [Permanent Headers], and [         |
|                           |Provisional Headers]).                       |
|---------------------------+---------------------------------------------|
|http://www.w3.org/2008/http|HTTP methods for requests.                   |
|-methods                   |                                             |
|---------------------------+---------------------------------------------|
|http://www.w3.org/2008/http|HTTP status codes for responses.             |
|-statusCodes               |                                             |
|---------------------------+---------------------------------------------|


1.2 Use Cases


The following (non-exhaustive) list of use cases aims to highlight some of
the different usages of the terms provided by this document:
Reporting Test Results
      When Web resources are tested, for example for accessibility or other
      quality assurance testing, it may be significant to record the exact
      headers exchanged between the server and the client during the
      testing. Without a record of the exchanged headers, it may not be
      possible to re-identify the exact resource (or representation of the
      resource) that has been tested. The terms provided by this document
      allow quality assurance tools to record the HTTP exchange between a
      client and a server, for example to record the POST parameters or the
      headers used during content negotiation. The terms provided by this
      document can be used in combination with the W3C Evaluation And
      Report Language (EARL) [EARL].
Precising Conformance Claims
      Conformance claims that are made about a Web resource or group of Web
      resource, are sometimes only applicable under certain constraints.
      For example, conformance of a Web site to the W3C Web Content
      Accessibility Guidelines (WCAG) [WCAG], may only be applicable for a
      certain language of the Web site that is using language negotiation.
      When provding machine-readable conformance claims, for example using
      the W3C Protocol for Describing Web Resources (POWDER): Description
      Resources [POWDER-DR], it is important to precise any such
      constraints that may apply.
Debugging Web Applications
      Web applications using client-side scripting such as AJAX may
      exchange additional HTTP messages with the server without using a
      different URI. In order to debug such Web applications, it must be
      possible to reconstruct the exact history of the states through which
      the Web application passed. Web authoring tools that are designed to
      develop and debug Web applications could use the terms provided by
      this document to record the exact HTTP messages exchanged bewteen a
      client and a server. This information could be provided to the
      developer as a log to help debug errors in the Web application..
Indexing Information Resources
      When indexing RDF information resources that are available through
      the HTTP protocol (also called "scuttering" in Semantic Web
      parlance), it is often useful to record information about the HTTP
      request and response messages that were exchanged, along with the
      data for later use. In some instances, different representations of
      the RDF information may be retrieved from the server depending on the
      HTTP headers and paramters exchanged. The terms provided by this
      document can be used to supplement the collected data with the HTTP
      messages as part of a comprehensive indexing repository.
1.3 Limitations


There are also notable schema limitations with regards to security and
privacy since the content recorded by this vocabulary could potentially
contain sensitive information, for example authentication information in
HTTP headers or other information (login user name, passwords, and so on)
within the body of the message. Since the schema of this document is
limited to terms defined by the HTTP vocabulary, security and privacy
considerations need to be made at the application level. For example,
certain parts of the data may be restricted to appropriate user permissions
or obfuscated.


2 Classes


This section defines RDF classes for the HTTP 1.1 specification according
to [RFC2616].


2.1 Connection Class


A connection that is used for the HTTP transfer.


Related Properties
      Domain of:
            http:connectionAuthority
            http:requests
      Range of: none
Examples


    Example 2.1: A Connection resource.


        <http:Connection rdf:ID="conn">
          <http:connectionAuthority
        >www.example.org:80</http:connectionAuthority>
          <http:requests rdf:parseType="Collection">
            <http:Request rdf:ID="req0"/>
            <http:Request rdf:ID="req1"/>
          </http:requests>
        </http:Connection>
2.2 Message Class


An HTTP message.


Related Properties
      Domain of:
            http:httpVersion
            http:headers
            http:body
      Range of: none


It may be appropriate to provide additional information about the Message
by using the following from external vocabularies:
dct:date external link
      Message date (see the usage of this property in requests and
      responses).
Examples


    Example 2.2: A Message resource.


        <http:Message rdf:ID="mess0">
          <http:httpVersion>1.1</http:httpVersion>
          <dct:date>2007-09-13</dct:date>
          <http:headers rdf:parseType="Collection">
            <http:MessageHeader rdf:ID="mh0"/>
            <http:MessageHeader rdf:ID="mh1"/>
          </http:headers>
          <http:body>
            <cnt:Content rdf:ID="cont0"/>
          </http:body>
        </http:Message>


There are two subclasses from the http:Message class: http:Request and
http:Response.


2.2.1 Request Class


An HTTP request. The http:Request class is a subclass of the http:Message
class.


Related Properties
      Domain of:
            http:methodName
            http:mthd
            http:requestURI
            http:resp
      Range of: none


The dct:date property when used in a Request resource represents the date
the request was sent by the client.


Examples


    Example 2.3: A Request resource.


        <http:Request rdf:ID="reqs0">
          <http:abs_path>/</http:abs_path>
          <http:methodName>GET</http:methodName>
          <http:mthd rdf:resource="http://www.w3.org/2008/http-methods#GET
        "/>
          <http:resp rdf:resource="#resp0"/>
          <dct:date>2007-09-13</dct:date>
          <http:httpVersion>1.1</http:httpVersion>
          <http:headers rdf:parseType="Collection">
            <http:MessageHeader rdf:about="#mh0"/>
            <http:MessageHeader rdf:about="#mh1"/>
          </http:headers>
        </http:Request>
2.2.2 Response Class


An HTTP response. The http:Response class is a subclass of the http:Message
class.


Related Properties
      Domain of:
            http:statusCodeNumber
            http:sc
            http:reasonPhrase
      Range of:
            http:resp


The dct:date property when used in a Response resource represents the date
the response was received by the client.


Examples


    Example 2.4: A Response resource.


        <http:Response rdf:ID="resp0">
          <http:httpVersion>1.1</http:httpVersion>
          <dct:date>2008-01-11</dct:date>
          <http:statusCodeNumber>200</http:statusCodeNumber>
          <http:sc rdf:resource="
        http://www.w3.org/2008/http-statusCodes#statusCode200"/>
          <http:headers rdf:parseType="Collection">
            <http:MessageHeader rdf:about="#mh2"/>
            <http:MessageHeader rdf:about="#mh3"/>
          </http:headers>
          <http:body>
            <cnt:Content rdf:ID="cont0"/>
          </http:body>
        </http:Response>
2.3 MessageHeader Class


A header in an HTTP message.


Related Properties
      Domain of:
            http:fieldName
            http:hdrName
            http:fieldValue
            http:headerElements
      Range of: none
Examples


    Example 2.5: A MessageHeader resource.


        <http:MessageHeader rdf:ID="mh0">
          <http:fieldValue>text/html, image/png,
        image/gif;q=0.8</http:fieldValue>
          <http:fieldName>Accept</http:fieldName>
          <http:hdrName rdf:resource="
        http://www.w3.org/2008/http-headers#accept"/>
          <http:headerElements rdf:parseType="Collection">
            <http:HeaderElement rdf:about="#he0"/>
            <http:HeaderElement rdf:about="#he1"/>
            <http:HeaderElement rdf:about="#he2"/>
          </http:headerElements>
        </http:MessageHeader>
2.4 HeaderElement Class


An element in a header value, if a Message Header value can be decomposed
into several parts.


Related Properties
      Domain of:
            http:elementName
            http:elementValue
            http:params
      Range of: none
Examples


    Example 2.6: A HeaderElement resource.


        <http:HeaderElement rdf:ID="he0">
          <http:elementName>image/gif</http:elementName>
          <http:params rdf:parseType="Collection">
            <http:Parameter rdf:ID="param0"/>
          </http:params>
        </http:HeaderElement>
2.5 Parameter Class


A parameter in a Header Element.


Related Properties
      Domain of:
            http:paramName
            http:paramValue
      Range of: none
Examples


    Example 2.7: A Parameter resource.


        <http:Parameter rdf:ID="param0">
          <http:paramName>q</http:paramName>
          <http:paramValue>0.8</http:paramValue>
        </http:Parameter>
2.6 Method Class


The HTTP 1.1 specification defines eight methods: OPTIONS, GET, HEAD, POST,
PUT, DELETE, TRACE, CONNECT. The RDF graph available in RDF/XML at
http://www.w3.org/2008/http-methods provides http:Method resources for each
of these to be used as objects for the http:mthd property. A resource of
type http:Method represents the name of a method used with HTTP.


Related Properties
      Domain of: none
      Range of:
            http:mthd
2.7 StatusCode Class


[HTTP Status Codes] is a registry for status codes too be used in HTTP. The
RDF graph available in RDF/XML at http://www.w3.org/2008/http-statusCodes
provides http:StatusCode resources for each of these to be used as objects
for the http:sc property. A resource of type http:StatusCode represents a
status code.


Related Properties
      Domain of: none
      Range of:
            http:sc
2.8 HeaderName Class


Header names to be used in HTTP are registered by the IANA (see [RFC4229],
[Permanent Headers], and [Provisional Headers]). The RDF graph available in
RDF/XML at http://www.w3.org/2008/http-headers provides http:HeaderName
resources for each of these to be used as objects for the http:hdrName
property. A resource of type http:HeaderName represents the name of a
header used with HTTP.


Related Properties


Properties defined by this document:
      Domain of: none
      Range of:
            http:hdrName
3 Properties


This section defines RDF properties for the HTTP 1.1 specification
according to [RFC2616].


3.1 body Property


This property relates a resource object of the type Message to a resource
object of the type cnt:Content or a subclass thereof to be the Message's
entity body as defined in [RFC2616]. HTTP bodies are series of bytes. Thus
for the resource object, it is appropriate to point to a
cnt:ContentAsBase64 resource (see [Content-in-RDF] for more information on
content representations using the Resource Desription Framework (RDF)).
Domain:
      http:Message
Range:
      cnt:ContentAsBase64 external link
Examples


    Example 3.1: The entity body of a message.


        <http:Message rdf:ID="mess0">
            <http:body>
              <cnt:ContentAsBase64 rdf:ID="cont0-bin"/>
            </http:body>
          </http:Message>
3.2 connectionAuthority Property


Connection authority - server host and port for a connection.
Domain:
      http:Connection
Range:
      Literal
3.3 elementName Property


Header element name (Literal).
Domain:
      http:HeaderElement
Range:
      Literal
3.4 elementValue Property


Header element value (Literal).
Domain:
      http:HeaderElement
Range:
      Literal
3.5 fieldName Property


Header name (Literal).
Domain:
      http:MessageHeader
Range:
      Literal
3.6 fieldValue Property


Header value (Literal).
Domain:
      http:MessageHeader
Range:
      Literal
3.7 headers Property


HTTP headers sent with the message.
Domain:
      http:Message
Range:
      unspecified
3.8 headerElements Property


Header value elements.
Domain:
      http:MessageHeader
Range:
      unspecified
3.9 hdrName Property


This property relates a resource of type http:MessageHeader to a resource
of type http:HeaderName.
Domain:
      http:MessageHeader
Range:
      http:HeaderName
3.10 httpVersion Property


Property representing the HTTP version number as a Literal (the format is
'digit.digit').
Domain:
      http:Message
Range:
      Literal
3.11 mthd Property


HTTP method.
Domain:
      http:Request
Range:
      http:Method
3.12 methodName Property


HTTP method name (Literal).
Domain:
      http:Request
Range:
      Literal
3.13 params Property


Header element parameters.
Domain:
      http:HeaderElement
Range:
      unspecified
3.14 paramName Property


Parameter name.
Domain:
      http:Parameter
Range:
      Literal
3.15 paramValue Property


Parameter value.
Domain:
      http:Parameter
Range:
      Literal
3.16 reasonPhrase Property


Reason phrase sent by the server.
Domain:
      http:Response
Range:
      Literal
3.17 requests Property


HTTP requests sent via the connection.
Domain:
      http:Connection
Range:
      unspecified
3.18 requestURI Property


The request URI as specified in section 5.1.2 of [RFC2616]. This vocabulary
defines the following sub-properties:
      http:absoluteURI
      http:abs_path
      http:authority
Domain:
      http:Request
Range:
      Literal
Examples


    Example 3.2: The use of the requestURI property.


        <http:Request>
          <http:methodName>OPTIONS</http:methodName>
          <http:requestURI>*</http:requestURI>
          ...
        </http:Request>
3.18.1 absoluteURI Property


Request URI that is an absolute URI.


Conformance Note: The object for this property must be a Literal (absolute
URI).


Examples


    Example 3.3: The use of the absoluteURI property.


        <http:Request>
          <http:methodName>GET</http:methodName>
          <http:absoluteURI
        >http://www.example.org:80/foo/bar</http:absoluteURI>
          ...
        </http:Request>
3.18.2 abs_path Property


Request URI that is an absolute path.


Conformance Note: The object for this property must be a Literal (absolute
path).


Examples


    Example 3.4: The use of the abs_path property.


        <http:Request>
          <http:methodName>GET</http:methodName>
          <http:abs_path>/foo/bar</http:abs_path>
          ...
        </http:Request>
3.18.3 authority Property


Request URI that is an authority.


Conformance Note: The object for this property must be a Literal (host and
optional port number).


Examples


    Example 3.5: The use of the authority property.


        <http:Request>
          <http:methodName>CONNECT</http:methodName>
          <http:authority>www.example.org:80</http:authority>
          ...
        </http:Request>
3.19 resp Property


This property relates a resource of type http:Request to a resource of type
http:Response.
Domain:
      http:Request
Range:
      http:Response
3.20 sc Property


This property relates a resource of type http:Response to a resource of
type http:StatusCode.
Domain:
      http:Response
Range:
      http:StatusCode
3.21 statusCodeNumber Property


The status code sent by the server (Literal).
Domain:
      http:Response
Range:
      Literal
4 Conformance


This section describes conformance with this HTTP-in-RDF specification. It
differentiates between the following entities:


[Editor's note: The working group asks for comments about a more colloquial
word for "HTTP-in-RDF Graph".]
HTTP-in-RDF Graph
      An individual file or collection of files that contain HTTP-in-RDF
      data
HTTP-in-RDF Producer
      A software tool or Web-based application that produces HTTP-in-RDF
      data
HTTP-in-RDF Consumer
      A software tool or Web-based application that processes HTTP-in-RDF
      data
4.1 Conforming HTTP-in-RDF graphs


Graphs conforming to this HTTP-in-RDF specification must meet the following
requirements:
   1. A Connection must have exactly one connection authority (specified by
      http:connectionAuthority).
   2. A Connection may have one collection of Requests (referenced by
      http:requests).
   3. A Message must have exactly one HTTP version (specified by
      http:httpVersion).
   4. A Message may have one collection of Message Headers (referenced by
      http:headers).
   5. A Message may have one message body (referenced by http:body).
   6. A Message may have one date (specified by dct:date external link).
   7. A Request must have exactly one method name (specified by
      http:methodName).
   8. A Request must have exactly one request URI (specified by
      http:requestURI).
   9. A Request may be connected to one Method (referenced by http:mthd).
   10.      A Request may be connected to one Response (referenced by
      http:resp).
   11.      A Response must have exactly one status code number (specified
      by http:statusCodeNumber).
   12.      A Response must have exactly one reason phrase (specified by
      http:reasonPhrase).
   13.      A Response may be conected to one Status Code (referenced by
      http:sc).
   14.      A Message Header must have exactly one field name (specified by
      http:fieldName).
   15.      A Message Header must have exactly one field value (specified
      by http:fieldValue).
   16.      A Message Header may be connected to one Header Name
      (referenced by http:hdrName).
   17.      A Message Header may have one collection of Header Elements
      (referenced by http:headerElements).
   18.      A Header Element must have exactly one header element name
      (specified by http:elementName).
   19.      A Header Element may have one header element value (specified
      by http:elementValue).
   20.      A Header Element may have one collection of Parameters
      (referenced by http:params).
   21.      A Parameter must have exactly one parameter name (specified by
      http:paramName).
   22.      A Parameter must have exactly one parameter value (specified by
      http:paramValue).
   23.      The objects for the headers property must be an RDF Collection
      of Message Headers.
   24.      The objects for the http:headerElements property must be an RDF
      Collection of Header Elements.
   25.      The object for the http:params property must be an RDF
      Collection of Parameters.
   26.      The object for the http:requests property must be an RDF
      Collection of Requests.
   27.      Every instance of cnt:ContentAsBase64 external linkmust conform
      with the respective specification.
4.2 Conforming Producers


Producers conforming to this HTTP-in-RDF specification must meet the
following requirements:
   1. A Producer must generate conforming graphs
   2. A Producer must be able to generate graphs in RDF/XML serialization
      and should also support other RDF serializations
   3. A Producer must generate all of the terms summarized in Appendix B:
      Terms for which there is information available to it
4.3 Conforming Consumers


Consumers conforming to this HTTP-in-RDF specification must meet the
following requirements:
   1. A Consumer must process conforming graphs
   2. A Consumer must process graphs in any RDF/XML serialization and
      should also support other RDF serializations
   3. A Consumer must process all of the terms summarized in Appendix B:
      Terms for which there is information available to it

Appendix A: A practical Example


The following example shows an RDF/XML representation of an HTTP request
and response pair.


Scenario Description


A client sends two requests to a server at www.example.org port 80 via HTTP
1.1 GET. With each request, it sends request headers. The first request is
for a resource in the document root (/), the second for a resource at
/image. While handling the second request the server performs content
negotiation respecting the request's Accept header and so sends a PNG
image. This is indicated by the response's Vary header.


Resulting RDF/XML
    <?xml version="1.0" encoding="utf-8"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:http="http://www.w3.org/2006/http#"
      xmlns:cnt="http://www.w3.org/2008/content#"
      xmlns:dct="http://purl.org/dc/terms/">

      <http:Connection rdf:ID="conn">
        <http:connectionAuthority
    >www.example.org:80</http:connectionAuthority>
        <http:requests rdf:parseType="Collection">
          <http:Request rdf:about="#req0"/>
          <http:Request rdf:about="#req1"/>
        </http:requests>
      </http:Connection>

      <http:Request rdf:about="#req0">
        <http:httpVersion>1.1</http:httpVersion>
        <http:methodName>GET</http:methodName>
        <http:mthd rdf:resource="http://www.w3.org/2008/http-methods#GET"/>
        <http:abs_path>/</http:abs_path>
        <http:headers rdf:parseType="Collection">
          <http:MessageHeader>
            <http:fieldName>Host</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#host"/>
            <http:fieldValue>www.example.org</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>User-Agent</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#user-agent"/>
            <http:fieldValue>My User Agent</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>Accept</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#accept"/>
            <http:fieldValue>text/html, image/png,
    image/gif;q=0.8</http:fieldValue>
            <http:headerElements rdf:parseType="Collection">
              <http:HeaderElement>
                <http:elementName>text/html</http:elementName>
              </http:HeaderElement>
              <http:HeaderElement>
                <http:elementName>image/png</http:elementName>
              </http:HeaderElement>
              <http:HeaderElement>
                <http:elementName>image/gif</http:elementName>
                <http:params rdf:parseType="Collection">
                  <http:Parameter>
                    <http:paramName>q</http:paramName>
                    <http:paramValue>0.8</http:paramValue>
                  </http:Parameter>
                </http:params>
              </http:HeaderElement>
            </http:headerElements>
          </http:MessageHeader>
        </http:headers>
        <http:resp rdf:resource="#resp0"/>
      </http:Request>

      <http:Request rdf:about="#req1">
        <http:httpVersion>1.1</http:httpVersion>
        <http:methodName>GET</http:methodName>
        <http:mthd rdf:resource="http://www.w3.org/2008/http-methods#GET"/>
        <http:abs_path>/image</http:abs_path>
        <http:headers rdf:parseType="Collection">
          <http:MessageHeader>
            <http:fieldName>Host</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#host"/>
            <http:fieldValue>www.example.org</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>User-Agent</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#user-agent"/>
            <http:fieldValue>My User Agent</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>Accept</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#accept"/>
            <http:fieldValue>image/png, image/gif;q=0.8</http:fieldValue>
            <http:headerElements rdf:parseType="Collection">
              <http:HeaderElement>
                <http:elementName>image/png</http:elementName>
              </http:HeaderElement>
              <http:HeaderElement>
                <http:elementName>image/gif</http:elementName>
                <http:params rdf:parseType="Collection">
                  <http:Parameter>
                    <http:paramName>q</http:paramName>
                    <http:paramValue>0.8</http:paramValue>
                  </http:Parameter>
                </http:params>
              </http:HeaderElement>
            </http:headerElements>
          </http:MessageHeader>
        </http:headers>
        <http:resp rdf:resource="#resp1"/>
      </http:Request>

      <http:Response rdf:ID="resp0">
        <http:httpVersion>1.1</http:httpVersion>
        <http:statusCodeNumber>200</http:statusCodeNumber>
        <http:sc rdf:resource="http://www.w3.org/2008/http-statusCodes#200
    "/>
        <http:reasonPhrase>OK</http:reasonPhrase>
        <http:headers rdf:parseType="Collection">
          <http:MessageHeader>
            <http:fieldName>Date</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#date"/>
            <http:fieldValue>.......</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>Content-Type</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#content-type"/>
            <http:fieldValue>text/html; charset=utf-8</http:fieldValue>
            <http:headerElements rdf:parseType="Collection">
              <http:HeaderElement>
                <http:elementName>text/html</http:elementName>
                <http:params rdf:parseType="Collection">
                  <http:Parameter>
                    <http:paramName>charset</http:paramName>
                    <http:paramValue>utf-8</http:paramValue>
                  </http:Parameter>
                </http:params>
              </http:HeaderElement>
            </http:headerElements>
          </http:MessageHeader>
        </http:headers>
        <http:body>
          <cnt:ContentAsBase64 rdf:ID="cont0-bin">
            <cnt:bytes rdf:datatype="
    http://www.w3.org/2001/XMLSchema#base64Binary"
              >ajrq9qguojbglj48z..........</cnt:bytes>
          </cnt:ContentAsBase64>
        </http:body>
      </http:Response>

      <cnt:XMLContent rdf:ID="cont0-xml">
        <dct:source rdf:resource="#cont0-bin"/>
        <cnt:xmlLeadingMisc rdf:parseType="Literal"><!-- This is the start
    of the document -->
    </cnt:xmlLeadingMisc>
        <cnt:docTypeDecl>
          <cnt:DocTypeDecl>
            <cnt:dtdName>html</cnt:dtdName>
            <cnt:publicId>-//W3C//DTD XHTML 1.0 Strict//EN</cnt:publicId>
            <cnt:systemId rdf:datatype="
    http://www.w3.org/2001/XMLSchema#anyURI"

    >http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</cnt:systemId>
          </cnt:DocTypeDecl>
        </cnt:docTypeDecl>
        <cnt:xmlRest rdf:parseType="Literal"><html xmlns="
    http://www.w3.org/1999/xhtml" lang="en">
      <head>
        <title>My document</title>
      </head>
      <body>
        <p><!-- ...... --></p>
      </body>
    </html></cnt:xmlRest>
      </cnt:XMLContent>

      <http:Response rdf:ID="resp1">
        <http:httpVersion>1.1</http:httpVersion>
        <http:statusCodeNumber>200</http:statusCodeNumber>
        <http:sc rdf:resource="http://www.w3.org/2008/http-statusCodes#200
    "/>
        <http:reasonPhrase>OK</http:reasonPhrase>
        <http:headers rdf:parseType="Collection">
          <http:MessageHeader>
            <http:fieldName>Date</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#date"/>
            <http:fieldValue>.......</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>Content-Type</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#content-type"/>
            <http:fieldValue>image/png</http:fieldValue>
          </http:MessageHeader>
          <http:MessageHeader>
            <http:fieldName>Vary</http:fieldName>
            <http:hdrName rdf:resource="
    http://www.w3.org/2008/http-headers#vary"/>
            <http:fieldValue>accept</http:fieldValue>
            <http:headerElements rdf:parseType="Collection">
              <http:HeaderElement>
                <http:elementName>accept</http:elementName>
              </http:HeaderElement>
            </http:headerElements>
          </http:MessageHeader>
        </http:headers>
        <http:body>
          <cnt:ContentAsBase64>
            <cnt:bytes rdf:datatype="
    http://www.w3.org/2001/XMLSchema#base64Binary"
              >qouh3908t38hohfrf..........</cnt:bytes>
          </cnt:ContentAsBase64>
        </http:body>
      </http:Response>

    </rdf:RDF>
Appendix B: Terms


The following terms are defined by this specification:


Classes
|------------+-----+------------+--------+-------------------------------|
| Class name |Label|  Comment   |Refineme|      Related properties       |
|            |     |            |  nts   |                               |
|------------+-----+------------+--------+-------------------------------|
|Classes in  |                                                            
|the         |                                                            
|HTTP-in-RDF |                                                            
|namespace   |                                                            
|------------+----------------------------------------------------------- 
|http:Connect|Conne|A connection|-       |http:connectionAuthority,      |
|ion         |ction|used for    |        |http:requests                  |
|            |     |HTTP        |        |                               |
|            |     |transfer.   |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:HeaderE|Heade|A part of a |-       |http:elementName,              |
|lement      |r    |deconstructe|        |http:elementValue, http:params |
|            |Eleme|d header    |        |                               |
|            |nt   |value.      |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:HeaderN|Heade|The header  |-       |                               |
|ame         |r    |name.       |        |                               |
|            |Name |            |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:Message|Messa|An HTTP     |http:Req|http:httpVersion, dct:date,    |
|            |ge   |message.    |uest,   |http:body, http:headers        |
|            |     |            |http:Res|                               |
|            |     |            |ponse   |                               |
|------------+-----+------------+--------+-------------------------------|
|http:Message|Messa|A header in |-       |http:fieldName, http:fieldValue|
|Header      |ge   |an HTTP     |        |, http:hdrName,                |
|            |Heade|message.    |        |http:headerElements            |
|            |r    |            |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:Method |Metho|The HTTP    |-       |                               |
|            |d    |method used |        |                               |
|            |     |for a       |        |                               |
|            |     |request.    |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:Paramet|Param|A parameter |-       |http:paramName, http:paramValue|
|er          |eter |for a part  |        |                               |
|            |     |of a header |        |                               |
|            |     |value       |        |                               |
|------------+-----+------------+--------+-------------------------------|
|http:Request|Reque|An HTTP     |-       |http:methodName,               |
|            |st   |request.    |        |http:requestURI, http:mthd,    |
|            |     |            |        |http:resp                      |
|------------+-----+------------+--------+-------------------------------|
|http:Respons|Respo|An HTTP     |-       |http:statusCodeNumber,         |
|e           |nse  |response.   |        |http:reasonPhrase, http:sc     |
|------------+-----+------------+--------+-------------------------------|
|http:StatusC|Statu|The status  |-       |                               |
|ode         |s    |code of an  |        |                               |
|            |Code |HTTP        |        |                               |
|            |     |response.   |        |                               |
|------------+-----+------------+--------+-------------------------------|

Properties
|--------------+-------+------------------------+---------+--------------|
|Property name | Label |        Comment         | Domain  |    Range     |
|--------------+-------+------------------------+---------+--------------|
|Properties in |                                                          
|the           |                                                          
|HTTP-in-RDF   |                                                          
|namespace     |                                                          
|--------------+--------------------------------------------------------- 
|http:body     |Entity |The entity body of an   |http:Mess|cnt:ContentAsB|
|              |body   |HTTP message.           |age      |ase64         |
|--------------+-------+------------------------+---------+--------------|
|http:connectio|Connect|The authority of a      |http:Conn|RDF Literal   |
|nAuthority    |ion    |connection used for the |ection   |              |
|              |authori|HTTP transfer           |         |              |
|              |ty     |                        |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:elementNa|Header |The name of a header    |http:Head|RDF Literal   |
|me            |element|element                 |erElement|              |
|              |name   |                        |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:elementVa|Header |The value of a header   |http:Head|RDF Literal   |
|lue           |element|element.                |erElement|              |
|              |value  |                        |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:fieldName|Field  |The name of an HTTP     |http:Mess|RDF Literal   |
|              |name   |header field.           |ageHeader|              |
|--------------+-------+------------------------+---------+--------------|
|http:fieldValu|Field  |The value of an HTTP    |http:Mess|RDF Literal   |
|e             |value  |header field.           |ageHeader|              |
|--------------+-------+------------------------+---------+--------------|
|http:headerEle|Header |The deconstructed parts |http:Mess|Collection of |
|ments         |element|of an HTTP header value.|ageHeader|http:HeaderEle|
|              |s      |                        |         |ment          |
|--------------+-------+------------------------+---------+--------------|
|http:hdrName  |Header |The name of an HTTP     |http:Mess|http:HeaderNam|
|              |name   |header.                 |ageHeader|e             |
|--------------+-------+------------------------+---------+--------------|
|http:headers  |Headers|The headers in an HTTP  |http:Mess|Collection of |
|              |       |message.                |age      |http:MessageHe|
|              |       |                        |         |ader          |
|--------------+-------+------------------------+---------+--------------|
|http:httpVersi|HTTP   |The HTTP version of an  |http:Mess|RDF Literal   |
|on            |Version|HTTP message.           |age      |              |
|--------------+-------+------------------------+---------+--------------|
|http:mthd     |Method |The HTTP method used for|http:Requ|http:Method   |
|              |       |the HTTP request.       |est      |              |
|--------------+-------+------------------------+---------+--------------|
|http:methodNam|Method |The HTTP method name    |http:Requ|RDF Literal   |
|e             |name   |used for the HTTP       |est      |              |
|              |       |request.                |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:paramName|Paramet|The name of a parameter |http:Para|RDF Literal   |
|              |er name|in a part of a          |meter    |              |
|              |       |deconstructed HTTP      |         |              |
|              |       |header value.           |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:params   |Paramet|The parameters in a part|http:Head|Collection of |
|              |ers    |of a deconstructed HTTP |erElement|http:Parameter|
|              |       |header value.           |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:paramValu|Paramet|The value of a parameter|http:Para|RDF Literal   |
|e             |er     |in a part of a          |meter    |              |
|              |value  |deconstructed HTTP      |         |              |
|              |       |header value.           |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:reasonPhr|Reason |The reason phrase       |http:Resp|RDF Literal   |
|ase           |phrase |(status text) of an HTTP|onse     |              |
|              |       |response.               |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:requests |Request|The HTTP requests made  |http:Conn|Collection of |
|              |s      |via a connection.       |ection   |http:Request  |
|--------------+-------+------------------------+---------+--------------|
|http:requestUR|Request|The request URI of an   |http:Requ|RDF Literal   |
|I             |URI    |HTTP request.           |est      |              |
|--------------+-------+------------------------+---------+--------------|
|http:resp     |Respons|The HTTP response sent  |http:Requ|http:Response |
|              |e      |in answer to an HTTP    |est      |              |
|              |       |request.                |         |              |
|--------------+-------+------------------------+---------+--------------|
|http:sc       |Status |The status code of an   |http:Resp|http:StatusCod|
|              |code   |HTTP response.          |onse     |e             |
|--------------+-------+------------------------+---------+--------------|
|http:statusCod|Status |The status code number  |http:Resp|RDF Literal   |
|eNumber       |code   |of an HTTP response.    |onse     |              |
|              |number |                        |         |              |
|--------------+-------+------------------------+---------+--------------|

Appendix C: References
[Content-in-RDF]
      Representing Content in RDF - Johannes Koch, Carlos A Velasco
      (editors). W3C Working Draft 17 July 2008.
[EARL]
      Evaluation and Report Language (EARL) Overview - W3C
[HTTP Status Codes]
      "HTTP Status Code Registry" - IANA.
[OWL]
      Web Ontology Language (OWL) Overview - W3C
[Permanent Headers]
      Permanent Message Header Field Names - IANA.
[Provisional Headers]
      Provisional Message Header Field Names - IANA.
[POWDER-DR]
      Protocol for Web Description Resources (POWDER): Description
      Resources - K. Smith, P. Archer, A. Perego (editors). W3C Working
      Draft 17 March 2008.
[POWDER-GR]
      Protocol for Web Description Resources (POWDER): Grouping of
      Resources - P. Archer, A. Perego, K. Smith (editors). W3C Working
      Draft 24 March 2008.
[RDF]
      Resource Description Framework (RDF) Overview - W3C
[RDF-PRIMER]
      RDF Primer. W3C Recommendation, 10 February 2004.
      http://www.w3.org/TR/rdf-primer/
[RDFS]
      RDF Vocabulary Description Language 1.0: RDF Schema. W3C
      Recommendation 10 February 2004.
      http://www.w3.org/TR/rdf-schema/
[RFC2119]
      Request for Comments (RFC): 2119. Key words for use in RFCs to
      Indicate Requirement Levels - IETF March 1997.
[RFC2616]
      Hypertext Transfer Protocol -- HTTP/1.1 - R. Fielding, J. Gettys, J.
      Mogul, H. Frystyk Nielsen, L. Masinter, P. Leach and T. Berners-Lee.
      IETF June 1999.
[RFC4229]
      HTTP Header Field Registrations - M. Nottingham, J. Mogul. IETF
      December 2005.
[WCAG]
      Web Content Accessibility Guidelines (WCAG) Overview - W3C.
[XML]
      Extensible Markup Language (XML) 1.0 (Fourth Edition). W3C
      Recommendation 16 August 2006, edited in place 29 September 2006.
      http://www.w3.org/TR/xml/
Appendix D: Document Changes


[Editor's note: add changes from this version to WD-HTTP-in-RDF-20080908]


Besides several editorial changes, the following is a list of substantial
changes since the 23 March, 2007 Working Draft:
      split three RDF models for request methods, header names and status
      codes from the HTTP model to be updated separately from external
      registries
      changed the http:request property to http:requests
      introduced the http:Message class to be a base for the http:Request
      and http:Response class
      changed the http:version property to http:httpVersion
      added the dc:date property to the http:Message class
      introduced the http:methodName (with object literal), http:mthd (with
      object resource from external RDF model for header names) properties
      and the http:Method class instead of different http:Request
      sub-classes
      changed the multiple use of the http:header property to http:headers
      with an RDF collection
      changed the http:responseCode property to http:sc (with object
      literal from external RDF model for status codes), and introduced the
      literal http:statusCodeNumber and http:reasonPhrase properties
      changed the http:fieldName property to have a object literal
      introduced the http:hdrName property having an object resource (from
      the external RDF model for header names)




graycol.gif
(image/gif attachment: graycol.gif)

pic24488.gif
(image/gif attachment: pic24488.gif)

ecblank.gif
(image/gif attachment: ecblank.gif)

25768061.gif
(image/gif attachment: 25768061.gif)

Received on Thursday, 18 June 2009 14:23:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 June 2009 14:23:38 GMT