Re: Re 2: PROPOSAL to close ISSUE-37: Clarifying bnode explanation

On Wed, 20 Oct 2010 09:35:22 +0100
Mark Birbeck <mark.birbeck@webbackplane.com> wrote:

> The bnode identifiers need to be the same *on the way in*. Your
> example is fine when it comes to querying the triples *on the way
> out*, but that isn't what the examples are trying to show.

I don't understand this whole "way in"/"way out" distinction. It
assumes a workflow of a parser putting the triples into a store, and
then the triples being retrieved from the store by some process. There
may not be a store at all.

Consider this example using my parser which simply prints triples to
STDOUT in N-Triples format as they occur. No stores.

############################################################
use RDF::RDFa::Parser;

my $xml = <<'XML';
<p>
	<span about="[_:foo]"
              rev="next Index CONTENTS"
              resource="[_:bar]"></span>
</p>
XML

# new($markup, $baseuri, Config->new($hostlang, $rdfaversion))
my $p = RDF::RDFa::Parser->new($xml, "http://example.com/",
	RDF::RDFa::Parser::Config->new('html4', '1.1'));
$p->set_callbacks({
	pretriple_resource => 'print',
	pretriple_literal  => 'print',
	});
$p->consume;

1;
############################################################

Blank node identifiers will be random-looking ones not bearing any
relationship to the strings "foo" and "bar" (they're generated using
UUID numbers).

These random-looking blank node identifiers are generated at the time
of processing @about and @resource for CURIEs - before they're
combined with the predicates to form triples - so at no point (not even
a transitional stage in memory) does a triple exist which has blank node
identifier "_:foo" or "_:bar".

As far as I'm concerned, that's a conformant implementation. But there
is no "way in" stage that has access to the triples in the state you
describe - the triples simply never exist in that state.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Wednesday, 20 October 2010 12:52:59 UTC