W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > November 2009

Re: PROPOSAL: Errata text regarding defining a prefix of '_'

From: Toby Inkster <tai@g5n.co.uk>
Date: Sat, 14 Nov 2009 19:36:27 +0000
To: Shane McCarron <shane@aptest.com>
Cc: Ivan Herman <ivan@w3.org>, "public-rdf-in-xhtml-tf.w3.org" <public-rdf-in-xhtml-tf@w3.org>
Message-ID: <1258227387.10171.13.camel@ophelia2.g5n.co.uk>
On Sat, 2009-11-14 at 12:06 -0600, Shane McCarron wrote:
> My question is this:  How do you ensure that your implicit, 
> automatically created bnode names never collide with a documents 
> explicit, auto-vivified bnode names?  And should we have some sort of
> a test case to ensure this happens? 

It's not especially difficult. Here's one technique a parser could
follow:

	When an explicitly named bnode is found, check if its name
	starts '_:bn'. If not, use it verbatim. But if so, replace
	the '_:bn' with '_:bnbn'.

	When a name is needed for an implicit bnode, give it one
	starting '_:bn' followed by numbers.

You should find that this can never produce a collision. Of course if
means that in some cases, explicitly named blank nodes in the input RDFa
have different names in the output graph. But that's OK - RDF doesn't
assign any meanings to the names of blank nodes.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Saturday, 14 November 2009 19:37:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:05 UTC