Re: Proposal for 'URIs everywhere'

I redid the relevant part of my distiller, too, and it is much nicer and
simpler. It is one single method that has some internal branches, but
can still handle @rel/@rev/@about/@resource/@typeof in one place. An
this is nice. What it does with 'value':

1. Get the possible safe curie signs out of the way at the start, ie, if
the value is of the form '[...]' then remove the [ and ] signs. Ie, the
safe curie is there for backward compatibility only. (And yes, that
means that I do allow unsafe curies for @about and @resource)

2. Get the possible blank node management out of the way, ie return the
right blank node for things like '_:a'. Note that if this is called for
a @rel/@property/@ref, then return None (with possible error message)
because you cannot have a blank node for a predicate

3. If it is called on @rel/@rev and the value is a keyword then return
the corresponding URI

4. Try to match the value against a CURIE definition (ie, see if it is
of the form a:b and 'a' is defined as a namespace, oops, local name). If
yes, return the corresponding URI

5. If we get here, this is a real URI (absolute or relative), and fall
back to the usual URI management to get the final URI (there are python
tools to do that with all the quirks of relative uris and the like).

I think this is in line with what Mark describes. I have written it down
here to see if it is what Mark had in mind (until we have relevant test
cases...)

I plan to test a bit more and put up a test version of the distiller
service on line with an extra "1.1" flag to trigger this behaviour.
Hopefully on the week end or early next week.

Ivan


Toby Inkster wrote:
> On Wed, 2009-11-25 at 22:06 +0000, Mark Birbeck wrote:
>> Anyway, below you'll find a series of minor changes that I feel would
>> need to be made to various parts of the syntax document, in order to
>> support URIs and CURIEs in all RDFa-related attributes (except @src
>> and @href).
> 
> The following describes the behaviour of the unreleased
> RDF::RDFa::Parser 0.21 package for Perl. (Latest released version is
> 0.20.)
> 
> If the parser is instantiated with the option "full_uris" set to true,
> then, it uses the following behaviour for these attributes:
> 
> @about/@resource: Safe CURIE, falling back to URIs.
> @src/@href: URIs only.
> @rel/@rev: Keywords, falling back to safe CURIEs, CURIEs then URIs.
> @property/@typeof/@datatype: Safe CURIEs, CURIEs then URIs.
> 
> I think this is more or less the same as your proposal, except that
> unsafe CURIEs are disallowed in @about/@resource.
> 
> By default, i.e. when "full_uris" is not true, it uses:
> 
> @about/@resource: Safe CURIE, falling back to URIs.
> @src/@href: URIs only.
> @rel/@rev: Keywords, falling back to safe CURIEs, then CURIEs.
> @property/@typeof/@datatype: Safe CURIEs, falling back to CURIEs.
> 
> And as of 0.21 it's now passing all 107 approved tests in the XHTML+RDFa
> test suite. (Yay!)
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 27 November 2009 17:18:32 UTC