W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2001

RE: n3/n-triples syntax question

From: Peter Crowther <peter.crowther@networkinference.com>
Date: Fri, 30 Nov 2001 19:50:07 -0000
Message-ID: <B6F03FDBA149CA41B6E9EB8A329EB12D1ABD0E@vault.melandra.net>
To: "'Sandro Hawke'" <sandro@w3.org>, timbl@w3.org
Cc: www-rdf-interest@w3.org
> From: Sandro Hawke [mailto:sandro@w3.org]
> I was telling Bijan that his n3 parser should output N-Triples, when
> we came across the problem that anonymous node names (_:qname) are a
> pain to generate uniquely.  When you need one (eg for a [ ]
> construct), you can't just make one ("_:g57"), because the user might
> use the same identifier ("_:g57") later in the document.
> 
> Our best solution is to say you generate illegal names ("_:57") during
> parsing, then at the end of the document, you rename those over to the
> first _:gXX that's not already taken.   Painful, but correct.
> 
> The more obvious approach of "reserving" names like _:_gXXX would
> violate the principle of N-Triples being a sub-language of n3, at
> least in spirit.   Maybe you can finesse the definition of "reserve",
> and say that such names "may conflict with names generated internally
> if you go beyond N-Triples to other n3 features."  Pretty ugly.
> 
> Better solutions?

It's the same old problem of how to generate unique identifiers in a
globally distributed system, so use someone else's solution :-).  Use GUIDs
(and strip out the '-'s to give a 32-character hex string if you don't want
them).  Not ideal for us humans, but then humans shouldn't be anywhere near
this stuff in the longer term!

		- Peter
Received on Friday, 30 November 2001 14:50:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:52 GMT