Re: 20060927-conformant RDF?

Hi,

Alan Dean wrote:
> I want to use EARL to represent assertions upon RESTful web applications.

Sounds interesting, please let us know when your application becomes
available.


> Yes, I have been looking at the test-related sections of the spec and
> I have to admit that I have found the spec very hard going. My
> apologies, but I have found it hard make sense of what has been
> written. Below, I did a simple copy & paste of Example 8 at
> http://www.w3.org/TR/2006/WD-EARL10-Schema-20060927/#testable and
> tweaked it for my sample RDF:

Thanks for the feedback on the readability, this is what Working Drafts
are for. I hope the final edits together with the EARL Guide will be
more helpful and easier to understand.


>  <earl:TestCase rdf:ID="testcase">
>    <dc:title xml:lang="en">REST Test 1</dc:title>
>    <dc:description xml:lang="en">Test 1 of the REST test 
> suite</dc:description>
>    <dcterms:isPartOf rdf:resource="http://example.org/tests/rest/"/>
>    <dc:identifier>http://example.org/tests/rest/#1</dc:identifier>
>  </earl:TestCase>
> 
[SNIP]
>     <earl:test rdf:resource="http://example.org/tests/rest/#1" />

The URI in the earl:test should match the ID (or rdf:about) of the test.
In this case it is sufficient to use #testcase, analogous to #subject
and #assertor, etc.


> Further, I have been trying to understand how I can use
> http://www.w3.org/TR/2006/WD-EARL10-Schema-20060927/#instancelocation
> to indicate a non-content location. For example, to indicate that the
> location is the HTTP status. Also, I have been unable to deduce how to
> represent an assertion of non-existence or null, for example an
> assertion that the ETag header should not be present in a response. I
> had a look at some WCAG examples, but of course they are only
> referring to body content.

First, the vocabulary for these pointers will be moved to an own 
document on the next revision of EARL. The document will be more 
elaborate and so hopefully easier to understand too.

Having said that, the current wording reads: "An Instance Location is a 
an area within the Test Subject that triggered or primarily influenced 
the Test Result". In other words, pointers in your example would point 
into the *content* received from a HEAD request to http://example.com.

Instead of using the predefined earl:WebContent class (which describes 
content on the Web rather than a protocol), you will probably need to 
use earl:Subject directly (which is basically *anything* you are 
testing), or even better create your own subclass of it. In any case, 
the pointers will need to point into the file where you store the 
information about the subjects (the EARL information doesn't have to be 
necessarily all in one file). Here is an example:

FILE 1:
[...]
<earl:Subject rdf:about="#subject1">
   <dc:title>HTTP exchange 1</dc:title>
   <own:extension1>
     <http:HeadRequest>
       <uri:uri>http://example.com</uri:uri>
     </http:HeadRequest>
   </own:extension1>
   <own:extension2>
     <http:Response>
       <http:responseCode>200 OK</http:responseCode>
       <http:date>Sat, 10 Feb 2007 16:04:19 GMT</http:date>
       <http:last-modified>Tue, 15 Nov 2005 13:24:10 
GMT</http:last-modified>
       <http:etag>"63ffd-1b6-80bfd280"</http:etag>
       <http:content-type>text/html; charset=UTF-8</http:content-type>
     </http:Response>
   </own:extension2>
</earl:Subject>
[...]


FILE 2:
[...]
<earl:Assertion rdf:about"#assertion1">
   [...]
   <earl:subject rdf:resource="&file1-URI;#subject1" />
   <earl:result rdf:parseType="Resource">
     <dc:description>ETag should not be in response</dc:description>
     <earl:validity rdf:resource="&earl;#fail" />
     <earl:instance>
       <earl:xPath>
         <earl:expression>[...]</earl:expression>
       </earl:xPath>
     </earl:instance>
   </earl:result>
</earl:Assertion>
[...]


You will need to define the RDFS for own:extension1 and own:extension2 
which are properties from earl:Subject to http:Request and http:Response 
respectively.

Hope this helps.

Regards,
   Shadi


-- 
Shadi Abou-Zahra     Web Accessibility Specialist for Europe |
Chair & Staff Contact for the Evaluation and Repair Tools WG |
World Wide Web Consortium (W3C)           http://www.w3.org/ |
Web Accessibility Initiative (WAI),   http://www.w3.org/WAI/ |
WAI-TIES Project,                http://www.w3.org/WAI/TIES/ |
Evaluation and Repair Tools WG,    http://www.w3.org/WAI/ER/ |
2004, Route des Lucioles - 06560,  Sophia-Antipolis - France |
Voice: +33(0)4 92 38 50 64          Fax: +33(0)4 92 38 78 22 |

Received on Thursday, 15 February 2007 09:36:05 UTC