Re: Locating In EARL Example

On Tue, 05 Apr 2005 17:20:50 +1000, Chris Ridpath  
<> wrote:

>> Eh. I should have written my own example as a complete RDF document and  
>> validated it.
> That would be very helpful. Could you give us a complete file for this  
> example test case?
> You just need to identify the one accessibility error - image missing an  
> alt attribute.
> Chris

Changes I made:

- Left out encoding since XML is utf-8 by default

- Changed the assertor to be directly a Tool (which is a subclass of  
Assertor anyway).
   + Removed assertedBy from the Assertor, since assertedBy is a property  
of an Assertion
   + Provided some (pretty arbitrary) DC stuff to describe the tool. Note  
that I didn't provide an identifier, because I don't actually know about  
what version it is, etc.

- Only produced a single Assertion
   + Added a datatype to the date.
   + Made the locators intoproperties of the assertion, in a namespace.
     o Made the line number an actual number, using a datatype.
     o Left out the element, since it can be deduced automatically from the  
   + Used the testCase property, not the Testcase class. I suspect we  
should in future avoid making things that have similar names like this.  
The difference is to small to avoid confusion, IMHO.
   + Removed the testId - it is redundant with the testCase as far as I can  
   + Made the message a literal, since it contains XML that should not be  
parsed as part of the RDF.
     o Gave the XML content a namespace.
   + Removed the confidence, since I don't think it's a good idea.
   + Corrected the Assertor to assertedBy inside the Assertion. (Assertor  
is a thing, of type Assertor. assertedBy is a property, which points to a  
thing of type Assertor. earl:Tool and earl:Person are things of type  

<?xml version="1.0"?>
<rdf:RDF xmlns:dc=""

<earl:WebContent rdf:about="#subject">

<earl:Tool rdf:about="#assertor">

   <earl:Subject rdf:resource="#subject"/>
rdf:resource="" />
   <earl:message rdf:parseType="Literal">
     <error xmlns="">
       <code>img</code> element missing <code>alt</code> attribute.
rdf:resource="" />
   <earl:assertedBy rdf:resource="#assertor"/>


If you feed this to the RDF validator at  
it says that it is valid, and it will draw you the picture.

I have a question in the back of my mind about whether result should use  
rdf:type instead of rdf:resource - the effect would be that the result  
refers to a blank node of type Fail (or whatever). But I have forgotten  
why I thought it was important which I did about 18 months ago - I think  
it had to do with putting together multiple assertions), and can no longer  
convince myself it needs to be that way.

Anyway, I think the code above is valid EARL that says what we want it to  
say, although I am not sure what the src property is meant to do.

Maybe it should be in the xpath:

   /html/body/p/img[@src='rex.jpg'] if it is meant to identify the img  
element that has that particular src attribute.

The next thing to do is to get about a dozen examples, covering the  
various permutations of mode, result, date, etc, and repetitions as well,  
and then put them all together and see what the graph looks like (apart  
 from horribly complicated if you use the pretty basic visualisation stuff  
in the RDF validator :-)



Charles McCathieNevile                      Fundacion Sidar   +61 409 134 136

Received on Tuesday, 5 April 2005 13:06:11 UTC