W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2002

Re: rdf-ns-prefix-confusion

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Tue, 22 Jan 2002 12:37:12 +0000
To: Uche Ogbuji <uche.ogbuji@fourthought.com>
cc: www-rdf-interest <www-rdf-interest@w3.org>
Message-ID: <5744.1011703032@tatooine.ilrt.bris.ac.uk>

[I'm editing out most of your message, just to make this reply
shorter than the original]

>>>Uche Ogbuji said:

<snip size="lots"/>

So I'll label this, Proposal 1:

> To illustrate, if the RDF WG's decision were extrapolated to XSLT, I would 
> write a variable as follows (assume proper decl for "xsl" prefix):
> <xsl:variable xsl:name="spam" xsl:select="'eggs'"/>
> rather than the actual
> <xsl:variable name="spam" select="'eggs'"/>
> Notice that from the infoset POV, the attributes "name" and "select" are not 
> in the XSLT namespace, but applications are expected to handle them as XSLT 
> syntactic elements anyway.  I don't see why this wouldn't work for RDF.

That's the step that's missing.  RDF/XML likes to consider qnames as
things that map directly to URIs, without going via other mechanisms.
Some of them are builtin such as rdf:type, others are machinery for
wrapping the syntax such as the rdf:about (ok, "about") attribute and
the majority of them are defined by user applications.

So for some bit of rdf
  <foo:blah rdf:type="http://example.org/somewhere/"/>
  <rdf:Description rdf:type="http://example.org/somewhere/"/>

the foo:blah has a URI, rdf:type has a URI; rdf:Description is a bit
of syntax wrapping.

For some 'RDF' element you would propose (1) that bare type is OK
  <rdf:Description type="http://example.org/somewhere/"/>
or with xmlns= the RDF namespace
  <Description type="http://example.org/somewhere/"/>
but that 'type' doesn't look like a URI thing since as you say above,
the 'type' attribute has no *direct* namespace; but only one via the
parent element, an indirect one.

For the syntax construction machinery such as 'about'
  <foo:blah rdf:about="http://example.org/somewhere/"/>
  <rdf:Description rdf:about="http://example.org/somewhere/"/>
are OK and you propose (1)
  <rdf:Description about="http://example.org/somewhere/"/>

Here it is a closer call since 'about' doesn't have a URI, but is
used for other purposes.  But I still feel it would be clearer that
rdf:about is an RDF thing especially in cases where other attributes

  <foo:blah rdf:about="http://example.org/somewhere/" a:b="x" c:d="y" />
  <rdf:Description rdf:about="http://example.org/somewhere/" a:b="x" c:d="y" />
and you propose (1)
  <rdf:Description about="http://example.org/somewhere/" a:b="x" c:d="y" />
or even with xmlns= the RDF namespace
  <Description about="http://example.org/somewhere/" a:b="x" c:d="y" />

which looks odd; why would 'about' be bare, a:b and c:d require prefixes.

I'll label this Proposal 2:

> So can at least two XSLT attributes: version and id.  If they appear on a 
> non-XSLT element, they must be prefixed (i.e. xsl:version and
> xsl:id).  I have 
> a vague inkling there are other examples I'm forgetting off-head.
> Again, works for XSLT, should work for RDF.

That just seems horrible.

I think this is something to do with RDF/XML expecting to see lots
elements and attributes with many namespaces defined, so picking the
rdf ones out of them should be easy.  What about embedding?  Which
one gets the attributes?  The innermost XML standard?  Just a mess.

As you noted, the RDF Model & Syntax doc had unprefixed attributes.
However it didn't do the XSLT way by accident, it was doing a variety
of things inconsistently.  Which is probably due to being developed
in 1998/1999 in parallel with XML Namespaces.

> Dave Beckett said:
> > This update was made by the working group in May 2001 and I think we
> > would need substantial evidence of why this resolution was a big
> > problem before we would revisit it.
> It's such a shame I have so little time to keep up with these affairs.
> Well, this may be the knock-out blow for my argument.  I do think
> that the WG agreement is much more confusing than going with
> general XML convention, but even I don't claim that it is an
> earth-shaking problem.

I don't see it as confusing.  The amendmed form gives just one way to do it:

  Use the rdf:attribute form always

and that seems pretty clear

I've probably said^Wtyped too much... :)

Received on Tuesday, 22 January 2002 07:37:27 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:39 UTC