W3C home > Mailing lists > Public > www-tag@w3.org > June 2006

RE: CURIEs: A proposal

From: Laurent Le Meur <laurent.lemeur@afp.com>
Date: Thu, 15 Jun 2006 08:51:14 +0200
Message-Id: <200606150651.k5F6p8OD020730@alox.afp.com>
To: "'Dan Connolly'" <connolly@w3.org>
Cc: <www-tag@w3.org>, <newsml-2@yahoogroups.com>, <public-rdf-in-xhtml-tf@w3.org>

Hi Dan,

> construction-rule =
>    if vocabURI ends with a #, s1 = '' (empty string) else s1 = '#'
>    if code does not start with a name-start character, s2 = '_' else s2
> = ''
>    return <vocabURI> + s1 + s2 + <code>

I guess that this rule can be implemented by any baby programmer in any
language, so it is totally acceptable. 

One extra interest is that one is able to get back from a full URI to a CURIE:
CURIE construction-rule =  
  get the first "#', from right to left
  map the left part to any prefix you want
  if the end part begins with a '_' and is followed by a digit, strip the '_' to
get the code; if not you've got the code already.

Laurent Le Meur
NewsML-2 Architecture WP chair
Agence France Presse
 


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This e-mail, and any file transmitted with it, is confidential and  intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error, please  contact the sender and delete the email from your system. If you are  not the named addressee you should not disseminate, distribute or copy  this email.

For more information on Agence France-Presse, please visit our web site at http://www.afp.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Received on Thursday, 15 June 2006 06:51:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:40 GMT