Re: Referring to resources in RDF attributes

[-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:

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


>  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=""
>             xmlns:rdfs="">
>      <rdf:Description about="">
>        <rdf:type
> resource=""/>
>        <rdfs:subClassOf
> rdf:resource=""/>
>      </rdf:Description>
>    </rdf:RDF>
> Using Qnames:
>    <rdf:RDF xmlns:rdf=""
>             xmlns:rdfs=""
>             xmlns:eg="">
>      <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=""
      <rdf:Description rdf:aboutQ="eg:Set">
        <rdf:type rdf:resourceQ="rdfs:Class"/>
        <rdfs:subclassOf rdf:resourceQ="rdfs:Container"/>

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.
  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 <>
> ------------
> Graham Klyne

Dan Connolly, W3C

Received on Wednesday, 18 April 2001 14:05:51 UTC