Re: Some thoughts on the RDFa DOM API document

On Apr 27, 2010, at 04:46 , Benjamin Adrian wrote:
[snip]
> 
>> If I understand well what you say then I think I disagree. So here is how I understand: if I look at an RDFa page today and run a javascript with the API and I get _:123 as an identifier for a particular bnode, is it true that if I run the same javascript on the same page tomorrow, will I get _:123 as an identifier for the same bnode? If this is what you ask then my answer is no. There is absolutely no reason for that, _:123 is not a stable and permanent identifier for a node, it is only a temporary identifier at a particular run. It is a perfectly valid implementation of bnodes to use random identifiers, with the only requirement that two different bnodes should have different identifiers. (In fact, RDFLib explicitly runs a random generator to generate a bnode id to avoid giving the false impression that these are stable ID-s.) 
> 
> For not confusing developers with RDF internal definition,
> I would say a pragmatic solution would cover the following Blank Node management:
> - If two or more documents are processed with the RDFa DOM API,
> it has to be assured that comparing Blank Nodes from different documents
> never result true. (this means, the Node document has to be an part of the comparision)
> - Blank Nodes from a single document should preserve the same ID as used in the document.
> If no ID is given or exists, a unique number is generated as ID.
> 

I am actually not sure we should require the preservation of the same ID as used in the document. Not that it is _wrong_ for an implementation to do that, but I do not see why to require it. Didactically it may give a wrong impression of what a blank node is; let alone the fact that if somebody extracts two RDF graphs from two different RDFa contents and then merges them, then the ID-s MUST change anyway during the merge process, so this may lead to wrong expectations. Ie, if I was to implement an RDFa API I would probably choose different ID-s. (Actually, this is what happens in my distiller: the generated and serialized RDF graph does not use the same blank node ID-s as the ones used in the original document.)

Ivan


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Tuesday, 27 April 2010 14:06:20 UTC