Re: CURIEs: A proposal

Misha,

good you started this.

First of all, there is no difference in this respect between N3 and
Turtle or SPARQL (well... there seem to be a tiny difference between
SPARQL and the other two, because SPARQL allows the '.' characters to
appear in some positions[1]). All three use, essentially, NCNAMES for
the suffix and the prefix. Ie, I think you can safely merge those three
categories into one (probably the best is to refer to Turtle, because
both N3 and SPARQL have other, semantically different constructs,
whereas Turtle is only for the description of an RDF graph.)

The SPARQL grammar is at[2], for your reference, Turtle is at[3].

Caveat: there might be some tiny issues that evades me and reflect my
own, incomplete understanding (to quote you:-)

In general: RDF/XML *is* XML, so any rule of the form XML+Namespaces
apply. In my understanding, that should also be true for XHTML, I am a
bit surprised to see some differences below. I leave this to those who
know better than me. Nevertheless, I hope this helps...

Cheers

Ivan

[1] http://lists.w3.org/Archives/Team/t-and-s/2006Jun/0140.html
[2] http://www.w3.org/TR/rdf-sparql-query/#grammar
[3] http://www.dajobe.org/2004/01/turtle/


Misha Wolf wrote:
> I've updated this survey in the light of:
> -  Noah Mendelsohn's mail
> -  a conversation with Shane McCarron
> -  a NewsML 2 Architecture WP discussion
> 
> The data points presented reflect my own, incomplete, understanding.
> Please help by correcting the ones that are wrong and providing the 
> missing (or additional) data points.
> 
> For context, see:
> -  RDFa Primer 1.0, 16 May 2006
>    http://www.w3.org/TR/2006/WD-xhtml-rdfa-primer-20060516/
> -  News Taxonomies presentation to the W3C AC, given on 22 May 2006
>    http://lists.w3.org/Archives/Public/www-archive/2006Jun/0013.html
> -  CURIEs: A proposal, 2 June 2006
>    http://lists.w3.org/Archives/Public/www-tag/2006Jun/0007.html
> 
> 7   Each language must specify:
> 
> 7a  the syntactic constraints (if any) on the prefix and suffix.
> 
>     XMLNS    : NCNAME
>     XHTML    : prefix = any; suffix = IRI
>     NewsML 2 : NCNameChar+
      SPARQL   : NCNAME

Note that the grammar in the SPARQL spec defines its own NCNAME, does
not refer to the XML document.

      RDF/XML  : NCNAME

This is fully XML

>     N3       : ?
>     Turtle   : ?
> 
> 7b  how CURIEs and URIs are distinguished, eg through dedicated 
>     attributes or through a special syntax.
> 
>     XMLNS    : ?
>     XHTML    : Mix of dedicated attributes and special syntax 
>                ("[a:b]") for non-dedicated attributes
>     NewsML 2 : Dedicated attributes
>     SPARQL   : ?
>     RDF/XML  : ?

At this moment, there is no syntax for Curies in SPARQL and/or RDF/XML.
They could not be used in those languages, afaik.

Note that, for example, rdf:resource in RDF/XML has a value as a URI,
not even a qname...


>     N3       : ?
>     Turtle   : ?
> 
> 7c  the mechanism for specifying the prefix-to-IRI mapping.  The 
>     mechanism may use information provided out-of-band.
> 
>     XMLNS    : xmlns attribute
>     XHTML    : xmlns attribute
>     NewsML 2 : scheme element

      SPARQL   : @prefix construct
      RDF/XML  : xmlns attribute

>     N3       : ?
>     Turtle   : ?
> 
> 7d  whether and, if so, how the prefix and suffix are combined to 
>     form an IRI.
> 
>     XMLNS    : Left to each language to specify
>     XHTML    : Plain concatenation
>     NewsML 2 : For vocabularies managed by the IPTC, we're 
>                considering:
>                  <vocabIRI> & "#_" & <code>
>                or plain concatenation, coupled with vocabIRIs ending 
>                with "?" or "/" or "#_" 
>                For vocabularies not managed by the IPTC:
>                  Left to each vocabulary authority to specify
      SPARQL   : if the prefix consists of a single '_', then this
denotes a blank node.
Ie, _:a is a blank node, not a real IRI. In all other cases, it is a
concatenation.
      RDF/XML  : Plain concetanation
>     N3       : ?
>     Turtle   : ?
> 
> 7e  whether the prefix and suffix form a tuple or whether they are 
>     a compact representation for an IRI.
> 

I do not understand this question...

>     XMLNS    : Tuple
>     XHTML    : Compact representation for an IRI
>     NewsML 2 : Tuple and compact representation for an IRI
>     SPARQL   : ?
>     RDF/XML  : ?
>     N3       : ?
>     Turtle   : ?
> 
> 7f  whether the dereferencing of the IRI mapped to the prefix is 
>     required to yield a useful and relevant information resource.
> 

I am not 100% sure of the answer (except that there is no difference
between Turtle and and RDF/XML in this case). I think it is not
required, but you should also refer to

http://www.w3.org/2001/tag/issues.html#httpRange-14

(which is not RDF/XMl and/or Turtle specific!)

>     XMLNS    : Not required, but the Architecture of the WWW states:
>                "The owner of an XML namespace name SHOULD make 
>                available material intended for people to read and 
>                material optimized for software agents in order to 
>                meet the needs of those who will use the namespace 
>                vocabulary."
>     XHTML    : Not required
>     NewsML 2 : Required
>     SPARQL   : ?
>     RDF/XML  : ?
>     N3       : ?
>     Turtle   : ?
> 
> 7g  whether the dereferencing of the IRI built from the prefix and 
>     suffix (and, possibly, also other building blocks) is required 
>     to yield a useful and relevant information resource.
> 
>     XMLNS    : Left to each language to specify
>     XHTML    : Yes
>     NewsML 2 : For vocabularies managed by the IPTC: MUST
>                For vocabularies not managed by the IPTC: SHOULD
      SPARQL   : yes, except for the '_:a' case for blank nodes
      RDF/XML  : yes
>     N3       : ?
>     Turtle   : ?
> 
> 7h  whether any fragment identifiers in these IRIs are required to 
>     be legal XML names.
> 
>     XMLNS    : Outside the scope of the spec
>     XHTML    : Outside the scope of the spec
>     NewsML 2 : Yes
      SPARQL   : Outside the scope of the spec
      RDF/XML  : Outside the scope of the spec
>     N3       : ?
>     Turtle   : ?
> 
> Misha
> ------------------- NewsML 2 resources ------------------------------
> http://www.iptc.org         | http://www.iptc.org/std-dev/NAR/1.0
> http://www.iptc.org/std-dev | http://groups.yahoo.com/group/newsml-2
> 
> 
> To find out more about Reuters visit www.about.reuters.com
> 
> Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.
> 
> 

-- 

Ivan Herman
W3C Semantic Web Activity Lead
C/o W3C Benelux Office at CWI, Kruislaan 413
1098SJ Amsterdam, The Netherlands
tel: +31-20-5924163; mobile: +31-641044153;
URL: http://www.w3.org/People/Ivan/

Received on Monday, 26 June 2006 14:03:37 UTC