The EARL 0.95 Model

This is an overview of the EARL model - a RDF based syntax independent language for making generic evaluations of resources. The namespace prefix "earl:" is being used here as an alias for the EARL 0.95 namespace URI: http://www.w3.org/2001/03/earl/0.95#

An Overview Of The Model

EARL 0.95 Schema
Diagram 1 [Notation3] [SVG] [JPG]

The EARL model basically consists of an evaluation, where some "assertor" (e.g. a person) asserts an "assertion", where an assertion is a statmement such as "MyPage passes Checkpoint1". The actual basic structuring of the EARL model gets no more complicated than that, although of course, the EARL vocabulary does provide for much finer granularity for the instances. In other words, it lets you hang off many types of property from each speficic part of the EARL evaluation, which we shall go into in more detail a little later on.

Note that the architecture itself is purely syntax independant - the EARL model could be repurposed to follow many different RDF formats, as and when they come along. We currently use Notation3 to develop the model, and XML RDF to publish the schemata and other normative code.

Test Subjects

Diagram 2 is a simple example of EARL, comprising of an assertor called :John, asserting an assertion which is ":MyPage earl:passes :CP1".

EARL Example
Diagram 2 [SVG] [JPG]

One very important part of this is the "MyPage" bit - an earl:TestSubject. An earl:TestSubject is basically the thing being evaluated; it could be a bit of Web Content (earl:WebContent), a tool (earl:Tool), a User Agent (earl:UserAgent), or something else. In the case of the examples in Diagram 2, we want to say that ":MyPage" is an instance (that is, it has an rdf:type of), earl:WebContent. This can be represented as in Diagram 3.

EARL Test Subject
Diagram 3 [SVG] [JPG]

The earl:passes arc in Diagram 2 is what we call an earl:ValidityProperty - it's the arc that goes from a page to its test case, telling us whether it passes or fails it, and giving us the exact details. earl:passes is just one particular instance of earl:ValidityProperty, you can use earl:fails, or make one of your own.

Test Criteria

In EARL 0.9, we have "earl:suite" and "earl:id" available with which to point to test criteria, but this cannot provide enough semantics for people to build well structured results, so EARL 0.95 now consists of the following classes and properties:-

EARL Test Criteria
Diagram 4 [SVG] [JPG]

Classes
earl:TestCase
earl:TestCriteria [new]
earl:Exclusion [new]
Properties
earl:suite
earl:id
earl:excludes [new]
earl:level [new]

Another way to get around it would be to introduce some kind of :priority property, although I'm not sure how that would relate to any of the terms in EARL. I suppose that :priority would be a subPropertyOf earl:level - we can always add that if need be.

In Daniel's original properties details, he seems to be using "suite" as "test suite", but I used it to point to a suite of checkpoints, so instead I've created earl:testSuite to take the burden off. Formal definitions:-

earl:suite rdfs:comment """A suite of checkpoints, guidelines, or any
other form of rules that an earl:TestSubject can be evaluated against.
e.g. WCAG 1.0""" .
earl:testSuite rdfs:comment """A suite of technologies against which
one can check an earl:TestSubject, e.g. the W3C's SVG Test Suite""" .

As for the purpose of earl:testCriteria... it is only to be used when one has to make a complex assertion about a suite or id - i.e. when you need to add an earl:Level, or an earl:Exclusion. In fact, earl:TestCriteria must have at least one earl:Level or earl:Exclusion hanging off of it.

Making A ResultProperty Of Your Own

Although EARL has earl:passes and earl:fails properties, you can make your own because there are earl:validity and earl:confidence to do this, as shown by the modifications to the schema in Diagram 5.

EARL Result Property Extensions
Diagram 5

Note how the earl:ResultProperty now also has some additional earl:validity and earl:confidence properties. These are explicitly enumerated (using daml:oneOf) in EARL, so that you can only use the following classes:-

earl:Validity
earl:Pass
earl:Fail
earl:NotTested
earl:NotApplicable
earl:CannotTell
earl:Confidence
earl:High
earl:Medium
earl:Low

Or you could add some more of your own.

As an example of creating your own earl:ResultProperty, let's say that you want to make an assertion that your page passes a certain checkpoint with a medium degree of confidence. To do that, you would have to create a new earl:ResultProperty, with an earl:validity arc pointing to earl:Pass, and an earl:confidence arc pointing to earl:Medium. viz.:-

EARL Result Property
Diagram 6

Note that the earl:TestSubject, earl:ResultProperty, and earl:TestCase nodes are typed nodes, in other words, your actual code should contain instances of these things, rather than the classes themselves.

Note also that when you create a new property, you have to give it a name (this could be automatically generated), and put it in your own namespace. Do not under any circumstances invent new properties in the EARL namespace that don't exist.

In code, a new property might look something like:-

:MyNewProperty a earl:ResultProperty; 
   earl:validity earl:Pass; 
   earl:confidence earl:Medium .

Note that the new property has been named, and put in its own namespace.

Customized Extensions

EARL also provides you with an earl:note property, which can be used a bit like rdfs:comment, except that its range (i.e. the expression that any object can be an instance of) is rdfs:Resource, not rdfs:Literal.


Sean B. Palmer