RE: CURIEs: A proposal

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 UTC