W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > May 2001

Re: Test cases: format of input and output(uri/node/resource/entity too)

From: Dan Connolly <connolly@w3.org>
Date: Wed, 30 May 2001 16:38:27 -0500
Message-ID: <3B156853.B0A31376@w3.org>
To: Aaron Swartz <aswartz@upclink.com>
CC: Jan Grant <Jan.Grant@bristol.ac.uk>, timbl@w3.org, RDFCore Working Group <w3c-rdfcore-wg@w3.org>
Aaron Swartz wrote:
> Jan Grant <Jan.Grant@bristol.ac.uk> wrote:
> > Fine. How do I name anonymous "thing"s in n3? It wasn't on the WG
> > reading list :-)

Actually, that smiley-point is well-made: this testing format
shouldn't depend on all the RDF/n3 specs, code, and
tutorials, which are in flux...

> I believe that it's:
> <#name> :- [ anonymous node ] .

Well, that sort of achieves the relevant effect, but
it's complex to an extent that's not motivated for
this usage. I was just chatting with TimBL, and
I convinced him to add support for


While he's hacking on that, I'll re-state this proposal,
independent of the N3 code and docs.

We've got terms of the form
	_:name		for "anonymous" terms
	<absURIref>	for URIs
	"lskdjf"	for string literals.

and statements of the form
	S P O.
where S, P, and O are terms (S and P can't be literals
in the expected results from any RDF 1.0

I wrote a little perl hack to parse the
format I'm proposing and, modulo
string quoting cruft, turn it into triple(a(x), r(http:...), l("xyz"))


given the test input from

the expected results are in:

which, when fed thru n3-simple.pl, produces:

r(http://www.daml.org/2000/12/daml+oil#restrictedBy), a(a))
triple(a(a), r(http://www.w3.org/1999/02/22-rdf-syntax-ns#type),
triple(a(a), r(http://www.daml.org/2000/12/daml+oil#onProperty),
triple(a(a), r(http://www.daml.org/2000/12/daml+oil#cardinality),
triple(a(a), r(http://www.w3.org/2000/01/rdf-schema#label), l("Animal"))

which shows what we all knew: we can use either the n3-simple
format or the prolog-ish triple() format.

The interesting bit is to see which format is backed by a
"do these graphs match?" code first. Preferably two independent
implementations. cwm already does it
for N3, modulo the _:name syntax (and modulo cwm bugs ;-)

Jos, I gather your code can almost do the comparison too.

Jan, have you hacked an implementation of graph matching
for the triple() format yet? It seems like it should
be about 50 lines of prolog. Maybe I'll take a whack at it...

Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 30 May 2001 17:38:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:00 UTC