W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > April 2001

Re: Referring to resources in RDF attributes

From: Dan Connolly <connolly@w3.org>
Date: Wed, 18 Apr 2001 13:05:37 -0500
Message-ID: <3ADDD771.8689719B@w3.org>
To: Graham Klyne <GK@NineByNine.org>
CC: RDF core WG <w3c-rdfcore-wg@w3.org>
[-cc www-rdf-comments; I wonder how much crossposting is wise;
chairs? any opinions?]

Graham Klyne wrote:
> 
> A possible RDF issue?

Certainly an RDF usability and adoption issue, in my experience.

In hopes of backlink services, I'll use the name
Brian just gave to this issue:
http://www.w3.org/2000/03/rdf-tracking/#rdfms-qnames-as-attrib-values

> I recognize RDF core WG is not strictly chartered to make changes to the
> RDF syntax, but there is a small change that I think could greatly enhance
> usability of RDF, if it doesn't break any other rules.

The particular solution you propose does break some things, I think...

> Currently, resource identifier values specified in attributes such as
> "about", "resource", "aboutEach" and "type" are specified as
> URI-references.  The same resources used in element or attribute names are
> specified as Qnames.
> 
> I have for some time assumed that there is a good reason for Qname syntax
> to be unavailable in attribute values but I recently noticed another
> specification that allows interpretation Qnames in attribute values, which
> leads me to question my assumption.

As I recall from participation in the former RDF M&S WG,
the reason was mostly "we're not sure how that's going to
work in other XML specs, so let's not do in in RDF yet."

That reason has been overtaken by events: XSLT and XML Schema
use qnames in attribute values.

> In the CC/PP specification [1] examples, DTD entity definitions are used to
> make such attributes more readable, but this has been criticized as being
> incompatible with future directions for XML.

Quite.

>  It would be so much easier if
> Qnames could be used here.  I have noticed similar complications in other
> examples of RDF.
> 
> So, what would be the possible problems of allowing Qnames in the RDF/XML
> syntax for the attributes mentioned?

No; it would be ambiguous. But I'm interested in
adding new attributes that take qname values.

> 
> (a) does it break any assumed processing models?  I don't think so, but I'm
> not certain about this.
> 
> (b) how does one distinguish between a Qname and a 'bare' URI-reference
> (the bare URI form MUST be allowed for backward compatibility)?

One cannot.

One must use different attribute names.

> Here's a simple example of the kind of thing I am thinking of:
> 
> Current RDF syntax:
> 
>    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>             xmlns:rdfs="http://www.w3.org/1999/PR-rdf-schema-19990303#">
>      <rdf:Description about="http://www.example.org/Set">
>        <rdf:type
> resource="http://www.w3.org/1999/PR-rdf-schema-19990303#Class"/>
>        <rdfs:subClassOf
> rdf:resource="http://www.w3.org/1999/PR-rdf-schema-19990303#Container"/>
>      </rdf:Description>
>    </rdf:RDF>
> 
> Using Qnames:
> 
>    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>             xmlns:rdfs="http://www.w3.org/1999/PR-rdf-schema-19990303#"
>             xmlns:eg="http://www.example.org/Set">
>      <rdf:Description about="eg:Set">
>        <rdf:type resource="rdfs:Class"/>
>        <rdfs:subclassOf rdf:resource="rdfs:Container"/>
>      </rdf:Description>
>    </rdf:RDF>

I suggest, instead:

    <rdf:RDF xmlns:rdf="http://www.w3.org/2001/04/18-rdf-with-qnames#"
             xmlns:rdfs="http://www.w3.org/1999/PR-rdf-schema-19990303#"
             xmlns:eg="http://www.example.org/Set">
      <rdf:Description rdf:aboutQ="eg:Set">
        <rdf:type rdf:resourceQ="rdfs:Class"/>
        <rdfs:subclassOf rdf:resourceQ="rdfs:Container"/>
      </rdf:Description>
    </rdf:RDF>

things I changed

  1. the namespace name. This isn't RDF 1.0 syntax.
  It's convertable to RDF 1.0 syntax (using XSLT;
  we should provide a transformation if we persue this)
  but it's not RDF 1.0 syntax.

  We might conceivably replace RDF 1.0 syntax with this
  syntax, pretending RDF 1.0 syntax never existed,
  but (a) I doubt we will, and (b) until we do,
  it's useful to keep them separate.
  (cf my "namespace squatting: please don't" message
	to www-rdf-interest a while ago)

  2. <rdf:type resource="..."> -> <rdf:type rdf:resource="...">
  If you think that the XML Namespace spec specifies
  that these are equivalent, read it again.
     cf. http://www.w3.org/2000/03/rdf-tracking/#rdf-ns-prefix-confusion
  I intend to elaborate on this separately...

  3. rdf:about -> rdf:aboutQ
	(for lack of a better name).
  We can specify (using, e.g. XML Schema) that this
  takes a qname value. More on using XML Schemas
  to specify RDF syntax separately...



> #g
> --
> 
> [1] CC/PP draft <http://www.w3.org/TR/CCPP-struct-vocab/>
> 
> ------------
> Graham Klyne
> (GK@ACM.ORG)

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 18 April 2001 14:05:51 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:35:03 EDT