- From: Graham Klyne <Graham.Klyne@Baltimore.com>
- Date: Mon, 23 Jul 2001 21:15:52 +0100
- To: Brian McBride <bwm@hplb.hpl.hp.com>
- Cc: Aaron Swartz <me@aaronsw.com>, w3c-rdfcore-wg@w3.org
At 11:44 AM 7/22/01 +0100, Brian McBride wrote: >Aaron Swartz wrote: >[...] > > Today I came up with the idea that we could define anonymous > > nodes as having a special representation in the abstract syntax, > > but define the N-Triples conversion from RDF as having a > > well-defined set of names for them. IOW, an algorithm such as > > the one used by SiRPAC or CARA to generate anonymous nodes in > > order could be specified somehow (using XSLT, for example), and > > all RDF/XML parsers which outputted N-Triples could follow this > > specification. That way, comparison of N-Triples documents could > > be reduced to a simple sort/diff operation, while still > > retaining the semantics of anonymous nodes. > > > > An example: > > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > > <rdf:Description> > > <rdf:value>foo</rdf:value> > > </rdf:Description> > > </rdf:RDF> > > > > could be unambiguously defined as: > > > > _:g0 rdf:value "foo" . > > > > as parsers would use anonymous node names in the form of _:gn > > where n begins at zero and increments for each anonymous node > > reached in the XML. > > > > Obviously this wouldn't work for N-Triples output from a data in > > which ordering information had been lost (I have some ideas on > > that one too, but they are less formed) but it would work for > > any RDF/XML -> N-Triples conversion. > >Nice idea. Basically this would allow easy compare of models that >came from the same RDF/XML serialization. > >One thing it wouldn't handle is the following example: > > <rdf:Description> > <foo:bar>foobar</foo:bar> > </rdf:Description> > <rdf:Description> > <bar:foo>barfoo</bar:foo> > </rdf:Description> > >compared to: > > <rdf:Description> > <bar:foo>barfoo</bar:foo> > </rdf:Description> > <rdf:Description> > <foo:bar>foobar</foo:bar> > </rdf:Description> > >These are representations of equivalent graphs which graph compare >will find equivalent. Brian, I don't think it's a reasonable goal that a (simple) parser will generate identical N-triples for equivalent graphs. I think it's enough that the structures generated do not impede the design/application of an algorithm to determine graph equivalence. [...] >If so, we are back into the complexities of graph theory. I don't think we ever seriously got away from them if we want to evaluate graph-equivalence. #g ------------------------------------------------------------ Graham Klyne Baltimore Technologies Strategic Research Content Security Group <Graham.Klyne@Baltimore.com> <http://www.mimesweeper.com> <http://www.baltimore.com> ------------------------------------------------------------
Received on Monday, 23 July 2001 18:06:02 UTC