- From: Ivan Herman <ivan@w3.org>
- Date: Sun, 15 Nov 2009 08:45:16 +0100
- To: Shane McCarron <shane@aptest.com>
- CC: "public-rdf-in-xhtml-tf.w3.org" <public-rdf-in-xhtml-tf@w3.org>
- Message-ID: <4AFFB18C.2020508@w3.org>
Well, it depends on the implementation environment. I rely on rdflib, which has its own bnode management. So I generate bnodes into the graph using its mechanism. The only thing I have to do is to have a 'mapping' between the RDFa author's bnode id-s and the internal instances. The result is, of course, that the generated RDF serialization will _not_ use the same bnode id-s than the RDFa source, but whatever the rdflib environment produces as unique names. But that is all right and no RDFa authors should expect to see the same bnode URI-s in the output. If you do the whole bnode management than, of course, the situation becomes your responsibility. But it is all right if, internally, you do a mapping from the user's name to anything inside and output that one. The author's bnode id-s do not matter, in this sense. Ivan Shane McCarron wrote: > Oh, and a slightly related question for implementors. In RDFa it is > possible to create a *specific* bnode at any time. They sort of > "auto-vivify" when you reference them (e.g., about="_:myNewBnode"). At > least, I think that is how it works. > > There are also *implicit* bnodes that get created all the time when > certain attributes are present. The names of these are not important. > What is important is that they become the implicit subject or object of > triples in their child nodes. These bnodes are by definition CANNOT be > explicitly referenced, since you have no idea what the implementation > will name them. > > 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? > > Shane McCarron wrote: >> Just curious - how does it issue a warning? As part of the graph? >> >> Ivan Herman wrote: >>> Looks fine to me. >>> >>> (I was unsure on the call and I checked: my implementation already does >>> that and issues a warning in case of reusing '_') >>> >>> Thanks >>> >>> ivan >>> >>> Shane McCarron wrote: >>> >>>> At the 12 November meeting, the group agreed that the RDFa Syntax >>>> Specification reserves the prefix of '_', but that it could be clearer >>>> about this. We agreed to put a clarification in the Errata. I propose >>>> the following text: >>>> >>>> In sections 5.4.5 and 7 the specification indicates that the prefix '_' >>>> is reserved and is used to create / reference blank nodes (bnodes). >>>> Because this prefix is reserved, authors SHOULD NOT declare a mapping >>>> for the prefix '_' and conforming processors MUST NOT incorporate >>>> such a >>>> prefix mapping into the 'list of URI mappings' as defined in section >>>> 5.5. >>>> >>>> >>>> >>> >>> >> > -- 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 Sunday, 15 November 2009 07:45:49 UTC