arpithparikh / rdfquery

Automatically exported from code.google.com/p/rdfquery
0 stars 0 forks source link

provide mapping functionallity from full URIs to CURIEs/Qnames #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We'd need a function that takes a full URI as an input and provides the
prefix:localname as a return value, eg {http://xmlns.com/foaf/0.1/knows} ->
{foaf:knows}; this is an important feature used in many UIs (such as in
Drupal, where the origin request came from. 

Note that one can use http://prefix.cc/ (for example
http://prefix.cc/popular/all.json) for a live update to look up common
prefixes.  

Original issue reported on code.google.com by Michael.Hausenblas on 17 Jun 2009 at 4:00

GoogleCodeExporter commented 8 years ago
The $.createCurie() method does this, but you have to pass to it a set of 
namespaces
that can be used to provide the prefix bindings.

I think it's better to get people to provide those bindings explicitly rather 
than
relying on a central registry of bindings; a central registry is never going to
contain all possible namespaces, and unless it does there's always going to be 
the
possibility of a confusing overlap in prefixes.

Of course if an individual developer wants to use that set of bindings, it 
should
work fine; I just don't think we should build it into rdfQuery.

Original comment by jeni.ten...@gmail.com on 17 Jun 2009 at 9:03