Annotated EARL examples

Example 1: Basic Evaluation

<rdf:RDF xmlns="http://www.w3.org/2001/03/earl/0.95#" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns:foaf="http://xmlns.com/foaf/0.1/" >
   <Assertor>
     <asserts>
        <Assertion>
         ...
        </Assertion>
      </asserts>
   </Assertor>
</rdf:RDF>

We begin with the RDF statement and declaration of namespaces we are using. Here are the most common namespaces used in EARL:

Assertor

<Assertor>
 <rdf:type rdf:resource="http://www.w3.org/2001/03/earl/0.95#Person"/>
 <name>Bob B. Bobbington</name>
 <foaf:mbox rdf:resource="mailto:bob@example.org"/>
 <asserts>
   <Assertion>
     ...
   </Assertion>
 </asserts>
</Assertor>

The Assertor asserts an Assertion.

In EARL, the Assertor can be a person or a tool. type, name, and mbox are all properties of the Assertor.

@@want to say anything about use of rdf:type, or rdf:resource? e.g. why they weren't extended or is that covered by earlier statements? or is it not useful?

@@we use our own name property instead of foaf.name b/c... [@@include SBP's explanation here]

Alternatively, you could have a series of assertions, each with an assertedBy property as follows (@@validate):

<Assertion>
  <assertedBy rdf:resource="http://example.org/#assertor1234"/>
  ...
</Assertion>

<Assertion>
  <assertedBy rdf:resource="http://example.org/#assertor1234"/>
  ...
</Assertion>

<Assertor rdf:about="http://example.org/#assertor1234"/>
  <name>Bob B. Bobbington</name>
  <foaf:mbox rdf:resource="mailto:bob@example.org"/>
</Assertor>

An Assertion in detail

   <Assertion>
     <rdf:subject rdf:resource="http://example.org/#someID02495012470"/>
     <rdf:predicate rdf:resource="http://www.w3.org/2001/03/earl/0.95#passes"/>
     <rdf:object rdf:resource="http://example.org/#MyTestCase"/>
   </Assertion>
 

The Assertion has a subject, predicate, and object. Reification...

Note this is what an assertion currently looks like using the existing schema. An alternative method was proposed at a recent F2F. It would look like the following:

/* convert the previous to "properties as properties" */

Reviewer questions:

Test Subject

<rdf:subject rdf:resource="http://example.org/#someID02495012470"/>     

<WebContent rdf:about="http://example.org/#someID02495012470">
   <testSubject rdf:resource="http://www.w3.org/"/>
   <date>2001-05-17T23:07:35Z</date>
</WebContent>

Test Result

<rdf:predicate rdf:resource="http://www.w3.org/2001/03/earl/0.95#passes"/>    

"passes" is one value, others are:

Severity - describe proposal and issues here or later in this doc or elsewhere?

Test Case

<rdf:object rdf:resource="http://example.org/#MyTestCase"/> 
<rdf:Description rdf:about="http://example.org/#MyTestCase">
   <testId rdf:resource="http://exmaple.org/MyTestCaseThingy" />
</rdf:Description>

Example 2: Multiple Evaluations, with possible non-tests etc.

To do multiple evaluations, simply repeat the asserts element.

<rdf:RDF xmlns="http://www.w3.org/2001/03/earl/0.95#" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
   xmlns:foaf="http://xmlns.com/foaf/0.1/" >
<Assertor>
 <rdf:type rdf:resource="http://www.w3.org/2001/03/earl/0.95#Person"/>
 <name>Bob B. Bobbington</name>
 <foaf:mbox rdf:resource="mailto:bob@example.org"/>
 <asserts>
   <Assertion>
     <rdf:subject rdf:resource="http://example.org/#someID02495012470"/>
     <rdf:predicate rdf:resource="http://www.w3.org/2001/03/earl/0.95#passes"/>
     <rdf:object rdf:resource="http://example.org/#MyTestCase"/>
   </Assertion>
 </asserts>
 <asserts>
   <Assertion>
     <rdf:subject rdf:resource="http://example.org/#someID02495012470"/>
     <rdf:predicate>
       <ValidityProperty>
       <validity rdf:resource="http://www.w3.org/2001/03/earl/0.95#NotTested"/>
       <confidence rdf:resource="http://www.w3.org/2001/03/earl/0.95#High"/>
       </ValidityProperty>
     </rdf:predicate>
     <rdf:object rdf:resource="http://example.org/#MyOtherTestCase"/>
   </Assertion>
 </asserts>
</Assertor>

<WebContent rdf:about="http://example.org/#someID02495012470">
   <testSubject rdf:resource="http://www.w3.org/"/>
   <date>2001-05-17T23:07:35Z</date>
</WebContent>

<rdf:Description rdf:about="http://example.org/#MyTestCase">
   <testId rdf:resource="http://exmaple.org/MyTestCaseThingy" />
</rdf:Description>

<rdf:Description rdf:about="http://example.org/#MyOtherTestCase">
   <testId rdf:resource="http://exmaple.org/MyOtherTestCaseThingy" />
</rdf:Description>
</rdf:RDF>

Note here that we're using "NotTested" as one of the predicate confidence values. You can choose from: Pass, Fail, ValidityState, NotTested, ValidityState, NotApplicable, CannotTell.

You can also choose confidences. Simply substitiute one of the following for "High" in the example above: High, Medium, Low.

Resources


$Date: 2002/07/31 22:44:38 $ Wendy Chisholm (using examples created by Sean B. Palmer)