An editorial remarks (was Re: CURIE syntax thoughts + @instanceof semantics)

A side issue that may be worth documenting (related to the CURIE issue I
raised).

If we put a note in the document referring to a 'reference-less' CURIE,
we may want to warn that, in some cases, this may lead to serialization
error in RDF/XML. (I just spend some time with my implementation on my
machine and I thought there was a bug. There was none, I did not realize...)

Indeed, if we have

<html xmlns:foaf="http://xmlns.com/foaf/0.1/">
...
<body>
   <p about="#a" rel="foaf:">something</p>
...
</body>

the serialization in RDF/XML would require to use the
<http://xmlns.com/foaf/0.1/> as an element name, or split it with some
sort of a prefix and a local name that would work for an element name.
And that cannot be done for that case, ie, the corresponding graph can
be serialized only in turtle and not in RDF/XML....

Of course

<p about="[foaf:]" rel="bla:bla">something</p>

works all right in RDF/XML, because the foaf URI does not appear as an
RDF/XML name...

(This may be a tiny issue for the syntax document, though...)

Ivan


Mark Birbeck wrote:
> Hi Ivan,
> 
> I'll come back to the third part of your post separately, but just on
> the first two parts, the syntax you suggest is already allowed.
> 
>> just try to share some line of thoughts that (1) came to my mind related
>> to edge cases of the CURIE syntax and (2) gave me some new ideas related
>> to @instanceof. (I hope I could catch your attention:-)
>>
>> 1. At present, my reading of the CURIE syntax grammar is that the
>> following is illegal:
>>
>> @attribute="prefix:"
>>
>> Ie, what is called a "reference" in the syntax is _required_. My first
>> question is: why? Why can't we say that the value of "prefix:" is, well,
>> the URI that is defined for the prefix? Is there any fundamental reason
>> for that?
> 
> Although the 'reference' part is required, it's a relative URI, and
> since an empty value is valid for a relative URI, you get exactly what
> you want.
> 
> We tried to draw attention to this 'quirky' usage in the CURIEs spec
> [1], by giving the following example (see in section 5.1):
> 
>   joseki:
> 
> Note that this kind of usage means that you could abbreviate complete
> URIs so as to make a document and its metadata easier to read and
> edit. For example:
> 
>   <div xmlns:ivan="http://ivans-profile" xmlns:mark="http://marks-profile">
>     <div about="[ivan:]" rel="foaf:knows" resource="[mark:]" />
>     <div about="[mark:]" rel="foaf:knows" resource="[ivan:]" />
>   </div>
> 
> 
>> 2. If moved along the line of #1 and if we accepted, for a moment, that
>> a "prefix:" is a legal CURIE, then the next problem is to define what
>> the meaning of "_:" is. Well, there seems to be a perfectly valid answer
>> for that: this is a unique identifier chosen by the implementation with
>> the restriction that _each_ occurrence of "_:" is a _different_ unique
>> identifier. In RDF terms this means that each occurrence of "_:" is a
>> _different_ blank node.
> 
> It's an interesting idea, but unfortunately, given that the syntax
> already works, you might need to find a different way to express your
> idea.
> 
> In CURIEs the prefix part was meant to be unique but consistent. So it
> wasn't that the syntax "_:a" and "_:b" was meant to indicate to a
> processor, "please generate bnode a and bnode b"; rather, all a CURIE
> processor has to do is to generate some globally unique value, and
> place it into the prefix mappings list under the name "_". Then all of
> the normal CURIE processing would 'just work'.
> 
> I designed it that way so that we could get CURIEs to provide support
> for bnodes, without actually talking about bnodes, which seem to me to
> be out of scope for a URI abbreviation syntax.
> 
> Which means that as things stand, although "_:" is a good idea for
> saying "give me a new bnode", in CURIE syntax it would always generate
> the same identifier, no matter how many times it was used in a
> document. (At least as things stand at the moment.)
> 
> Regards,
> 
> Mark
> 
> [1] <http://www.w3.org/TR/curie/>
> 

-- 

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

Received on Monday, 17 December 2007 15:08:51 UTC