- From: Stephane Corlosquet <stephane.corlosquet@deri.org>
- Date: Mon, 04 May 2009 17:17:29 +0100
- To: Toby A Inkster <tai@g5n.co.uk>
- CC: RDFa <public-rdf-in-xhtml-tf@w3.org>
Hi,
> 1. Full URI. very verbose and not very readable.
>
> I would suggest storing full URIs, and...
>> 2. CURIE. easy to read and user friendly.
> ...displaying them as CURIEs if required in the user interface.
For now, Drupal core is only focusing on RDFa, which means it will not
do anything with the full URIs and will require to convert them to
CURIEs for every page load. This is an extra processing which would
impact performance compared to the solution where the URIs are stored as
CURIEs and inserted "as is" in the xHTML output. If ever required, full
URIs can be built from CURIEs at no cost via a simple concatenation,
while the opposite convertion full URI to CURIE is more expensive.
There is a minor cons which is that local prefixes and CURIEs have to be
kept in sync, but I believe this is manageable as prefixes are generally
unlikely to change.
Keep in mind that Drupal core has to remain as light as possible and
this is why we're looking into these weight and performance issues. RDFa
is the first step for enabling RDF in Drupal core. For more advanced RDF
features, contributed modules such as the RDF API will leverage the
lightweight core RDF functionality.
Has anyone ever used CURIEs as lightweight URIs storing system? Is there
any potential issue which I've overlooked here?
Stephane.
Toby A Inkster wrote:
> On 2 May 2009, at 15:27, Stephane Corlosquet wrote:
>
>> For the RDFa in Drupal core effort, I'm looking for the best way to
>> store URIs and keep it lightweight and developer friendly.
>>
>> I see three different methods for referencing vocabulary URIs.
>>
>> 1. Full URI. very verbose and not very readable.
>
> I would suggest storing full URIs, and...
>
>> 2. CURIE. easy to read and user friendly.
>
> ...displaying them as CURIEs if required in the user interface.
>
>> A typical use case is for representing a blog post for example:
>>
>> $object->title = 'Title of my blog post';
>> $object->created = '1235130980';
>> $object->user_id = 2;
>> $object->body = 'Lorem ipsum dolor sit amet, consectetur adipiscing
>> elit.';
>> $object->rdf_mappings = array(
>> 'type' => 'sioct:Weblog',
>> 'title' => 'dc:title',
>> 'body' => 'sioc:content',
>> 'user_id' => 'dc:creator',
>> );
>
> Using full URIs this could be:
>
> include 'prefixes.php'; # A bunch of constants
> /* ... */
> $object->rdf_mappings = array(
> 'type' => SIOCT.'Weblog',
> 'title' => DC.'title',
> 'body' => SIOC. 'content',
> 'user_id' => DC.'creator',
> );
>
> Or:
>
> include 'prefixes.php'; # A class definition
> /* ... */
> $object->rdf_mappings = array(
> 'type' => RDF::sioct('Weblog'),
> 'title' => RDF::dc('title'),
> 'body' => RDF::sioc('content'),
> 'user_id' => RDF::dc('creator'),
> );
>
>
Received on Monday, 4 May 2009 16:18:36 UTC