RDF syntax variations and EARL test suites

Hi,

The discussions about using the dc or the dct namespace for Dublin 
Core metadata terms are essentially about syntax. This brings up the 
question: what about bigger variations in syntax?

For example, when I use AccessODF 
<http://sourceforge.net/projects/accessodf/> in OpenOffice.org 3.3 
and in LibreOffice 3.4.3, the EARL syntax is not the same. The EARL 
reports are saved in RDF files inside the ODF files, so it is 
possible to extract the reports and compare them.

One thing that is striking is that the dct, earl, foaf and doap 
namespace prefixes are nowhere to be seen: you just get ns0, ns1, 
etcetera, accompanied by a namespace declaration as in: <ns0:result 
xmlns:ns0="http://www.w3.org/ns/earl#" ...>.

Another striking thing is the difference in syntax between 
LibreOffice and OpenOffice.org. In the RDF from LibreOffice, 
everything is completely flattened, like so:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <rdf:Description rdf:nodeID="r1r4520r357">
     <ns0:assertedBy xmlns:ns0="http://www.w3.org/ns/earl#" 
rdf:resource="http://docarch.be/accessibility/ooo/InternalChecker"/>
   </rdf:Description>
   <rdf:Description rdf:nodeID="r1r4520r357">
     <ns0:subject xmlns:ns0="http://www.w3.org/ns/earl#" 
rdf:nodeID="r1r4520r359"/>
   </rdf:Description>
   <rdf:Description rdf:nodeID="r1r4520r357">
     <ns0:test xmlns:ns0="http://www.w3.org/ns/earl#" 
rdf:resource="http://www.docarch.be/accessibility-checker/checks#E_NoDefaultLanguage"/>
   </rdf:Description>
   <rdf:Description rdf:nodeID="r1r4520r357">
     <ns0:result xmlns:ns0="http://www.w3.org/ns/earl#" 
rdf:nodeID="r1r4520r358"/>
   </rdf:Description>
   <rdf:Description rdf:nodeID="r1r4520r357">
     <rdf:type rdf:resource="http://www.w3.org/ns/earl#Assertion"/>
   </rdf:Description>
   <rdf:Description rdf:nodeID="r1r4520r358">
     <ns0:date 
xmlns:ns0="http://purl.org/dc/elements/1.1/">2011-11-23T19:23:49+0100</ns0:date>
   </rdf:Description>
(...)
</rdf:RDF>

In OpenOffice.org, it looks a little bit nicer:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <ns1:TestCase xmlns:ns1="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#E_NoDefaultLanguage"/>
   <ns2:TestCase xmlns:ns2="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_FormulaWithoutAlt"/>
   <ns3:TestCase xmlns:ns3="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#E_ImageAnchorFloat"/>
   <ns4:TestCase xmlns:ns4="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#E_UnsupportedImageFormat"/>
   <ns5:TestCase xmlns:ns5="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_ImageWithoutAlt"/>
   <ns6:TestCase xmlns:ns6="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_FakeTable"/>
   <ns7:TestCase xmlns:ns7="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#E_EmptyHeading"/>
   <ns8:TestCase xmlns:ns8="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_MergedCells"/>
   <ns9:TestCase xmlns:ns9="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_BreakRows"/>
   <ns10:TestCase xmlns:ns10="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_FakeHeading"/>
   <ns11:TestCase xmlns:ns11="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_NoHyperlinkText"/>
   <ns12:TestCase xmlns:ns12="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_JustifiedText"/>
   <ns13:Checker 
xmlns:ns13="http://www.docarch.be/accessibility-checker/" 
rdf:about="http://docarch.be/accessibility/ooo/InternalChecker">
     <rdf:type rdf:resource="http://www.w3.org/ns/earl#Assertor"/>
   </ns13:Checker>
   <ns14:TestCase xmlns:ns14="http://www.w3.org/ns/earl#" 
rdf:about="http://www.docarch.be/accessibility-checker/checks#A_SmallText"/>
   <ns15:Assertion xmlns:ns15="http://www.w3.org/ns/earl#">
     <ns15:assertedBy 
rdf:resource="http://docarch.be/accessibility/ooo/InternalChecker"/>
     <ns15:result>
       <ns15:TestResult>
         <ns16:date 
xmlns:ns16="http://purl.org/dc/elements/1.1/">2011-11-24T14:23:11+0100</ns16:date>
         <ns15:outcome rdf:resource="http://www.w3.org/ns/earl#failed"/>
       </ns15:TestResult>
     </ns15:result>
     <ns15:subject>
       <ns17:Document 
xmlns:ns17="http://www.docarch.be/accessibility-checker/types#">
         <rdf:type rdf:resource="http://www.w3.org/ns/earl#TestSubject"/>
       </ns17:Document>
     </ns15:subject>
     <ns15:test 
rdf:resource="http://www.docarch.be/accessibility-checker/checks#E_NoDefaultLanguage"/>
   </ns15:Assertion>
(...)
</rdf:RDF>

We need to be aware of this when thinking about our test suite.

On second thought, I also think this syntax difference provides an 
opportunity for the documentation of implementations: the RDF 
libraries inside LibreOffice and OpenOffice.org provide different 
outputs (syntactically), but appear to be able to read each other's 
format (as they should, anyway). You can test this by checking an ODF 
document in the first office suite, then saving it (to save the EARL 
report), and then opening it in the other office suite, and checking 
whether AccessODF displays the same list of errors and warnings in 
its UI. I have tested this for the first time, and it works. Maybe we 
can use this as evidence for support of both output and input.

Best regards,

Christophe


-- 
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu
---
Please don't invite me to Facebook, Quechup or other "social 
networks". You may have agreed to their "privacy policy", but I haven't.

Received on Thursday, 24 November 2011 13:43:44 UTC