> I have had a very hard time reading each RDFa test suite XHTML file,
> SPARQL file and attempting to determine what triples should be generated
> from the given XHTML. We might expect beginning RDFa implementers to
> have the same problem. The test suite is not only good for validation,
> but for understanding how RDFa works.
>
> With the previous problems/thoughts in mind, I hacked together a quick
> and dirty test suite reviewer. The reviewer is attached, along with two
> examples of the output of the tool. It builds upon Ivan Herman's work on
> pyRDFa and Ed Summer's modifications to the tool.
>
> The new tool, tsreview.py, will do the following:
> - Retrieve all approved or unreviewed RDFa test cases
> - Execute the SPARQL queries on the generated graph
> - Dump the graph, in N3 format, to a file.
> - Dump the raw XHTML and raw SPARQL to a file.
> - Generate a test report, containing all the information necessary
> (XHTML, N3, and SPARQL), to understand whether the test case is
> behaving or not.
>
> All of the current N3 and review files are included in the attached
> .tar.bz2, in a directory called "review".
>
> Two of the files that are generated, as a part of each test, are
> important to implementers.
>
> 1. The review file very clearly shows the input, the output in N3, and
> the SPARQL validation code. This will help developers understand
> what is supposed to happen in their parsers.
> 2. The graph N3 serialization is provided. This ensures that developers
> won't have to write a SPARQL engine to test whether or not their
> parser is compliant.
>
> Could we include the auto-generated N3 serialization as part of the RDFa
> test suite (for documentation purposes)?
>
> Could we include the review files (or something similar) as part of the
> RDFa test suite (again, for documentation purposes)?
>
> ------------------------------------------------------------------
> Command line output from the tsreview.py tool:
>
> test-01-approved (__main__.XhtmlTests) ... ok
> test-06-approved (__main__.XhtmlTests) ... ok
> test-07-approved (__main__.XhtmlTests) ... ok
> test-08-approved (__main__.XhtmlTests) ... ok
> test-09-approved (__main__.XhtmlTests) ... ok
> test-10-approved (__main__.XhtmlTests) ... ok
> test-11-approved (__main__.XhtmlTests) ... FAIL
> test-12-approved (__main__.XhtmlTests) ... FAIL
> test-13-approved (__main__.XhtmlTests) ... FAIL
> test-14-approved (__main__.XhtmlTests) ... FAIL
> test-15-approved (__main__.XhtmlTests) ... ok
> test-18-approved (__main__.XhtmlTests) ... ok
> test-19-approved (__main__.XhtmlTests) ... ok
> test-20-approved (__main__.XhtmlTests) ... ok
> test-21-approved (__main__.XhtmlTests) ... ok
> test-23-approved (__main__.XhtmlTests) ... ok
> test-25-approved (__main__.XhtmlTests) ... ok
> test-26-approved (__main__.XhtmlTests) ... ok
> test-27-approved (__main__.XhtmlTests) ... ok
> test-29-approved (__main__.XhtmlTests) ... FAIL
> test-30-approved (__main__.XhtmlTests) ... ok
> test-31-approved (__main__.XhtmlTests) ... ok
> test-32-approved (__main__.XhtmlTests) ... ok
> test-33-approved (__main__.XhtmlTests) ... FAIL
> test-34-approved (__main__.XhtmlTests) ... ok
> test-35-approved (__main__.XhtmlTests) ... ok
> test-36-approved (__main__.XhtmlTests) ... ok
> test-37-approved (__main__.XhtmlTests) ... ok
> test-38-approved (__main__.XhtmlTests) ... ok
> test-41-approved (__main__.XhtmlTests) ... ok
> test-46-unreviewed (__main__.XhtmlTests) ... FAIL
> test-47-unreviewed (__main__.XhtmlTests) ... ok
> test-48-unreviewed (__main__.XhtmlTests) ... FAIL
> test-49-unreviewed (__main__.XhtmlTests) ... ok
> test-50-unreviewed (__main__.XhtmlTests) ... FAIL
> test-51-unreviewed (__main__.XhtmlTests) ... FAIL
> test-52-unreviewed (__main__.XhtmlTests) ... ok
> test-53-unreviewed (__main__.XhtmlTests) ... ok
> test-54-unreviewed (__main__.XhtmlTests) ... ok
> test-55-unreviewed (__main__.XhtmlTests) ... ok
> test-56-unreviewed (__main__.XhtmlTests) ... ERROR
>
> -- manu
>
>
>
> ------------------------------------------------------------------------
>
>
> XHTML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "
http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml"
> xmlns:cc="
http://creativecommons.org/ns#">
> <head>
> <title>Test 0008</title>
> </head>
> <body>
> <p>This document is licensed under a
> <a about="" rel="cc:license"
> href="
http://creativecommons.org/licenses/by-nc-nd/2.5/">
> Creative Commons
> </a>.
> </p>
> </body>
> </html>
>
>
>
>
> Triples (N3 format)
>
>
> @prefix _5: <
http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0008.>.
> @prefix cc: <
http://creativecommons.org/ns#>.
>
> _5:xhtml cc:license <
http://creativecommons.org/licenses/by-nc-nd/2.5/>.
>
>
>
> SPARQL (PASSED)
>
> ASK WHERE {
> <
http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0008.xhtml> <
http://creativecommons.org/ns#license> <
http://creativecommons.org/licenses/by-nc-nd/2.5/> .
> }
>
>
>
> ------------------------------------------------------------------------
>
>
> XHTML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "
http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml"
> xmlns:foaf="
http://xmlns.com/foaf/0.1/"
> >
> <head>
> <title>Test 0048</title>
> </head>
> <body>
> <div about="
http://www.example.org" rel="foaf:knows" instanceof="foaf:Person">
> <p property="foaf:name">John Doe</p>
> </div>
> </body>
> </html>
>
>
>
>
> Triples (N3 format)
>
>
> @prefix foaf: <
http://xmlns.com/foaf/0.1/>.
> @prefix rdf: <
http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
>
> <
http://www.example.org> a foaf:Person;
> foaf:knows [ foaf:name "John Doe"].
>
>
>
> SPARQL (FAILED)
>
> ASK WHERE {
> <
http://www.example.org> <
http://xmlns.com/foaf/0.1/knows> _:a .
> _:a <
http://xmlns.com/foaf/0.1/name> "John Doe" .
> <
http://www.example.org> <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://xmlns.com/foaf/0.1/Person> .
> }
>
>