Re: Proposal for 'URIs everywhere'

Mark Birbeck wrote:
> 
> However...
> 
> I believe it would be useful to say that the following will *never*
> become a URI:
> 
>   [a:b]
> 
> My feeling is that in this situation the author is saying that they
> explicitly want to use the CURIE 'a:b' with the mapping 'a'. And if
> the mapping 'a' doesn't exist, then something has gone wrong, and they
> would prefer it to be ignored altogether.
> 
> I'm seeing this as a useful 'strict' mode, that automated systems
> might want to use, but hand-coders would almost certainly avoid.
> 

Yep, you are right, I missed that point. And I agree.

For the records, I modified my implementation taking this into account,
see below in the post scriptum. I have now set up

http://www.w3.org/2007/08/pyRdfa/Test.html

which runs the newer version. Default is set to RDFa1.1 (if set to 'No'
then the current mechanism comes into the picture). A tiny example is at

http://www.ivan-herman.net/Misc/2009/RDFaURITest.html

Again for the records (and to test my own understanding) here are the
differences between old and new as I see them:

- URI-s can be used in @rel/@rev/@property; this includes both absolute
and relative URIs, with the provision that predefined values (stylesheet
and the like) are not considered Curie predicates in the xhtml
namespace. Curies are of a higher priority than URIs
- @about/@resource can accept Curies with a higher priority than URIs.
- all the attributes can also accept Safe Curies; their usage would
disallow the fall back on URI-s. Note that, afaik, safe curies were
_not_ allowed in @rel/@rev/@property before, so this is a new feature
for those...

Looking at this list, the remaining asymmetry is the usage of keywords
for @rel/@rev/@property. I begin to wonder: if we do such a grand
unification, does it make sense to keep this asymmetry? I do not claim
that statements like

<span about="next" ... />

would have a widespread usage but it does make sense in the RDF sense,
ie, it means

xhtml:next some:property some:value .

ie, I make a statement on an existing predicate. Perfectly kosher for RDF.

Ie: what about removing that asymmetry altogether, and say that
predefined keywords are also valid for @about and @resource? It would
make the URI management simpler and cleaner and I do not really see a
major drawback...

Ivan

P.S. So here is what I run now.

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 and set a
'safe_curie' flag to True.

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 should become a real URI. However, if the
safe_curie flag was set to True, stop at this point and (possibly) issue
an error message and return with None

6. 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.

-- 

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 Saturday, 28 November 2009 09:05:43 UTC