I am intending to change the attached files from
http://www.w3.org/2001/sw/grddl-wg/td/ J
testlist2.rdf
Description: application/rdf
sq1-output.rdf
Description: application/rdf
GRDDL Tests
STATUS: These tests are in development; until a test is approved by WG decision, it is subject to change without notice.
Dan Connolly
$Revision: 1.42 $ of $Date: 2007/03/13 21:09:26 $
Each test has an input document and an output
document; the output document is in RDF/XML and represents a
GRDDL result (perhaps the maximal
result?) of the input
document.
The test collection is separated into parts:
- This part covers section 2 on using GRDDL with XML. These test don't involve namespace documents, so they're easy to run offline, and they work with other base URIs even though they have relative URI references.
- For namespace/profile document tests, see part 2.
- For tests of robustness of implementations in the face of anomalies, see part 3.
- #xmlWithGrddlAttribute:
P3P work-alike:
approval: 2006-11-22
- #projectsSpreadsheet:
get RDF from a spreadsheet,
a la connolly 12 May 2005, mnot August 13 2005:
approval: 2006-11-22
- #atomttl1: re issue issue-output-formats yes, transformations may produce serializations other than RDF/XML; see 26 Nov from Danny and Henry
input, output.
Note the transformation, atom2turtle_xslt-1.0.xsl, gives an RDF graph using turtle rather than RDF/XML. This test uses the text/rdf+n3 media type, which should appear in the IANA list of text media types in due course. See also the SPARQL CR request of Apr 2006.
See also: Atom/RDF in progress Aug 2006 by David Powell.
APPROVED in 24 Jan discussion of #issue-output-formats
- #rdfa1: RDFa example from GRDDL RDFa Example by Fabien Sep 14, 2006:
-
#inline: Inline transformation reference
This test case uses an inline GRDDL transformation reference (i.e. within an
aelement) instead of one within alinkelement. It also exercises the fact that therelattribute can take multiple space-separated values, and only one of them needs to be equal totransformationto indicate that the resource is in fact a GRDDL transformation. - #sq1a: explain sq1 result: the namespace document has no/empty GRDDL result DanC now thinks this is wrong
- #base-param: Base URI: the base URI for the result document is the URI of the source document. by bwm Sep 14, 2006 added by HarryH
Pending tests:
- pending since 2006-08-30, re issue-base-param "I think I'll make a test case with the xslt2 function too."
- pending since 2006-09-05: running only some of the transforms for policy reasons
- pending since 2006-09-06: Passing an XSLT 2.0 transformation to an XSLT 1.0 engine
- pending since2006-09-06: multiple namespace transformations
- pending since 2006-10-25: "be robust in the face of unknown serializations" re issue-output-formats
- pending since 2006-10-25 discussion: "yes, you can use XProc to say to do xinclude and XSLT"
- pending since 2006-11-10 (spec.html v1.160): I think fn:tokenize(" a b ") includes "", the same-document URI reference. I think that's a bug.
- 5 names test: input
- #grddl_rdf for application/rdf+xml documents, the RDF/XML reading is a grddl result input, output.
- test use of grddl:transformation attribute in conjuction with namespace document(s), XHTML profile(s)
- the po-doc.xml XML Schema example
- 2007-01-20 a test for http://www.w3.org/2003/g/glean-profile. jjc noted it does more than the spec says; suggests simplifying. Better check with Dom. Any other "standard library" tests?
- @@see minutes 14 Feb for some more test ideas
Notes from the spec on pending tests
The example in the well-formed XML section is taken from #title_author in the GRDDL WG tests, part 2. It would be nice to have a mechanical check that it stays in sync.
The protocol trace discusses http://www.w3.org/2003/g/po-doc.xml, which should probably perhaps move to the WG test suite or sync with it somehow. http://www.w3.org/2003/g/embeddedRDF and http://www.w3.org/2003/g/glean-profile should get some testing too. The Jena GRDDL Reader test area, especially security4, security6 (as of jjc's comment), are noteworthy re security issues
Example/advocacy/application test ideas
An example homepage with Dublin Core, GeoURL, RSS, Creative Commons, etc. demonstrates several transformations and dialects.
These are potential primer chapters, too:
- pending since 2006-11-13: an hCalendar test
- using plist2rdf.xsl on Apple iTunes Music Library.xml, OmniGraffle files
- owl2sql; advogato 25 Aug 2004
- something to demonstrate microsummaries with GRDDL? see Dom 11 Sep
Manifest Format
This test collection uses an RDF vocabulary for manifests developed for the RDF Test Cases Recommendation. The aboutTests transformation relates dialect in the HTML representation to an RDF graph (via RDF/XML).
Test suite version control
The http://www.w3.org/2001/sw/grddl-wg/td/ web repository is backed by the usual W3C CVS setup. If you don't have CVS commit access, note Harry's offer to help from our 10 Jan test maintenance discussion.
Dan maintains an experimental decentralized repository, backed by mercurial/hg. See also: Access control and version control: an over-constrained problem? by connolly on Tue, 2006-04-25. The CVS commits get added to the hg repository using a bleeding-edge version of convert-repo (details), like this:
[EMAIL PROTECTED] ../hg-coll[572] python2.4 ~/hg-coll/mercurial/contrib/convert-repo /home/connolly/pub/WWW/2001/sw/grddl-wg/td grddl-tests
This is supposed to support going the other direction better than cvs20hg and the cvscommit hg extension, introduced in a 2006-03-24 21:13:45 message from Simon 'corecode' Schubert.
How to run the tests
We provide testft.py, a test driver, based on rdflib 2.3.3 and 4suite, specifically 4Suite-XML-1.0.tar.gz. Run it a la:
$ python testft.py --run your_grddl_impl testlist1.rdf >earl_out.rdf All tests were passed!
It has options for --debug and such; invoke it with no arguments for details.
EARL tester and subject
In addition to various diagnostics on stderr, the test harness writes to stdout some RDF data: an EARL assertion about each test it runs.
To tell it about the person running the tests and the software project being tested, point it at an ID in a foaf file and a DOAP file:
$ python testft.py \ --tester 'dan.rdf#dwc' \ --project 'grddlft.rdf#grddl_py' \ --run your_grddl_impl \ testlist1.rdf >earl_out.rdf All tests were passed!
HTTP tracing
We find TCPWatch useful for debugging HTTP protocol interactions. If you start TCPWatch a la:
$ python tcpwatch.py -p 6543 &
then you can use it as a proxy:
$ http_proxy=http://127.0.0.1:6543 python testft.py \
--run your_grddl_impl testlist1.rdf
Transition from earlier work
These tests are intended to obsolete the older dev.w3.org tests, from Feb 2005 announcement, once all of those are ported over:
- xhtmlWithGrddlEnabledProfile
- xhtmlWithGrddlProfile
- xhtmlWithGrddlTransformationInBody
- xhtmlWithMoreThanOneGrddlTransformation
- xhtmlWithMoreThanOneProfile
- xmlWithGrddlAttribute
- xmlWithGrddlAttributeAndNonXMLNamespaceDocument
See also Dom's message Re: GRDDL test howto? of 23 Aug 2006.
testlist1.rdf
Description: application/rdf
sq2ns.rdf
Description: application/rdf
grddlonrdf-xmlmediatype.rdf
Description: application/rdf
<loop xmlns="http://www.w3.org/2001/sw/grddl-wg/td/loop" xmlns:data-view="http://www.w3.org/2003/g/data-view#" data-view:transformation="http://www.w3.org/2003/g/embeddedRDF.xsl" > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b"> <data-view:namespaceTransformation rdf:resource="http://www.w3.org/2003/g/sq1t.xsl" /> </rdf:Description> </rdf:RDF> </loop>
loop-output.rdf
Description: application/rdf
