W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > September 2006

Re: SPARQL rdf:type predeclared?

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Wed, 13 Sep 2006 20:48:21 +0100
Message-ID: <45086085.9090505@hp.com>
To: Graham Klyne <GK@ninebynine.org>
Cc: public-rdf-dawg-comments@w3.org

Graham Klyne wrote:
> Some clarification may help...
> With reference to:
> [[
> 2.8.4 rdf:type
> The keyword "a" can be used as a predicate in a triple pattern and is an
> alternative for the IRI rdf:type which is
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type.
> ]]
> -- http://www.w3.org/TR/rdf-sparql-query/#abbrevRdfType
> and the example in the same section:
> [[
>   ?x    rdf:type  :Class1 .
>   _:b0  rdf:type  :appClass .
>   _:b0  :p        "v" .
> ]]
> It's not entirely obvious whether the name rdf:type is predeclared, or if this
> is used must the query also define the rdf: prefix?

rdf: is not predeclared.  The WG decided that there would be no preset 
prefixes and queries must declare them all.  We did discuss it in the early 
days of syntax but its always been that they should be declared.

>  On balance, I think
> rdf:type cannot be used without first defining the rdf: prefix -- could this be
> made clearer?

It does say in the doc conventions that rdf: is the prefix for 
http://www.w3.org/1999/02/22-rdf-syntax-ns#. I took out the rdf:type in the 
text.  Same for http://www.w3.org/1999/02/22-rdf-syntax-ns#nil in "RDF 
Collections" section.

The editors' working draft is currently at:
(This version has not been endorsed by the working group yet)

the section you mention is 3.2.4 - the doc has been reorganised quite a lot

> (BTW, I think Jena/ARQ may accept rdf:type without a prefix declaration, but
> don't have firm evidence of this.)

No - ARQ does not accept rdf:type without a prefix declaration as per the WG 
decision (RDQL does have predefined prefixes).

There is a SPARQL validator running ARQ at:



   1 SELECT * { ?x rdf:type ?t }

Syntax error:

Line 1, column 15: Unresolved qname: rdf:type

> Also, I would assume that the keyword "a" can be used without declaring the rdf:
> prefix.

The keyword "a" is the full IRI - not the prefixed name rdf:type so would not 
need the declaration anyway.

> #g

Received on Wednesday, 13 September 2006 19:48:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:23 UTC