- From: Charles McCathieNevile <charles@sidar.org>
- Date: Tue, 05 Apr 2005 23:05:57 +1000
- To: "Chris Ridpath" <chris.ridpath@utoronto.ca>, public-wai-ert@w3.org
On Tue, 05 Apr 2005 17:20:50 +1000, Chris Ridpath
<chris.ridpath@utoronto.ca> 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?
> http://checker.atrc.utoronto.ca/test1-earl.html
>
> 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
xpath.
+ 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
tell.
+ 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
Assertor...)
<?xml version="1.0"?>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:earl="http://www.w3.org/WAI/ER/EARL/nmg-strawman#"
xmlns:testing="http://www.w3.org/WAI/ER/EARL/nmg-strawman#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<earl:WebContent rdf:about="#subject">
<earl:reprOf
rdf:resource="http://tile-cridpath.atrc.utoronto.ca/acheck/checks/testfiles/1-1.html"/>
<dc:date>2005-4-5T3:27:42-5</dc:date>
</earl:WebContent>
<earl:Tool rdf:about="#assertor">
<dc:title>aCheck</dc:title>
<dc:source>http://tile-cridpath.atrc.utoronto.ca/acheck/servlet/Publish"</dc:source>
</earl:Tool>
<earl:Assertion>
<dc:date
rdf:datatype="http://www.w3.org/2001/XMLSchema#gDateTime">2005-04-05T03:27:42-0500</dc:date>
<earl:Subject rdf:resource="#subject"/>
<testing:xpath>/html/body/p/img</testing:xpath>
<testing:line
rdf:datatype="http://www.w3.org/2001/XMLSchema#Integer">9</testing:line>
<testing:src>rex.jpg</testing:src>
<earl:testCase
rdf:resource="http://www.w3.org/WAI/GL/WCAG20/tests/test1.html" />
<earl:message rdf:parseType="Literal">
<error xmlns="http://www.example.com">
<code>img</code> element missing <code>alt</code> attribute.
</error>
</earl:message>
<earl:result
rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#Fail" />
<earl:assertedBy rdf:resource="#assertor"/>
<earl:mode
rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#automatic"/>
</earl:Assertion>
</rdf:RDF>
If you feed this to the RDF validator at http://www.w3.org/RDF/Validator/
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 :-)
cheers
Chaals
--
Charles McCathieNevile Fundacion Sidar
charles@sidar.org +61 409 134 136 http://www.sidar.org
Received on Tuesday, 5 April 2005 13:06:11 UTC