W3C home > Mailing lists > Public > w3c-wai-er-ig@w3.org > June 2002

Experiments With Abbreviated EARL As An Authoring Tool

From: Sean B. Palmer <sean@mysterylights.com>
Date: Sat, 22 Jun 2002 05:23:50 +0100
Message-ID: <007201c219a4$9e1e1de0$fab90150@localhost>
To: <w3c-wai-er-ig@w3.org>
I noticed that 95% of EARL uses the same fraction of features that EARL has
to offer:-

* Assertor name
* Assertor email
* Test subject+date
* Test subject type
* Validity property
* Test case ID
* Optional: Test case label
* Optional: note

but nevertheless the XML representation of this is too verbose; it puts me
off, let alone newcomers:-

[[[
<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:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
<Assertor>
   <name>Bob Bobbington</name>
   <email rdf:resource="mailto:bob@example.org"/>
   <asserts rdf:parseType="Resource">
     <rdf:subject rdf:parseType="Resource">
       <Language>
         <date>2002-06-15</date>
         <documentation rdf:resource="http://www.w3.org/TR/xhtml11"/>
       </Language>
     </rdf:subject>
     <rdf:predicate
        rdf:resource="http://www.w3.org/2001/03/earl/0.95#fails"/>
     <rdf:object rdf:parseType="Resource">
       <id rdf:resource="http://www.w3.org/TR/xag#cp2_3"/>
     </rdf:object>
     <note>It was an architectural decision</note>
   </asserts>
</Assertor>
<rdf:Description rdf:about="http://www.w3.org/org/TR/xag#cp2_3">
   <rdfs:label>2.3 Use XLink and XPointer</rdfs:label>
</rdf:Description>
</rdf:RDF>
]]]

Of course, there is always N3, but people don't like the fact that it's not
XML based. Here's the equivalent of the above in N3:-

[[[
@prefix : <http://www.w3.org/2001/03/earl/0.95#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

[ a :Assertor; :name "Bob Bobbington";
  :email <mailto:bob@example.org>;
  :asserts [ rdf:subject [ a :Language; :date "2002-06-15";
               :documentation <http://www.w3.org/TR/xhtml11> ];
             rdf:predicate :fails;
             rdf:object [ :id <http://www.w3.org/TR/xag#cp2_3> ];
             :note "It was an architectural decision" ] ] .
<http://www.w3.org/org/TR/xag#cp2_3>
   rdfs:label "2.3 Use XLink and XPointer" .
]]]

So, after a little hacking, I was able to come up with an XML syntax for
these features that was just a third of the size of the M&S XML RDF, and
half the size of the N3:-

[[[
<EARL xmlns="http://infomesh.net/2002/earlxml">
<Assertor name="Bob Bobbington" email="mailto:bob@example.org" >
 <asserts Language="http://www.w3.org/TR/xhtml11" date="2002-06-15" >
   <fails id="http://www.w3.org/TR/xag#cp2_3"
       label="2.3 Use XLink and XPointer"
       note="It was an architectural decision" />
 </asserts>
</Assertor>
</EARL>
]]]

Not only that, but in about half an hour I had produced an XSLT sheet that
can convert the abbreviated syntax into XML RDF. The XSLT sheet is attached
as <<xml2rdf.xsl>>, and a test run is given:-

Abbreviated input: <<abbrev-xml.xml>>
M&S XML RDF output: <<abbrev-out.xml>>

I just used saxon:-

   saxon abbrev-xml.xml xml2rdf.xsl > abbrev-out.xml

So there you have it. If anyone finds this useful and wants me to come up
with some sort of schema for it (check out the transformation for the basic
semantics of the abbreviated form for now, or ask me), I may cobble one
together.

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://purl.org/net/swn#> .
:Sean :homepage <http://purl.org/net/sbp/> .


Received on Saturday, 22 June 2002 00:24:08 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Thursday, 9 June 2005 12:10:41 GMT