More EARL Examples

I recently had to come up with some examples of EARL for someone
asking aabout using it in the W3C Validator... here's what I came up
with:-

1) Valid HTML 4.01:-

     @prefix earl: <http://www.w3.org/2001/02/earl/> .
     <http://validator.w3.org/> earl:asserts
     { <http://www.w3.org/test/>
        earl:conformsTo
        <http://www.w3.org/TR/html401> . } .

2) Invalid XHTML 1.0 (we're working on syntax for broken XML, using
BNF):-

     @prefix earl: <http://www.w3.org/2001/02/earl/> .
     @prefix log: <http://www.w3.org/2000/10/swap/log.n3> .
     @prefix xhtml: <http://www.w3.org/1999/xhtml> .
     <http://validator.w3.org/> earl:asserts
     { { <http://www.w3.org/test/>
           earl:conformsTo <http://www.w3.org/TR/xhtml1> . }
           a log:falsehood . } .
     <http://www.w3.org/test/[@src="w3c.gif"]> earl:missing xhtml:@alt
.

It's missing an alt attribute on that particular image!

3) Valid (and well formed) XML doc (http://www.w3.org/test.xml -
schema http://www.w3.org/schema.xsd):-

     @prefix earl: <http://www.w3.org/2001/02/earl/> .
     <http://validator.w3.org/> earl:asserts
     { <http://www.w3.org/test/>
        earl:conformsTo
        <http://www.w3.org/TR/1998/REC-xml-19980210>;
        earl:comment "is well formed XML" . } .
     <http://validator.w3.org/> earl:asserts
     { <http://www.w3.org/test/>
        earl:conformsTo
        <http://www.w3.org/schema.xsd>;
        earl:comment "is valid XML" . } .

The second one is rather close to Wendy's example :-)

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
[ :name "Sean B. Palmer" ] :hasHomepage <http://infomesh.net/sbp/> .

Received on Monday, 26 February 2001 09:30:56 UTC